CBIOS Fixes
I have been working through Grant Searle's cbios.asm and comparing that to my cbios.asm. I found tree coding errors:
- Incomplete disk parameters.
- Stack pointer location not properly set after boot.
- Cold boot system reload, source and destination swapped.
DDT is my new friend
DDT is the Digital Research's CP/M Dynamic Debugging Tool. As exiting DDT crashed my system, it was not my favourite program. But this time I used it to trace exit from DDT and find why my system crashed. It is now one of my favourite programs.
Clear To Send (CTS)
My soft-coded serial is half duplex (i.e. cannot transmit and receive at the same time). It works well enough for a human typing but not for anything serious. Basically, if the interrupts are disabled I also need to disable CTS (e.i. set CTS HIGH).
Looking at my schematic, the best way to do this via the OUT instructions. Perhaps re-purposing "P5", the port configuration is:
- D0 -> P0
- D1 -> P1
- D2 -> P2
- D3 -> P3
- D4 -> P5
- D5 -> P5 -> CTS
- D6 -> DSK0
- D1-> DSK1
This port configuration can access 4 disks of 2 Mb each, with CTS the disks will be reduced to 1 Mb each.
So I can jump a wire between "P5" and "CTS".
Programming wise, I need to keep a record of port setting and clear/set P5 each time CBIOS sets and clears the interrupts.
Uploading HEX files
When CTS is working I can upload HEX files using:
- A:PIP TEST.HEX=CON:
- ^D
And the "Send RAW File" option in gtkterm.
After that HEX file can be converted into a COM file using LOAD.COM.
But CTS it is not working 100% yet.
Is Single Character Control With CTS Possible?
It seems to me that CTS is not acknowledge by the USB2Serial converter immediately. Two or three characters are send after CTS is disabled (goes TTL high).
This pretty well means it can only be used to control the receive buffer level.
This also means that CP/M transmitted characters have to go into a buffer and transmitted later. The "transmit buffer" is easy, but the "transmit later" is awkward?
How do I do that without extra hardware (i.e. a timer and an interrupt or some other type of polling)?
At this point I, without hardware assistance, uploading HEX files via a standard terminal and my CP/M machine is not possible. I have to use an UART.
Project Files
I will have to update the projects files as well.
AlanX
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.