fix expansion RAM handling and Unhandled Read From Expansion Space alerts

Tue, 28 Dec 2010 18:36:39 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Tue, 28 Dec 2010 18:36:39 +0000
changeset 65
dc28926b353c
parent 64
5005879cb6fc
child 66
8ca92162fa89

fix expansion RAM handling and Unhandled Read From Expansion Space alerts

src/memory.c file | annotate | diff | revisions
     1.1 --- a/src/memory.c	Tue Dec 28 18:19:48 2010 +0000
     1.2 +++ b/src/memory.c	Tue Dec 28 18:36:39 2010 +0000
     1.3 @@ -489,7 +489,8 @@
     1.4  					case 0xD40000:		// Expansion slot 5
     1.5  					case 0xD80000:		// Expansion slot 6
     1.6  					case 0xDC0000:		// Expansion slot 7
     1.7 -						fprintf(stderr, "NOTE: RD32 from expansion card space, addr=0x%08X\n", address);
     1.8 +						fprintf(stderr, "NOTE: RD%d from expansion card space, addr=0x%08X\n", bits, address);
     1.9 +						handled = true;
    1.10  						break;
    1.11  				}
    1.12  				break;
    1.13 @@ -713,7 +714,7 @@
    1.14  		if (newAddr <= 0x1fffff) {
    1.15  			WR32(state.base_ram, newAddr, state.base_ram_size - 1, value);
    1.16  		} else {
    1.17 -//			WR32(state.exp_ram, newAddr - 0x200000, state.exp_ram_size - 1, value);
    1.18 +			WR32(state.exp_ram, newAddr - 0x200000, state.exp_ram_size - 1, value);
    1.19  		}
    1.20  	} else if ((address >= 0x400000) && (address <= 0x7FFFFF)) {
    1.21  		// I/O register space, zone A
    1.22 @@ -754,7 +755,7 @@
    1.23  		if (newAddr <= 0x1fffff) {
    1.24  			WR16(state.base_ram, newAddr, state.base_ram_size - 1, value);
    1.25  		} else {
    1.26 -//			WR16(state.exp_ram, newAddr - 0x200000, state.exp_ram_size - 1, value);
    1.27 +			WR16(state.exp_ram, newAddr - 0x200000, state.exp_ram_size - 1, value);
    1.28  		}
    1.29  	} else if ((address >= 0x400000) && (address <= 0x7FFFFF)) {
    1.30  		// I/O register space, zone A
    1.31 @@ -795,7 +796,7 @@
    1.32  		if (newAddr <= 0x1fffff) {
    1.33  			WR8(state.base_ram, newAddr, state.base_ram_size - 1, value);
    1.34  		} else {
    1.35 -//			WR8(state.exp_ram, newAddr - 0x200000, state.exp_ram_size - 1, value);
    1.36 +			WR8(state.exp_ram, newAddr - 0x200000, state.exp_ram_size - 1, value);
    1.37  		}
    1.38  	} else if ((address >= 0x400000) && (address <= 0x7FFFFF)) {
    1.39  		// I/O register space, zone A