|
|
| version 1.36, 2012/01/23 05:18:09 | version 1.40, 2012/01/29 14:53:54 |
|---|---|
| Line 552 void MEMCALL memp_reads(UINT32 address, | Line 552 void MEMCALL memp_reads(UINT32 address, |
| void MEMCALL memp_writes(UINT32 address, const void *dat, UINT leng) { | void MEMCALL memp_writes(UINT32 address, const void *dat, UINT leng) { |
| const UINT8 *out = dat; | const UINT8 *out = (UINT8 *)dat; |
| UINT diff; | UINT diff; |
| /* fast memory access */ | /* fast memory access */ |
| Line 582 void MEMCALL memp_writes(UINT32 address, | Line 582 void MEMCALL memp_writes(UINT32 address, |
| // ---- Logical Space (BIOS) | // ---- Logical Space (BIOS) |
| static UINT32 physicaladdr(UINT32 addr, BOOL wr) { | static UINT32 MEMCALL physicaladdr(UINT32 addr, BOOL wr) { |
| UINT32 a; | UINT32 a; |
| UINT32 pde; | UINT32 pde; |
| Line 610 static UINT32 physicaladdr(UINT32 addr, | Line 610 static UINT32 physicaladdr(UINT32 addr, |
| addr = (pte & CPU_PTE_BASEADDR_MASK) + (addr & 0x00000fff); | addr = (pte & CPU_PTE_BASEADDR_MASK) + (addr & 0x00000fff); |
| return(addr); | return(addr); |
| retdummy: | retdummy: |
| return(0x01000000); // てきとーにメモリが存在しない場所 | return(0x01000000); /* XXX */ |
| } | } |
| Line 636 void MEMCALL meml_reads(UINT32 address, | Line 636 void MEMCALL meml_reads(UINT32 address, |
| void MEMCALL meml_writes(UINT32 address, const void *dat, UINT leng) { | void MEMCALL meml_writes(UINT32 address, const void *dat, UINT leng) { |
| const UINT8 *out = dat; | UINT size; |
| UINT size; | |
| if (!CPU_STAT_PAGING) { | if (!CPU_STAT_PAGING) { |
| memp_writes(address, out, leng); | memp_writes(address, dat, leng); |
| } | } |
| else { | else { |
| while(leng) { | while(leng) { |
| size = 0x1000 - (address & 0xfff); | size = 0x1000 - (address & 0xfff); |
| size = min(size, leng); | size = min(size, leng); |
| memp_writes(physicaladdr(address, TRUE), out, size); | memp_writes(physicaladdr(address, TRUE), dat, size); |
| address += size; | address += size; |
| out += size; | dat = ((UINT8 *)dat) + size; |
| leng -= size; | leng -= size; |
| } | } |
| } | } |
| Line 733 void MEMCALL memr_reads(UINT seg, UINT o | Line 732 void MEMCALL memr_reads(UINT seg, UINT o |
| void MEMCALL memr_writes(UINT seg, UINT off, const void *dat, UINT leng) { | void MEMCALL memr_writes(UINT seg, UINT off, const void *dat, UINT leng) { |
| const UINT8 *out = dat; | UINT32 addr; |
| UINT32 addr; | UINT rem; |
| UINT rem; | UINT size; |
| UINT size; | |
| while(leng) { | while(leng) { |
| off = LOW16(off); | off = LOW16(off); |
| Line 748 void MEMCALL memr_writes(UINT seg, UINT | Line 746 void MEMCALL memr_writes(UINT seg, UINT |
| size = min(size, rem); | size = min(size, rem); |
| addr = physicaladdr(addr, TRUE); | addr = physicaladdr(addr, TRUE); |
| } | } |
| memp_writes(addr, out, size); | memp_writes(addr, dat, size); |
| off += size; | off += size; |
| out += size; | dat = ((UINT8 *)dat) + size; |
| leng -= size; | leng -= size; |
| } | } |
| } | } |
| #endif | #endif |