mirror of
https://github.com/thiagoauler/apple1.git
synced 2025-02-06 20:30:04 +00:00
correcting buffer for reading and writing
This commit is contained in:
parent
eb8b6656ee
commit
5332a3a9e7
18
src/memory.c
18
src/memory.c
@ -48,6 +48,8 @@ db read_byte(dw address)
|
||||
}
|
||||
else if (address == 0xD010)
|
||||
{
|
||||
// when reading from keyboard buffer,
|
||||
// its status control is disabled again
|
||||
keyboard_control = 0x00;
|
||||
return keyboard_buffer;
|
||||
}
|
||||
@ -59,10 +61,6 @@ db read_byte(dw address)
|
||||
{
|
||||
return display_buffer;
|
||||
}
|
||||
else if (address == 0xD013)
|
||||
{
|
||||
return display_control;
|
||||
}
|
||||
else if (address >= 0xFF00 && address <= 0xFFFF)
|
||||
{
|
||||
// wozmon ROM
|
||||
@ -99,22 +97,10 @@ void write_mem(dw address, db data)
|
||||
// 4KB memory RAM
|
||||
ram_memory[address] = data;
|
||||
}
|
||||
else if (address == 0xD010)
|
||||
{
|
||||
keyboard_buffer = data;
|
||||
}
|
||||
else if (address == 0xD011)
|
||||
{
|
||||
keyboard_control = data;
|
||||
}
|
||||
else if (address == 0xD012)
|
||||
{
|
||||
display_buffer = data;
|
||||
}
|
||||
else if (address == 0xD013)
|
||||
{
|
||||
display_control = data;
|
||||
}
|
||||
|
||||
// any other addressed memory will be ignored on write
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user