overview components memorymap downloads possibilities contact
 
ram io eprom
The Amélie project
The memory map - RAM area

2048 bytes of static RAM are provided, mapped in starting at address &0000

Page Zero (&0000-&00FF)

The provisional allocations within Page Zero are:

Watchdog (&0000)
This value is initially set to 255 (& FF) and it is continually decremented by the 50Hz ticker. Upon such time that this value ever reaches zero, the BIOS will reset all hardware, fast-flash all LEDs, and enter a recursive loop (effectively locking out the application).
At 50Hz, it will take 510 centiseconds for the watchdog to 'expire' (or about five seconds). Sometime during this period, the application must reset the watchdog to its 255 value.

BIOS area (&0001-&005F)
This area of Page Zero is reserved for use by the BIOS. Application code should not read or write any of the BIOS data. If you need to know what lies where, for any reason, then please refer to the firmware source code(s).

Vector area (&0060-&007F)
When certain events happen, the BIOS calls certain vectors. Normally these vectors will point back into the BIOS for handling, though in some cases you will be expected to pick up on the vector.
You can choose to pre-process the vector, post-process it, pre-and-post process it, or entirely replace it.
All vectors are called using JMP (indirect).


As the BIOS has not been written, it is not possible to state the processor flags or stacked data at point of vector call.

IRQ vector &0060
This is called as soon as an interrupt occurs. It is not recommended that you use this, unless you intend to completely replace Amélie's interrupt system.
Normal behaviour is to point to the BIOS interrupt dispatch code, which may call further vectors.

Ticker vector &0062
This is called every time the 50Hz ticker interrupt occurs. Code attached to this vector must be quick.
Normal behaviour is the BIOS code that maintains the ticker events, then only bit 6 of the IFR will be reset.

VIA IRQ &0064
This is called for a VIA interrupt that was not the 50Hz ticker. You use this to implement custom responses to specific events, i.e. a "panic button" or "crash" sensor. Refer to the VIA description for further details of the IFR.
Normal behaviour is for the BIOS to write zero to the IFR and return (i.e. ignoring the interrupt).

Unused1 &0066
This vector is unused, and points to the processor reset vector.

Unused2 &0068
This vector is unused, and points to the processor reset vector.

Serial RXByte &006A
This is called when the ACIA tells us a byte has been received, and is present in the ACIA's receive register.
Normal behaviour is to retrieve the byte and push it to the buffer.

Serial TXByte &006C
This is called when the ACIA tells us that the transmit buffer is empty.
Normal behaviour is to send the next byte, if there is one waiting.

Serial Other &006E
This is calls for other ACIA interrupt reasons - DCD detected, or DSR status change.
Either of these can be wired to allow Amélie to detect if a serial link is connected. Amélie holds !DTR low to signify that the serial functions are active. A suitably-wired 'basic' serial lead would connect !DTR to !DSR so that Amélie can detect if the lead is connected. Refer to the ACIA description for more details.
Normal behaviour is to clear the interrupt and return (i.e. ignoring it).

WatchFail &0070
This is called by the watchdog code immediately prior to device reset and application lock-out.
NOTE THAT THIS VECTOR SHOULD NOT BE USED INSTEAD OF RESETTING THE WATCHDOG PERIODICALLY.
Normal behaviour is to point to the watchdog handling code.

NewMin &0072
This is called when the internal time rolls over to a new minute.
In the case of new hour or new day, this vector is not called.
Normal behaviour is to do nothing.

NewHour &0074
This is called when the internal time rolls over to a new hour.
In the case of new day, this vector is not called.
Normal behaviour is to do nothing.

NewDay &0076
This is called when the internal time rolls over to a new day.
Normal behaviour is to do nothing.

Unused3-Unused6 &0078-&007E
These vectors are unused, and point to the processor reset vector.

Application area (&0080-&00BF)
This is an allocation of 64 bytes that may be used by the application code.

BIOS reserved (&00C0-&00FF)
This area is reserved for future use by the BIOS.

 

Page One (&0100-&01FF)

This area of memory is managed by the processor. The Stack Pointer is initialised at &FF (the top of the page), and from then on the processor takes care of it according to what is pushed to or pulled from the stack.

 

Page Two (&0200-&02FF)

This area of memory is reserved as the serial buffer:

96 bytes - serial output buffer
128 bytes - serial input buffer
32 bytes - serial-related data, pointers, etc

 

Page Three (&0300-&03FF)

This is entirely available for the application code.

 

Pages Four to Seven (&0400-&07FF)

This area of memory, 1024 bytes, is unallocated. If the application code has 'larger' memory requirements then it can use this space.
An alternative idea has been the ability to "upload" (via the serial port) a chunk of code, execution would then begin at &0400 . This could be used to allow patches to application code, or to test new ideas before committing to EPROM.


As only 2048 bytes of RAM are expected to be fitted, this then concludes the RAM memory mapping.

© 2005 Rick Murray