[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I add firmware to a card?



Hi Tristan,
 
"Tristan Mumford" <xtristan.xmumford@xgmail.xcom> wrote in message news:459ced79$0$38159$c30e37c6@lon-reader.news.telstra.net...
 
> Can I ask a bit more about the 256 byte memory area?
> It's been mentioned that banking it is an option. What's the best method?
> Because I will need more than this.
 
As Michael mentioned in another post, if you use the "banked" (or shared)
$C800-$CFFF area, you need some extra componentry.
The circuitry required to support the banked area is fairly well covered in the
//e reference manual : http://www.apple-iigs.info/doc/docii.htm
(Mon Dieu! C'est en Francais!)
The "Understanding the Apple2" book covers the topic to death aswell (IIRC).
 
The 256 byte area $CN00-$CNFF, where N is your slot number on the other
hand belongs solely to your card.
 
This small area is not necessarily a barrier, you could have a very large driver
if you are happy to switch parts of it in 256bytes at a time.
 
Imagine that you had built the Flash card in my project and you had it in slot#2.
If you had Bank00 of the Flash chip switched in to the $C200 space, and executed
the following code:
 
C200: A9 01           LDA #$01
C202: 8D A0 C0     STA $C0A0; set high order address lines to 01 plus set /OE low for read.
C205:......
 
The STA instruction has switched in Bank01 of the Flash chip.
The next instruction at $C205 will come from $000105 in the Flash chip.
 
You would jump back to Bank00 in a similar way by writing $00 to $C0A0.
Small overhead really, for an extra 250 bytes of driver code space.
 
The Apple 2C uses a very similar method to switch its Banks of ROM in and out:
Writes to $C028 switch between banks. There are some routines around $C780
(which exist in both banks of the ROM) to allow easy jumping back and forth
between ROM banks.
Fire up a 2c emulator and check it out if you don't have a real one.

>
> I don't see why it would be much harder to load raw data ( no fs) from a USB
> mass storage device than the loading dos image example you so courteously
> made.
> Just as a first test. Know what I mean? Anyway it's not hard to write raw
> data to USB mass storage in linux to shove into the apple.
The Apple is not fast enough to act as a USB host (I don't think so at least),
you will need an extra uController on an interface card.
Here is a firmware only version for the AVR:
http://www.obdev.at/products/avrusb/index.html
Even USB 1.1 requires an AVR running at 12MHz to implement in firmware.
 
Compact flash is probably easiest, though that has already been done....
 
SD cards look interesting, cheap, easy to interface.
You may have noticed the SD interface mini board on futurlec for $6.90 ?
 
 
Red