|
|
| version 1.5, 2003/11/29 00:36:00 | version 1.7, 2003/12/12 01:04:40 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "memory.h" | #include "cpucore.h" |
| #include "egcmem.h" | #include "egcmem.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| Line 824 REG8 MEMCALL egc_read(UINT32 addr) { | Line 824 REG8 MEMCALL egc_read(UINT32 addr) { |
| if (gdcs.access) { | if (gdcs.access) { |
| addr += VRAM_STEP; | addr += VRAM_STEP; |
| } | } |
| ad = VRAM_POS(addr); | ad = VRAMADDRMASKEX(addr); |
| ext = EGCADDR(addr & 1); | ext = EGCADDR(addr & 1); |
| egc.lastvram._b[0][ext] = mem[ad + VRAM_B]; | egc.lastvram._b[0][ext] = mem[ad + VRAM_B]; |
| egc.lastvram._b[1][ext] = mem[ad + VRAM_R]; | egc.lastvram._b[1][ext] = mem[ad + VRAM_R]; |
| Line 918 REG16 MEMCALL egc_read_w(UINT32 addr) { | Line 918 REG16 MEMCALL egc_read_w(UINT32 addr) { |
| if (gdcs.access) { | if (gdcs.access) { |
| addr += VRAM_STEP; | addr += VRAM_STEP; |
| } | } |
| ad = VRAM_POS(addr); | ad = VRAMADDRMASKEX(addr); |
| egc.lastvram.w[0] = *(UINT16 *)(&mem[ad + VRAM_B]); | egc.lastvram.w[0] = *(UINT16 *)(&mem[ad + VRAM_B]); |
| egc.lastvram.w[1] = *(UINT16 *)(&mem[ad + VRAM_R]); | egc.lastvram.w[1] = *(UINT16 *)(&mem[ad + VRAM_R]); |
| egc.lastvram.w[2] = *(UINT16 *)(&mem[ad + VRAM_G]); | egc.lastvram.w[2] = *(UINT16 *)(&mem[ad + VRAM_G]); |