Post by Pyrofer on Nov 28, 2016 13:43:04 GMT
So I wanted an easy way to get code onto my 128 while testing games I was developing. VICE is not accurate for the VDC so hardware testing is essential.
It turns out the 128 has a decoded address line internally that was never used, I believe it was intended for the 6551 serial chip that never went in and lead to U36 as a rom socket instead.
Anyway, my idea is such. A USB serial to parallel chip (probably using an Arduino) connected to the data lines and that decoded address line. The USB side would present as a serial port to the host PC. Any bytes sent would be visible on the 128 in the decoded address location and any bytes the 128 writes there would be sent up the USB serial line.
So far it sounds like a fast Serial connection using USB, which it essentially is. However. In U36 some rom code that checks for data in that location on boot. If it sees data present it reads it as a command byte and enters a sort of memory monitor mode.
The PC would then have serial commands that the 128 acted upon, such as "read memory location x" and the 128 would do so and return the byte as data to the PC.
It would also have "Write x bytes starting at y address", the 128 would then dump the incoming data directly into memory at the indicated start location.
This would allow the PC to read and write the whole C128's memory. Allowing the downloading of test programs directly into ram.
One final command such as "jump to location x" would allow you to run the code downloaded.
Is there any interest in such a "USB Developer cable"?
I would probably be developing it mainly for myself but would appreciate assistance from anybody better versed in assembly than myself to help with the 128 side of the code.
It turns out the 128 has a decoded address line internally that was never used, I believe it was intended for the 6551 serial chip that never went in and lead to U36 as a rom socket instead.
Anyway, my idea is such. A USB serial to parallel chip (probably using an Arduino) connected to the data lines and that decoded address line. The USB side would present as a serial port to the host PC. Any bytes sent would be visible on the 128 in the decoded address location and any bytes the 128 writes there would be sent up the USB serial line.
So far it sounds like a fast Serial connection using USB, which it essentially is. However. In U36 some rom code that checks for data in that location on boot. If it sees data present it reads it as a command byte and enters a sort of memory monitor mode.
The PC would then have serial commands that the 128 acted upon, such as "read memory location x" and the 128 would do so and return the byte as data to the PC.
It would also have "Write x bytes starting at y address", the 128 would then dump the incoming data directly into memory at the indicated start location.
This would allow the PC to read and write the whole C128's memory. Allowing the downloading of test programs directly into ram.
One final command such as "jump to location x" would allow you to run the code downloaded.
Is there any interest in such a "USB Developer cable"?
I would probably be developing it mainly for myself but would appreciate assistance from anybody better versed in assembly than myself to help with the 128 side of the code.