mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-01 04:04:28 +00:00
Add aux memory field
This commit is contained in:
parent
8898c3e59d
commit
04854d903c
@ -124,6 +124,15 @@ typedef struct {
|
||||
*/
|
||||
vm_segment *ram2;
|
||||
|
||||
/*
|
||||
* The Apple II may have an auxiliary RAM bank; this was possible by
|
||||
* installing a card there. If you had the 80-column text card (and
|
||||
* you likely did), then you got an extra kilobyte of RAM to work
|
||||
* with; it was either used for the extra columns or you could take
|
||||
* advantage of it for extra storage otherwise.
|
||||
*/
|
||||
vm_segment *aux;
|
||||
|
||||
/*
|
||||
* The screen wherein we shall render all of our graphics.
|
||||
*/
|
||||
|
@ -39,6 +39,13 @@
|
||||
*/
|
||||
#define APPLE2_RAM2_SIZE 0x1000
|
||||
|
||||
/*
|
||||
* At the highest point (with the IIe extended 80 column text card), you
|
||||
* could have a whole other 64k of data in auxiliary memory. (Of which
|
||||
* only 1k was needed for 80 columns!)
|
||||
*/
|
||||
#define APPLE2_AUX_SIZE 0x10000
|
||||
|
||||
/*
|
||||
* This is the base address (or offset) for all bank-switched memory
|
||||
*/
|
||||
|
@ -67,8 +67,9 @@ apple2_create(int width, int height)
|
||||
// Initliaze our system ROM and separate bank-switched block of RAM
|
||||
mach->rom = vm_segment_create(APPLE2_ROM_SIZE);
|
||||
mach->ram2 = vm_segment_create(APPLE2_RAM2_SIZE);
|
||||
if (mach->rom == NULL || mach->ram2 == NULL) {
|
||||
log_critical("Could not initialize ROM / RAM2!");
|
||||
mach->aux = vm_segment_create(APPLE2_AUX_SIZE);
|
||||
if (mach->rom == NULL || mach->ram2 == NULL || mach->aux == NULL) {
|
||||
log_critical("Could not initialize ROM / RAM2 / AUX!");
|
||||
apple2_free(mach);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user