Wayne,
Z80retro is a Z80 designed by John Winans and there are several dozen well-done YouTube videos (John's Basement channel) explained the design in details, so there are general interests in this Z80 design which has a 10MHz Z80 with 512K RAM, 128K flash and SD card, and design information are available on
GitHub. I know RomWBW support a "Z80Retro", but that's Peter Wilson's design which is not the same as John Winans'.
I'm trying to port RomWBW to John Winans' Z80retro, but I ran into a problem: the bank register and SD bit-bang controls are on the same IO register. The register is write-only, so the current bank value need to be stored in HBIOS memory somewhere. Everytime I write to bank register, I need to append the inactive state values of the SD bitbang controls and everytime I bit-bang the SD, I need to make sure the current bank register value is append to SD bitbang controls. This actually all worked and I'm able to reach RomWBW's sign-on screen. RomWBW is able to initialize the SD card and reported the correct type and size of the card. So that's all good...
Now, the problem I'm having is CP/M. When I load CP/M with 'c' command, it hangs. I think the reason is because the current bank reg value is not passed to CBIOS, so when CP/M manipulate the bit-bang SD, it didn't append the current bank value and the program crashed. My question is how does RomWBW handles situation where bank register and SD bit-bang controls are on the same register and how that information is passed to CBIOS so its SD read/write routine can also deal with this combined bank_reg+SD_bit_bang register? Below is the RomWBW signon message:
-------------------------------------------------------------------------------
Boot [H=Help]: r
Restarting System...
RomWBW HBIOS v3.5.0-dev.20, 2024-09-09
Z80Retro [Z80RETRO_std] Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 2, ZRC MMU
0KB ROM, 512KB RAM, HEAP=0x54D7
CTC: IO=0x40 NOT PRESENT
SIO0: IO=0x32 SIO MODE=38400,8,N,1
SIO1: IO=0x33 SIO MODE=38400,8,N,1
MD: UNITS=2 ROMDISK=0KB RAMDISK=256KB
SD: MODE=Z80R IO=0x10 DEVICES=1
SD0: SDHC NAME=TEAM BLOCKS=0x00EE2000 SIZE=7620MB
Unit Device Type Capacity/Mode
---------- ---------- ---------------- --------------------
Char 0 SIO0: RS-232 38400,8,N,1
Char 1 SIO1: RS-232 38400,8,N,1
Disk 0 MD0: RAM Disk 256KB,LBA
Disk 1 MD1: ROM Disk 0KB,LBA
Disk 2 SD0: SD Card 7620MB,LBA
Z80Retro [Z80RETRO_std] Boot Loader
Boot [H=Help]: c
Loading CP/M 2.2...
CBIOS v3.5.0-dev.20 [WBW]It hangs here.