Z80-Retro / 2063-Z80-cpm

A flash boot-loader and cp/m 2.2 BIOS
GNU Lesser General Public License v2.1
40 stars 16 forks source link

Question on delay routine in sdcard.asm #2

Closed KRSynthWorx closed 1 year ago

KRSynthWorx commented 2 years ago

Hi John! Much respect for your abilities and effort with these projects. I've been working on a comprehensive monitor utility for the Z80-Retro! It sports a boot CP/M command that uses your SPI & SD card library, replacing your firmware.asm routines, and adds a bunch of memory, bank select, port and file I/O commands, breakpoints, register and stack displays and lots of other goodies. Currently it loads from the FLASH into a 4k SRAM page just below the CP/M load_base address.

I've had no issues but noticed in the lib/sdcard.asm file, SD_CMD24: function, .SD_CMD24_WDR: section that there appears to be a DEC BC (between lines 756-763) missing in the data response message delay loop. BC is tested for zero at lines 761-762 but never decremented from its initial value of 0xF000 set in line 756. I've added a DEC BC after the JR NZ,.SD_CMD24_DRC branch. I've been using a delay value of 0xAB00 which works out to about 250msec @ our 10mhz clock. Seems to work fine either way . As an 'old school' retired Electronic Systems Engineer, I'm a bit new at Github so I thought an issue message would be the best way to communicate with you.

I cannot thank you enough for the terrific projects you have been presenting this past year. I've been doing great things with my Z80-Retro! Look for a public open source release very soon of this nifty monitor for your outstanding design. I'll throw a comment down in your next YouTube video with a link to my Github if that is acceptable with you. Just a few more polishing touches to add...

Cheers!, Kenny Maytum

[Help Screen Sample] Z80-Retro! Monitor

johnwinans commented 1 year ago

Whuuuu??? I forgot to decrement eh? Well, that just means that the timeout is... a bit longer. :-D

Sure. I did not restrict posting links in comments on my channel. If it is relevant (and this DEFINITELY is) then I won't delete it.

This ROM monitor you are working on is looking really cool!

I recall thinking about creating a ROM monitor earlier on. Not sure why I decided, instead, to go right to CP/M... but it is nice that you did one!

It might make sense to link it into the "official?" retro firmware too. It might time for me to learn how to set up submodules:

https://git-scm.com/book/en/v2/Git-Tools-Submodules

It is exciting to know when someone enjoys the extra effort that goes into recording and posting these hobby projects.

Thank you for helping out,

-John

johnwinans commented 1 year ago

added decrement as discussed