On 11/16/2024 10:04 AM, Royce Taft wrote:
Any recommendations on where to post updates? Should I just start a new thread 
here? Or start a thread in the Slabtop Computers Discord server?
Discord is a good place to ask questions and discuss items, but I think updates are best done on a discussion forum or here, this thread is fine.  Lists like this and forums are indexed, and so your updates will reach a larger audience and survive time better.

Here’s a quick update:

The boot ROM disassembled nicely in Ghidra. It was handy labeling each part of 
the memory and I/O maps with their function, and using the FDC and CRTC 
controller’s datasheets to resolve exactly what is done when certain registers 
are read or written with specific data. I’m still working off a lot of 
assumptions, and many of the labels I’ve appended are educated guesses at best.
IMpressive

The ROM routine initializes some hardware and zeros out and sets up some data 
in RAM2, then it copies a decent section of data to RAM2. This data is actually 
program code, and once it’s copied to RAM, the program jumps to run it. One of 
the first things the program in RAM2 does is hit the bank select register so 
ROM is no longer in the picture, and RAM1 is swapped into its place in the 
memory map. From here on out, the system is running code from RAM. Easy for us 
to modify with our own code running from a custom boot disk!
Nice!

I identified the routine which reads 256 bytes of data contained in sector 1 of 
track 0. That sector contains the IPL for the system.  According to the 
spreadsheet in Steve Adolph’s files, the first 128 bytes of that sector contain 
disk basic IPL, and the second 128 bytes contains DOS IPL. I’m in total 
agreement with that assessment. Once sector 1 is read and stored into RAM, the 
system checks to see that this is indeed a valid boot sector by comparing the 
last byte of the data read from the sector to 0x4b. Prior to reading the disk, 
that location in memory is either 0 or uninitialized. Once a proper boot disk 
sector 1 is read, that location in memory will contain 0x4b. Once this is true, 
the system jumps to run the code which came from the second 128 bytes of the 
boot disk sector 1, which is the DOS IPL. I copied the sector 1 bytes from the 
DAT files extracted from the disk image by Steve Adolph (disk basic IPL + DOS 
IPL) into memory in Ghidra at the correct location, and it disassembled the DOS 
IPL! After that, I needed a little break. I’ll get back to it soon.
That's a lot!

I identified routines which display text on the screen prompting the user to 
insert a disk, and also found routines to display the various error conditions 
such as a non system disk inserted, drive didn’t seek to track 0, no index 
pulse, etc.  Returning from a CALL with the carry flag set appears to indicate 
a failure of the process for drive control or disk reading.

There are a number of various pointers in RAM which are modified to contain 
different addresses based on certain conditions, and there are even small 
portions of self modifying code, actually changing an upcoming instruction 
based on certain conditions. The engineers took full advantage of the code 
running from RAM. It’s a lot for me to follow.

I’m not sure I’m experienced enough to be “the” person attempting to 
disassemble and make modifications to the code, but I’m certainly capable of 
learning.
I'm also new at this environment, but lots of folks here are more knowledgeable, and we can all assist.  I can help with designing a PCB and such.

Is there a good place for me to share the Ghidra files for others to poke 
around to learn or assist?  I’m a noobie with git (and Z80 code), but I’m not 
so embarrassed by my inexperience to shy away from sharing my work.

A long time ago, I decided that I was not going to be bothered by my inexperience in sharing stuff like this online.  I think GitHub (or GitLab or BitBucket, etc.) are good to use, and allow many folks to collaborate on these.  I use GitHub, and then use git on my PC (I run Windows, but Linux/Mac work fine as well), and it is pretty easy to make changes locally and "push" those to the archive online.  I think that's best.

I am happy to host the repo on github.com/go4retro/<projectname> and add you as a collaborator (and I'd be happy to get on discord chat/video and walk you through how to easily sync local stuff and the online repo so it's not a source of stress).

Jim


--
RETRO Innovations, Contemporary Gear for Classic Systems
www.go4retro.com
store.go4retro.com

Reply via email to