Porting CP/M to a Brother SuperPowerNote Z80 laptop thing

Ғылым және технология

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/davidgiven/cpmish 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.

Пікірлер: 92

  • @Lemon_Inspector
    @Lemon_Inspector5 ай бұрын

    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.

  • @Xalior

    @Xalior

    5 ай бұрын

    I have every intention of installing Wordstar on mine now! -Dx

  • @edgeeffect

    @edgeeffect

    5 ай бұрын

    @@Xalior yeah... I was going to say "we always used WoedStar as a programmer's text editor at college" ;)

  • @hjalfi

    @hjalfi

    5 ай бұрын

    @@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.

  • @Xalior

    @Xalior

    5 ай бұрын

    @@hjalfionce it’s delivered we can find out :)

  • 5 ай бұрын

    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!

  • @Maxjoker98
    @Maxjoker985 ай бұрын

    That's awesome. Another brand-new CP/M port in 2023 :O

  • @stevejohnson1685
    @stevejohnson16854 ай бұрын

    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!

  • @hjalfi

    @hjalfi

    4 ай бұрын

    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...

  • @stupossibleify
    @stupossibleify5 ай бұрын

    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.

  • @piwex69
    @piwex694 ай бұрын

    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.

  • @edgeeffect
    @edgeeffect5 ай бұрын

    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!

  • @edgeeffect

    @edgeeffect

    5 ай бұрын

    Just to clarify... that was a "Turbo Pascal Yummy" comment, not a "Turbo Pascal Yeuck" comment. :)

  • @BigA1
    @BigA15 ай бұрын

    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.

  • @stephendouglas684
    @stephendouglas6845 ай бұрын

    This was brilliant! One of my favorite retrocomputing videos in recent memory. Subscribed!

  • @cocusar
    @cocusar5 ай бұрын

    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!

  • @Xalior
    @Xalior5 ай бұрын

    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

  • @alextrusty2585
    @alextrusty25855 ай бұрын

    I always get stunned when you do such things!

  • @atv22314
    @atv22314Ай бұрын

    another amazing installation of your adventures. love the content. thank you.

  • @JamesStormes
    @JamesStormes5 ай бұрын

    Outstanding. I have alway wanted a portable CP/M machine. I just ordered one off of eBay. I hope to follow in your footsteps.

  • @jcsdotorg
    @jcsdotorg5 ай бұрын

    Great work David! Now I'll have to buy another one :)

  • @bluefunkt
    @bluefunkt4 ай бұрын

    Really clever reverse engineering, cunning programming!

  • @AnttiBrax
    @AnttiBrax5 ай бұрын

    Surprisingly captivating!

  • @lindoran
    @lindoran5 ай бұрын

    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.

  • @moshixmainframechannel
    @moshixmainframechannel5 ай бұрын

    Finally. I thought it would never come.

  • @JamesStormes
    @JamesStormes5 ай бұрын

    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.

  • @TheEvertw
    @TheEvertw5 ай бұрын

    The golden days of hobby computing!

  • @boelwerkr
    @boelwerkr5 ай бұрын

    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.

  • @andreasbaumann6943
    @andreasbaumann69435 ай бұрын

    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). :-)

  • @kreuner11

    @kreuner11

    5 ай бұрын

    Or displaying it as a qr code on the screen

  • @FirstWizardZorander

    @FirstWizardZorander

    5 ай бұрын

    Yeah, that bit-banging is exactly the kind of out-of-the-box thinking I love to find in these kinds of videos. Subscribed!

  • @alexandermirdzveli3200
    @alexandermirdzveli32005 ай бұрын

    Thank you for 77 minutes of ecstasy!

  • @TSteffi
    @TSteffi2 ай бұрын

    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.

  • @hjalfi

    @hjalfi

    Ай бұрын

    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...

  • @TSteffi

    @TSteffi

    Ай бұрын

    @@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.

  • @0toleranz
    @0toleranz5 ай бұрын

    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. KZread does a fantastic you of compressing all the details away 😅. Thanx.

  • @yereverluvinuncleber
    @yereverluvinuncleber5 ай бұрын

    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.

  • @dhpbear2
    @dhpbear25 ай бұрын

    1:02:43 - I'm guessing that code is for de-bouncing the keys.

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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.

  • @retronoobtech8551
    @retronoobtech85515 ай бұрын

    it's just unfair, your channel deserves more subscribers!

  • @HammysHangout
    @HammysHangout4 ай бұрын

    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?

  • @hjalfi

    @hjalfi

    4 ай бұрын

    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.

  • @RatcheT2497
    @RatcheT24975 ай бұрын

    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.

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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.

  • @PiotrMichniewski
    @PiotrMichniewski5 ай бұрын

    Oooooh, GKrellM! I also had the fish tank plugin :)

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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.

  • @PiotrMichniewski

    @PiotrMichniewski

    5 ай бұрын

    @@hjalfi Hmmmm... I should port it to a usb-connected LCD screen someday...

  • @johnwuethrich4196
    @johnwuethrich41964 ай бұрын

    Should load ti 84 or 86 os

  • @turbinegraphics16
    @turbinegraphics165 ай бұрын

    Interesting way to find data using gimp.

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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.

  • @dh2032
    @dh20325 ай бұрын

    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?

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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.

  • @dh2032

    @dh2032

    5 ай бұрын

    @@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

  • @alextrusty2585
    @alextrusty25855 ай бұрын

    So, this system has bitmap graphics - don't you consider designing a GSX driver for it? And, may be, even backport GEM...

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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.

  • @alextrusty2585

    @alextrusty2585

    5 ай бұрын

    @@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...

  • @hjalfi

    @hjalfi

    5 ай бұрын

    @@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.

  • @alextrusty2585

    @alextrusty2585

    5 ай бұрын

    @@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.

  • @geleefail
    @geleefail5 ай бұрын

    ich habe nichts verstanden und bin doch begeistert. thx

  • @ItaloPenna
    @ItaloPenna4 ай бұрын

    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...

  • @hjalfi

    @hjalfi

    4 ай бұрын

    Every time I look at it I find a new bug.

  • @jonwilliams8279
    @jonwilliams82795 ай бұрын

    Faxes are just black and white TIFF files if that helps

  • @i93sme
    @i93sme5 ай бұрын

    Ha. Wordperfect. Never seen this for a long long time

  • @0toleranz

    @0toleranz

    5 ай бұрын

    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.

  • @dhpbear2
    @dhpbear25 ай бұрын

    46:30 - Another solution is 'bit-banging'!

  • @amateurtinkering2103
    @amateurtinkering21034 ай бұрын

    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!

  • @hjalfi

    @hjalfi

    4 ай бұрын

    Huh. File a github issue, please? Could it be you're using a 720kB disk instead of a 1440kB disk?

  • @amateurtinkering2103

    @amateurtinkering2103

    4 ай бұрын

    @@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.

  • @amateurtinkering2103

    @amateurtinkering2103

    4 ай бұрын

    @@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.

  • @hjalfi

    @hjalfi

    4 ай бұрын

    @@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).

  • @amateurtinkering2103

    @amateurtinkering2103

    4 ай бұрын

    @@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!

  • @blackghost7263
    @blackghost72635 ай бұрын

    I thought these were x86 based? Ran PC Geos and bundled with BrotherWorks.

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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.

  • @chrisblum8358
    @chrisblum83585 ай бұрын

    "which tells us 2 * 5 is 10, which i assume it is".... hmbl svt indeed.

  • @hjalfi

    @hjalfi

    5 ай бұрын

    My ability to number is... limited.

  • @marcosbatista1574
    @marcosbatista157429 күн бұрын

    Is it work on PN-8500MDS?

  • @hjalfi

    @hjalfi

    28 күн бұрын

    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?

  • @marcosbatista1574

    @marcosbatista1574

    28 күн бұрын

    @@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.

  • @marcosbatista1574

    @marcosbatista1574

    28 күн бұрын

    I made a rom dump from it, if you need, just ask.

  • @Controllerhead
    @Controllerhead5 ай бұрын

    glossie

  • @Ignat99Ignatov
    @Ignat99Ignatov5 ай бұрын

    Паскаль мы изучали в 1988 году. А компоьютер 1996 года выпуска, когда уже вышла Виндоус. Поэтому если хотите всех удивить, надо добавить памяти, но виндоус на z80 можно портировать только самую первую. Так что тут тупик. Но можно сделать пакеты компании Симантик, которые ходили до 1994 года

  • @Ignat99Ignatov
    @Ignat99Ignatov5 ай бұрын

    Не так прикольно, как bbc micro. Потому что нет настолько интегрированной игры в память устройства, как Елита. Но тоже ничего плохова. CP/M это просто формат файлов. Кроме того на bbc micro были уникальные опции для коммуникации, можно было загрузить программу через телетекст.

  • @hjalfi

    @hjalfi

    5 ай бұрын

    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...

  • @Ignat99Ignatov

    @Ignat99Ignatov

    5 ай бұрын

    @@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.

  • @hjalfi

    @hjalfi

    5 ай бұрын

    @@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.

  • @JamesStormes

    @JamesStormes

    5 ай бұрын

    @@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.

  • @stefanhennig
    @stefanhennig5 ай бұрын

    9V center negative is absolutely NOT unusual if you play the guitar and own any pedals...

  • @hjalfi

    @hjalfi

    5 ай бұрын

    I did not know that. Might make a good source of power supplies (although I'm guessing they're musician-branded and overpriced!).

  • @stefanhennig

    @stefanhennig

    5 ай бұрын

    @@hjalfi Depends, there are many alternatives; but the main problem are those pesky barrel plugs that come in a plethora of incompatible sizes.

  • @Curt_Sampson

    @Curt_Sampson

    4 ай бұрын

    @@hjalfi Nor is centre-negative unusual here in Japan; in my experience it's more common here than centre-positive on '80s computer equipment.

Келесі