Skip to content

Commit

Permalink
624 drystones
Browse files Browse the repository at this point in the history
  • Loading branch information
xrip committed Dec 3, 2023
1 parent 69a62ef commit 8843414
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ INLINE uint16_t read86rom16(uint32_t addr32) {
return 0;
}

INLINE uint8_t read86video_ram(uint32_t addr32) {
__always_inline uint8_t read86video_ram(uint32_t addr32) {
if(videomode >= 0x0D)
return VIDEORAM[addr32 - VIDEORAM_START32 + ega_plane * 16000];
return VIDEORAM[addr32 - VIDEORAM_START32];
Expand Down Expand Up @@ -705,11 +705,7 @@ INLINE uint16_t read86sdcard16(uint32_t addr32) {
#endif

// https://docs.huihoo.com/gnu_linux/own_os/appendix-bios_memory_2.htm
uint8_t read86(uint32_t addr32) {
if (addr32 >= VIDEORAM_START32 && addr32 < VIDEORAM_END32) {
// video RAM range
return read86video_ram(addr32);
}
uint8_t __time_critical_func(read86)(uint32_t addr32) {
#if PICO_ON_DEVICE
if (PSRAM_AVAILABLE) {
return read86psram(addr32);
Expand All @@ -722,6 +718,10 @@ uint8_t read86(uint32_t addr32) {
if (addr32 < RAM_SIZE) {
return RAM[addr32];
}
if (addr32 >= VIDEORAM_START32 && addr32 < VIDEORAM_END32) {
// video RAM range
return read86video_ram(addr32);
}
if (addr32 < CONVENTIONAL_END) {
// Conventional (no RAM in this space)
return 0;
Expand Down

0 comments on commit 8843414

Please sign in to comment.