Hey it was only silly old me with a bug in my video class (e.g. incrementing the memory address *before* drawing the pixels :meow_googlytrash: )
Much better. Not sure how I'm going to deal with the annoying moire effects though.
So, CPU is 80%+ implemented I guess, woot!
I'm going to focus on the Mac part for a bit probably. The floppy scares me because I can do a standard floppy controller but this one is a Woz creation, so it's probably impossible to grok for a mere human.
Here are the kinds of mistakes you make when you emulate a CPU:
- Forgot to update a flag
- Wrong register used (doh!)
- Wrong width (did a byte op but it's a word - often copy paste error)
- Borked logic (oops I thought rotate did X but it does Y)
- Behaviour of the op is unclear (What is pushed on the stack on a Line1010/1111 exception? Does the program counter point to the current instruction or the next? I had to wing it looking at how the code behaves on the other side)
Getting a weird bug deep down in the Mac initialization routines makes me regret not taking the time to make unit test for every single freaking opcode.
Yeah that would have been very time consuming.
But stepping in assembly code you don't understand looking for the moment something borks is too.
And it's probably due to a missing semicolon somewhere.
Yay software!
I'm not sure why "a lot of instructions have a .byte/.word/.long versions" didn't scream "templates!!" at me sooner, but at least I caught it before I've done everything.
Welp that's almost 500 fewer lines of copy-pasted stuff (with random bonus bugs because you forgot to set a flag in one of the three versions). And more savings as I implement the rest.
Anyone know of a better browser for 68k Macs? Something that doesn't open a long series of JavaScript errors on Google would be a start 😉
Ran my first 68000 instruction*! :fast_meow_party:
Tell me if you recognize the ROM 😆
*meaning the only instruction partially implemented at the moment.
Something something we're gonna need a bigger boat.
Well that's a bit tight. I'm not sure how I'll fit a 20-byte instruction (the maximum possible) in this... 12-byte area (the section with the dots).
And that leaves 32 characters for the disassembly... which fits most instructions but some need a bit more room too.
And then you have the pathological case, the worst possible instruction on the 68000:
MOVEM.l ($12345678).l,D0-D1/D3-D4/D6-D7/A0-A1/A3-A4/A6-A7
Fun 68000 fact, the longest instructions possible (in bytes) are... (drumroll) 20 bytes long.
This happens when you do an operation on two absolute long addresses, example:
MOVE.L ($00BEEBEE).L,($12345678).L
Gives this machine code: 23F900BEEBEE12345678 (yep, Motorola CPU, so big endian. Easier to read I guess)
And with that, I can now fully disassemble every 68000 opcode.
God that was a lot of work. :meow_bongo_keyboard:
And I'm just disassembling/decoding instructions, haven't even started emulating one thing yet!
Remember when I did the MC6809 in like a week?
Yeah... this will take longer.
(oh, and no code generation... I did it... my wayyyyy)
(also, reminder that unit tests are neat. Caught so many things... should have done that for the other CPUs)
I saw recently someone posted about using the classic mac ssheven on a PPC PowerBook and l had to give that a try. Was happy to see it's a fat binary and works on my #68k macs and the OldNet Wifi adapter on the PowerBook 180C. Comfortably upgrading the #Pihole from the couch for some totally normal computing!
Somebody restored Peter Koch's http://www.sun3zoo.de website – good to see that some of the valuable information on that site is available again (outside of archive.org). More information on Sun 3 machines can be found on https://www.sun3arc.org, of course. #retrocomputing #unix #sun #68k #motorola
https://virtuallyfun.com/2023/08/07/peters-sun3-zoo-restored/
#retrocomputing #unix #sun #68k #Motorola
@scalonnec @f4grx do you know #68k-mbc - single board computer with 68008 and PIC as I/O and ROM emulation? I’ve just assembly one and start exploring #CPM68k
Hacking the Apple Interactive Television Set Top Box System 7.1 in ROM
This article was such a great rabbit hole to fall into, and brought back lots of fond memories of hacking 68k Macs. It also helps that it is very much in depth and exceptionally well written, with nice tidbits such as this: (...)
#tv #resedit #68k #hacking #retrocomputing #nostalgia #mac #apple #rom
#tv #resedit #68k #hacking #retrocomputing #nostalgia #mac #apple #rom
Another bit of vintage mac gear is up on #ebay. This time it's an ADB Trackball - https://www.ebay.com.au/itm/256149274020 #australia #retrocomputing #68k #powerpc
#powerpc #68k #retrocomputing #australia #ebay
Anyone know an EU shop where I can get 52-pin and 84-pin PLCC to DIP or SIL adapters?