[Coco] CoCo 512K EEPROM+External Controller Walkthrough (Final)
Chad H
chadbh74 at hotmail.com
Fri Nov 20 21:31:28 EST 2015
Thanks. While I understand what you are getting at, off the top of my head I'm not sure how I would proceed with that. Hardware speaking, the remote controller is already capable of monitoring SCS line triggers. The sketch I made only uses about 25% roughly of the available 32K flash space on the Atmega 328 microcontroller, so there is plenty of room for users to customize their software to add features and/or change behaviors. The .BIN loader code that is attached to the beginning of each 8K section of .BIN files triggers the SCS line at the end of each 8K so that the next 8K can be loaded. I will paste that source code below. I suppose someone a lot more clever than I could do some assembly coding and special coding on the Arduino controller side to perform more advanced switching functions like you are speaking about. The key would of course be making the software on both ends able to communicate the intent of the required action when the SCS line is triggered. I can imagine special Arduino code for a specific program or mult-program combination (multi-cart) that might allow 2 programs to work together, though I'm not sure how one would make this into a 'universal' code. If there are other lines on the cartridge bus that would need to be monitored then hardware changes would need to be made to allow that. Neither the EEPROM cartridge board nor the external controller is reading/writing CPU registors, CoCo memory locations, etc. With the existing hardware configuration, I doubt that functionality would be possible.
.BIN loader code used in my Multi-Bank Builder Tool ...
; Code contributed by William Astle - Thank you very much!
*.BIN single/multisegment bootloader for ROM Pak
SEGCNT equ 0
org $C000
LDX #PAYLOAD ; point to start of binary payload
CLR SEGCNT ; initialize the segment counter
NEXTBLK BSR FETCH ; get a byte
BNE POST ; br if postamble
BSR FETCH ; fetch MSB of length
TFR B,A ; put it somewhere useful
BSR FETCH ; fetch LSB of length
TFR D,Y ; save length counter
BSR FETCH ; fetch MSB of address
TFR B,A ; save it
BSR FETCH ; fetch LSB of address
TFR D,U ; put it in a pointer
NBYTE BSR FETCH ; fetch data byte
STB ,U+ ; save it at destination
LEAY -1,Y ; done block?
BNE NBYTE ; brif not
BRA NEXTBLK ; go handle next "amble"
POST BSR FETCH ; eat unneeded length
BSR FETCH
BSR FETCH ; get MSB of exec address
TFR B,A ; save it
BSR FETCH ; get LSB of exec address
TFR D,X ; put it in a pointer
JMP ,X ; transfer control to it
FETCH CMPX #$DFFF ; end of block?
BLO FETCH1 ; brif not
LDX #PAYLOAD ; reset to start of payload area
INC SEGCNT ; bump segment number
FETCH0 LDB $FF40 ; trigger segment flip
LDB $DFFF ; get segment that's loaded
CMPB SEGCNT ; does it match?
BNE FETCH0 ; brif not
FETCH1 LDB ,X+ ; fetch byte
RTS
PAYLOAD FCB 255
- Chad H
http://sites.google.com/site/cbhlab101/
-----Original Message-----
From: Ron [mailto:ron at kdomain.org]
Sent: Friday, November 20, 2015 8:12 PM
To: Chad H
Subject: re: [Coco] CoCo 512K EEPROM+External Controller Walkthrough (Final)
Hi Chad,
I've been watching your progress with this and really enjoyed the recent video you posted. I am interested in purchasing one of these, however, I would like the programmer (FT-232) as well.
What would the entire assembled package cost?
One other question (and please excuse my ignorance as I'm not very knowledgeable about hardware design) but would there ever be the possibility of evolving this project into some sort of "virtual" MPI?
The ability to use features of 2 different carts at the same time (i.e.
like a DISK ROM and something else)?
Thanks so much for your time.
-Ron
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7227 / Virus Database: 4460/11030 - Release Date: 11/19/15
More information about the Coco
mailing list