mirror of
https://github.com/thiagoauler/apple1.git
synced 2025-02-06 20:30:04 +00:00
adjusting I/O memory
This commit is contained in:
parent
186b7cfd58
commit
cd2b83679a
10
src/memory.c
10
src/memory.c
@ -47,24 +47,24 @@ db read_byte(dw address)
|
|||||||
// 32KB memory RAM
|
// 32KB memory RAM
|
||||||
return ram_memory[address];
|
return ram_memory[address];
|
||||||
}
|
}
|
||||||
else if (address == 0xD010 || address == 0xD0F0)
|
else if (address == 0xD010)
|
||||||
{
|
{
|
||||||
// when reading from keyboard buffer,
|
// when reading from keyboard buffer,
|
||||||
// its status control is disabled again
|
// its status control is disabled again
|
||||||
keyboard_control = 0x00;
|
keyboard_control = 0x00;
|
||||||
return keyboard_buffer;
|
return keyboard_buffer;
|
||||||
}
|
}
|
||||||
else if (address == 0xD011 || address == 0xD0F1)
|
else if (address == 0xD011)
|
||||||
{
|
{
|
||||||
return keyboard_control;
|
return keyboard_control;
|
||||||
}
|
}
|
||||||
else if (address == 0xD012 || address == 0xD0F2)
|
else if (address == 0xD012)
|
||||||
{
|
{
|
||||||
return display_buffer;
|
return display_buffer;
|
||||||
}
|
}
|
||||||
else if (address >= 0xE000 && address <= 0xEFFF)
|
else if (address >= 0xE000 && address <= 0xEFFF)
|
||||||
{
|
{
|
||||||
// AppleSoft Basic
|
// BASIC
|
||||||
address = address & 0xFFF;
|
address = address & 0xFFF;
|
||||||
return basic_memory[address];
|
return basic_memory[address];
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ void write_mem(dw address, db data)
|
|||||||
// 32KB memory RAM
|
// 32KB memory RAM
|
||||||
ram_memory[address] = data;
|
ram_memory[address] = data;
|
||||||
}
|
}
|
||||||
else if (address == 0xD012 || address == 0xD0F2)
|
else if (address == 0xD012)
|
||||||
{
|
{
|
||||||
display_buffer = data;
|
display_buffer = data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user