Porting CP/M to a Brother SuperPowerNote Z80 laptop thing
ฝัง
- เผยแพร่เมื่อ 25 ส.ค. 2024
- In whch yr hmbl svt receives a Brother SuperPowerNote Z80 laptop word processor thing, investigates it, and ports CP/M to it.
You can find all the source code here: github.com/dav... There are a few bugs, but this machine runs CP/M really well.
I am still trying to figure out how to upload the ghidra project somewhere for the ROM reverse engineering; suggestions welcome.
It would be kind of funny to write some CP/M word processing software now, so you could have a good word processing experience on a word processor for the first time in history.
I have every intention of installing Wordstar on mine now!
-Dx
@@Xalior yeah... I was going to say "we always used WoedStar as a programmer's text editor at college" ;)
@@XaliorI'd be interested to know what it's like. There's no repeat key right now, and screen scrolling is a bit slow; if there's a jump-scroll mode that might work better.
@@hjalfionce it’s delivered we can find out :)
Honestly, this is one of my favourite kind of content types, when some 8 bit-ish stuff is reverse engineered and used with own custom software then, using the knowledge from the reverse engineering. Great work!
Now that you have CP/M running on it, you can install the VEDIT editor, a superb programmer's editor from way back then. Also, original versions of the Infocom games 🙂
I still fondly remember hand-coding Z80 machine code in 1976, and probably still have hand-coding mimeo page templates in my filing cabinet somewhere. Very nice work indeed!
If you know of any actually open source software I can include in the cpmish repository, that'd be awesome. VEDIT never had the source released, unfortunately, but I'm always on the lookout for more stuff I can steal, I mean preserve...
That's awesome. Another brand-new CP/M port in 2023 :O
I haven't got the skills to do what you've managed to, but I have enough basic understanding to appreciate the feat you've achieved here. Enjoyed every delicious minute of it.
Absolutely brilliant reverse engineering video... in just the format I like. :)
CP/M 2, a Z80 assembler, Forth _AND_ BBC BASIC sounds like heaven on it's own but with Turbo Pascal too is just too much to cope with... I need a cup of Tea!
Just to clarify... that was a "Turbo Pascal Yummy" comment, not a "Turbo Pascal Yeuck" comment. :)
Incredilble work. When you were striving to get the CS line of the floppy controller to react, I started to imagine the Speaker Port would be the better choice for sending ROM outside ;)
Side note: The similar level of "touch and feel" reverse engineering has been done recently by three ethical hackers of Dragon Sector team, to debug the induced failure mode of certain types of polish trains, without altering the built in firmware saved inside Swiss made onboard computers. Interesting read on "Zaufana Trzecia Strona" on hacking trains.
another amazing installation of your adventures. love the content. thank you.
I came across CP/M years ago with the Amstrad PCW word processing computer. I have great respect for CP/M - being the start of computing as we know it today. But best of all your video has introduced me to the GUIDRA disassembler which I hope to have a go with sometime. Again, many thanks.
Not that I saw your commits last week, or nuffink, but I snapped up a bargain one of these of ebay before this video went live for £45, including British keyboard layout and PSU adapter 😀
I wonder if the spellchecker ROM is different... 🤔
-Dx
Outstanding. I have alway wanted a portable CP/M machine. I just ordered one off of eBay. I hope to follow in your footsteps.
I always get stunned when you do such things!
This is excellent. I've made a homebrew SBC with a Hitachi HD64180 (the predecesor of the Z180, but identical), and it's an amazing CPU. Your reverse engineering of this machine is just astonishing. I really like this kind of content. +1 sub!
Really clever reverse engineering, cunning programming!
You should really have a closer look at CP/M 3. It has a lot of improvements that may not be obvious at a glance.
It supports disk sizes up to 512 MB, and the interface to the disk driver is much cleaner. Also it doesn't just bank out the BDOS, but it also uses extra RAM banks for hash tables of the disk directory. It actually handles swapping disks way better, it has a much more flexible system of handling io devices. It natively supports programmable baudrates and the most comprehensive io redirection you could dream of. It also has support for a real time clock, including timestamps in the file system, and there are even Y2K patches available.
From a programmer perspective, it offers a lot of additional BDOS calls. It let's you specify what the os should do on errors, so you can do your own error handling. It has a call to parse a string as filename and automatically set up an FCB for it. It also lets you specify the string terminator character, so you can use the BDOS print function with 0-terminated strings. And there is even more than that.
All the while being 90% backwards compatible with CP/M 2.2 software.
I've looked at it, but I feel like the extra complexity outweighs the benefits --- for example, booting CP/M 3 involves loading a CP/M 2 BDOS to load the SYS files! Although, now that all the Digital Research source is properly open source, it'd be nice to add CP/M 3 to the cpmish repository. I just have no time. If you want to volunteer...
@@hjalfi I would need to know a lot about the device, all the io addresses and the chips used.
And since I don't have a device, I would need an emulator to do the testing and debugging.
Great job! It's a useful computer now.
This was brilliant! One of my favorite retrocomputing videos in recent memory. Subscribed!
Turbo pascal for cpm uses control codes in an odd way to scroll the screen. You can configure these in the set up progrm for tp. This wasn't natively supprted in the teminal emulation on the terminal i was using with my Z80-MBC2 i worked with the PiGFX devs to eventually set this up so it works correctly. I wish i could remember more of what was needed. This is unfortunately about three years ago.
Great work David! Now I'll have to buy another one :)
How you describes the floppy integration into the system looks for me a litte bit like it's done in the Atari ST. Only the pure reading/writing of data is done over the Floppy chip itself. The chip sits behind the DMA chip. The Floppy controller can only be accesses through it. All other functionality like selecting the device, checking for media change, etc is done through an other general IO chip.
Surprisingly captivating!
Really nice. I especially enjoyed the bit-banging of the ROM via address line. Sadly the thing has no speaker, otherwise beeping the ROM as morse code and recording that would have been another option. ;-)
Seriously: it would possibly also be an option to solder some wires to the ROM chip, take it to a breadboard and do a ROM-read circuitry there, but abusing an address line is admittedly more fun (and probably much faster). :-)
Or displaying it as a qr code on the screen
Yeah, that bit-banging is exactly the kind of out-of-the-box thinking I love to find in these kinds of videos. Subscribed!
I have been thinking about this most of the day. It might be worth comparing the serial, parallel and floppy implementations with the MSX standards that pre-dated this device.
If I were implementing something like this back in the day, it would have been easer to copy something that already existed than to create from scratch. One obvious choice would be to copy some logic and code from the MSX standard.
Finally. I thought it would never come.
The golden days of hobby computing!
Thank you for 77 minutes of ecstasy!
Nice, that’s a really cool machine to port CP/ M to! BTW, the thing with the center negative barrel jack connector is that the outer positive sleeve doubles as the switch between the battery and the external psu. You don’t want to witch ground, would you? PS: could you link the hires board pictures you took in the video. TH-cam does a fantastic you of compressing all the details away 😅. Thanx.
1:02:43 - I'm guessing that code is for de-bouncing the keys.
Huh, could be. I completely didn't think about that. My own machine doesn't need it but that could just be a quirk of my hardware.
Rather fond of those LCD skewmorphic user interfaces where everything is right in front of you and ready to go. A little tweaking of the UI and you could have had a reasonably decent interface to work with.
it's just unfair, your channel deserves more subscribers!
Oooooh, GKrellM! I also had the fish tank plugin :)
Bubblefishymon. It's fantastic. At-a-glance information of your computer's state. I use it everywhere. I really ought to get round to contributing a hidpi patch, though.
@@hjalfi Hmmmm... I should port it to a usb-connected LCD screen someday...
Interesting way to find data using gimp.
I actually spent ages trying to do this with netpbm and imagemagick before realising that it Just Works in gimp. I should actually try looking at the system ROM; there may be some interesting bitmaps there.
ich habe nichts verstanden und bin doch begeistert. thx
It would be great run a "vi" editor on this little thing.
EDIT: Wait. YOU ARE the creator of "qe" ! no way! Internet is getting smaller...
Every time I look at it I find a new bug.
Ha. Wordperfect. Never seen this for a long long time
I don’t think it is a z80 version of word perfect. They simply used the same extension by accident- most likely meaning word processor textformat. Word perfect used pre-rendered bitmap fonts to produce a „wysiwyg“ text document. I wrote some texts on it back when was in my first year in uni (1992) but changed to lotus Ami pro - wich was way superior for the stuff I did.
aw, no z80 writing this time around :( still, great video either way :) pretty cool machine too - did you get around to figuring out how it draws the 1bit images? if the hardware just works with characters, does it have a modifiable font?
also shame about the keyboard. could it be swapped over to another brother typewriter one? i know it probably won't fit but i wonder if they work the same, at the very least.
I did, yeah, at least partially. If you set one bit in the video control register then it switches to 1bpp graphics mode. The main menu screen uses this. That said, some of the programs like the world clock make me suspect that the character set is redefinable; by using the right set of characters in a block on the screen you'd be able to address each individual pixel while also allowing normal text elsewhere. Other Brother devices do that. But I haven't looked into it.
So, this system has bitmap graphics - don't you consider designing a GSX driver for it? And, may be, even backport GEM...
GSX is an interesting idea. I'd need some way to make PRL files (and some documentation for them). GEM, sadly, doesn't run on the Z80.
@@hjalfi GEM... not now, that's why I'm talking about backporting. But it is written (mostly) in C, and the source code is open. And, as far as I'm aware, it long time used GSX API for drawing windows etc, only in later versions GSX was totally dropped in favour of something more fast...
@@alextrusty2585 You could do a lot worse for a low-end GUI. I still think GEM looks really sharp on monochrome screens. Alas, this machine's video memory isn't memory mapped so it takes three out0 instructions, or 39 t-states, to write to a single byte. There may be some shortcuts but I don't think interactive graphics is really its thing. Now, a Borland-style fake-gui-with-redefined-characters; that it could probably do really well.
@@hjalfi The video subsystem apparently acts like some sort of VDP. I wonder if it's TMS9918 compatible? If so, it has hardware support for graphical primitives like dots, lines, rectangles et al, which would be good for GSX.
One way you could of read the rom was to connect your Logic Anaylzer to the ROM socket, and then using the apl file just read all the address lines, and you would of had a listing in your LA.. , also, what Program were you using to decompile/view edit the decompiled file?
Sadly my logic analyser only has eight input lines, and for that you need one with 24 or preferably more. And they're silly money. Reverse engineering was done in ghidra but it doesn't actually support the z180 very well.
46:30 - Another solution is 'bit-banging'!
Should load ti 84 or 86 os
I thought these were x86 based? Ran PC Geos and bundled with BrotherWorks.
That's a different machine --- the GeoBook! I was a Geoworks nerd back in the day and was one of the few software developers for it, so I'd really like to get my hands on one, but I've never actually seen one for sale. Geoworks is open source now, believe it or not, but the codebase is in terrible shape.
at 58:55, the found but missing function, port they could be the serial & parallel ports on the back, they could be a lot like GPIO on say Raspberry Pie OI pins, in that there not assigned any function, until a software, path have been set first? e.g. the port only exist when program application, knows they exist, and programmed in such a was set up ports in such a was be serial or parallel as the case may be?
The Z180 itself doesn't have any GPIOs or configurable peripherals, but the glue chip could have anything in it. If the pin direction is configurable that could actually be really useful. I have a parallel port ZIP drive that would be cool to make work.
@@hjalfi I was just calling GPIO'S as something to just call it or them, but serial & parallel ports, will not exist, until what ever is configured, so it's more than like it's some subpart part of type document app/ spreadsheet app, so until the app is loaded up, there just pins on connectors and that about all the do? there not serial or parallel port until the at logic level been programmed? as you managed getting OS level access, (cool by the way)🙂looking around the supplies app the look like could interface with ports and see, how do the there connection to port's
Hello! I tried the prebuilt img file and compiled from source but neither will boot on my Super PoweNote. It hangs after I hit return to load the CPMISH.APL disk application. Not sure what’s wrong. Great project! Would love to try it out!
Huh. File a github issue, please? Could it be you're using a 720kB disk instead of a 1440kB disk?
@@hjalfi hello! I’ve tried several 1.44mb disks and tired formatting them in DOS before hand with the same result of it hanging when trying to load it. Thank you for your reply.
@@hjalfihas anyone had success loading the GitHub file on their Super PowerNote? Not sure if it’s problem my powernote or with the GitHub files.
@@amateurtinkering2103 I have since found out that this version only works on the PN8510, and not any other PowerNote models (of which there were apparently plenty).
@@hjalfi thanks for the reply! If you’re ever able to make it work for other models then I’d give it a try again. So cool that you did this work!
Faxes are just black and white TIFF files if that helps
"which tells us 2 * 5 is 10, which i assume it is".... hmbl svt indeed.
My ability to number is... limited.
Is it work on PN-8500MDS?
It might need some tweaking --- the PN-8500MDS is very similar but does differ in a few places. If you have one, please try it?
@@hjalfi I did, it read the disk and froze. I opened it and saw that the FDC chip is different(HD63266F), but the CPU is equivalent(HD64180RF6X) and has 8Mbit of Mask ROM, 1MBIT of main RAM and 128KB of additional RAM(instead 256KB). I have no reverse engineering skills, but if I can help port to this model, I'll be very happy.
I made a rom dump from it, if you need, just ask.
glossie
52:48
WHAT !
Паскаль мы изучали в 1988 году. А компоьютер 1996 года выпуска, когда уже вышла Виндоус. Поэтому если хотите всех удивить, надо добавить памяти, но виндоус на z80 можно портировать только самую первую. Так что тут тупик. Но можно сделать пакеты компании Симантик, которые ходили до 1994 года
9V center negative is absolutely NOT unusual if you play the guitar and own any pedals...
I did not know that. Might make a good source of power supplies (although I'm guessing they're musician-branded and overpriced!).
@@hjalfi Depends, there are many alternatives; but the main problem are those pesky barrel plugs that come in a plethora of incompatible sizes.
@@hjalfi Nor is centre-negative unusual here in Japan; in my experience it's more common here than centre-positive on '80s computer equipment.
Не так прикольно, как bbc micro. Потому что нет настолько интегрированной игры в память устройства, как Елита. Но тоже ничего плохова. CP/M это просто формат файлов. Кроме того на bbc micro были уникальные опции для коммуникации, можно было загрузить программу через телетекст.
I grew up on the BBC Micro, so yeah, it was a great machine. No tape punch or reader, though! You might be interested to know that I have CP/M running on that, too...
@@hjalfi This is wonderful. I think there is a chance that in 10 years all this will be in demand for new analog chips.
I know modern technology stacks, but I can’t say anything good about them. If you need to do something well, then it is better to do it on bare metal.
@@Ignat99Ignatov I would actually like to write a CP/M-ish BDOS in C, for modern processors. It might make a decent smaller alternative to FAT for very resource-constrained systems. Sadly many of the popular low-end CPUs these days can't run code out of RAM (e.g. Atmel 8-bit), and the ones which can are boring ARM or MIPS variations. The MSP430 is still lurching along, and it's really nice, but its days are definitely numbered.
@@hjalfi I am not sure if they would be a good target, but things like Ben Eaters CPU on breadboards, or the Gigatron might be good candidates for that OS.