fix ROMLMAP handling

Thu, 02 Dec 2010 20:19:20 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Thu, 02 Dec 2010 20:19:20 +0000
changeset 35
391318413bb2
parent 34
e8ebd433270a
child 36
746fb8d0653e

fix ROMLMAP handling

src/main.c file | annotate | diff | revisions
     1.1 --- a/src/main.c	Thu Dec 02 19:30:46 2010 +0000
     1.2 +++ b/src/main.c	Thu Dec 02 20:19:20 2010 +0000
     1.3 @@ -243,37 +243,55 @@
     1.4  				data = RD32(state.vram, address, 0x7FFF);
     1.5  				break;
     1.6  			case 0x030000:				// Bus Status Register 0
     1.7 +				break;
     1.8  			case 0x040000:				// Bus Status Register 1
     1.9 +				break;
    1.10  			case 0x050000:				// Phone status
    1.11 +				break;
    1.12  			case 0x060000:				// DMA Count
    1.13 +				break;
    1.14  			case 0x070000:				// Line Printer Status Register
    1.15 +				break;
    1.16  			case 0x080000:				// Real Time Clock
    1.17 +				break;
    1.18  			case 0x090000:				// Phone registers
    1.19  				switch (address & 0x0FF000) {
    1.20  					case 0x090000:		// Handset relay
    1.21  					case 0x098000:
    1.22 +						break;
    1.23  					case 0x091000:		// Line select 2
    1.24  					case 0x099000:
    1.25 +						break;
    1.26  					case 0x092000:		// Hook relay 1
    1.27  					case 0x09A000:
    1.28 +						break;
    1.29  					case 0x093000:		// Hook relay 2
    1.30  					case 0x09B000:
    1.31 +						break;
    1.32  					case 0x094000:		// Line 1 hold
    1.33  					case 0x09C000:
    1.34 +						break;
    1.35  					case 0x095000:		// Line 2 hold
    1.36  					case 0x09D000:
    1.37 +						break;
    1.38  					case 0x096000:		// Line 1 A-lead
    1.39  					case 0x09E000:
    1.40 +						break;
    1.41  					case 0x097000:		// Line 2 A-lead
    1.42  					case 0x09F000:
    1.43  						break;
    1.44  				}
    1.45  				break;
    1.46  			case 0x0A0000:				// Miscellaneous Control Register
    1.47 +				break;
    1.48  			case 0x0B0000:				// TM/DIALWR
    1.49 +				break;
    1.50  			case 0x0C0000:				// CSR
    1.51 +				break;
    1.52  			case 0x0D0000:				// DMA Address Register
    1.53 +				break;
    1.54  			case 0x0E0000:				// Disk Control Register
    1.55 +				break;
    1.56  			case 0x0F0000:				// Line Printer Data Register
    1.57  				break;
    1.58  		}
    1.59 @@ -307,6 +325,33 @@
    1.60  						break;
    1.61  					case 0x030000:		// [ef][3b]xxxx ==> Real Time Clock data bits
    1.62  						break;
    1.63 +					case 0x040000:		// [ef][4c]xxxx ==> General Control Register
    1.64 +						switch (address & 0x077000) {
    1.65 +							case 0x040000:		// [ef][4c][08]xxx ==> EE
    1.66 +								break;
    1.67 +							case 0x041000:		// [ef][4c][19]xxx ==> P1E
    1.68 +								break;
    1.69 +							case 0x042000:		// [ef][4c][2A]xxx ==> BP
    1.70 +								break;
    1.71 +							case 0x043000:		// [ef][4c][3B]xxx ==> ROMLMAP
    1.72 +								break;
    1.73 +							case 0x044000:		// [ef][4c][4C]xxx ==> L1 MODEM
    1.74 +								break;
    1.75 +							case 0x045000:		// [ef][4c][5D]xxx ==> L2 MODEM
    1.76 +								break;
    1.77 +							case 0x046000:		// [ef][4c][6E]xxx ==> D/N CONNECT
    1.78 +								break;
    1.79 +							case 0x047000:		// [ef][4c][7F]xxx ==> Whole screen reverse video
    1.80 +								break;
    1.81 +						}
    1.82 +					case 0x050000:		// [ef][5d]xxxx ==> 8274
    1.83 +					case 0x060000:		// [ef][6e]xxxx ==> Control regs
    1.84 +						switch (address & 0x07F000) {
    1.85 +							default:
    1.86 +								break;
    1.87 +						}
    1.88 +						break;
    1.89 +					case 0x070000:		// [ef][7f]xxxx ==> 6850 Keyboard Controller
    1.90  					default:
    1.91  						fprintf(stderr, "NOTE: RD32 from undefined E/F-block address 0x%08X", address);
    1.92  				}
    1.93 @@ -351,37 +396,55 @@
    1.94  				data = RD16(state.vram, address, 0x7FFF);
    1.95  				break;
    1.96  			case 0x030000:				// Bus Status Register 0
    1.97 +				break;
    1.98  			case 0x040000:				// Bus Status Register 1
    1.99 +				break;
   1.100  			case 0x050000:				// Phone status
   1.101 +				break;
   1.102  			case 0x060000:				// DMA Count
   1.103 +				break;
   1.104  			case 0x070000:				// Line Printer Status Register
   1.105 +				break;
   1.106  			case 0x080000:				// Real Time Clock
   1.107 +				break;
   1.108  			case 0x090000:				// Phone registers
   1.109  				switch (address & 0x0FF000) {
   1.110  					case 0x090000:		// Handset relay
   1.111  					case 0x098000:
   1.112 +						break;
   1.113  					case 0x091000:		// Line select 2
   1.114  					case 0x099000:
   1.115 +						break;
   1.116  					case 0x092000:		// Hook relay 1
   1.117  					case 0x09A000:
   1.118 +						break;
   1.119  					case 0x093000:		// Hook relay 2
   1.120  					case 0x09B000:
   1.121 +						break;
   1.122  					case 0x094000:		// Line 1 hold
   1.123  					case 0x09C000:
   1.124 +						break;
   1.125  					case 0x095000:		// Line 2 hold
   1.126  					case 0x09D000:
   1.127 +						break;
   1.128  					case 0x096000:		// Line 1 A-lead
   1.129  					case 0x09E000:
   1.130 +						break;
   1.131  					case 0x097000:		// Line 2 A-lead
   1.132  					case 0x09F000:
   1.133  						break;
   1.134  				}
   1.135  				break;
   1.136  			case 0x0A0000:				// Miscellaneous Control Register
   1.137 +				break;
   1.138  			case 0x0B0000:				// TM/DIALWR
   1.139 +				break;
   1.140  			case 0x0C0000:				// CSR
   1.141 +				break;
   1.142  			case 0x0D0000:				// DMA Address Register
   1.143 +				break;
   1.144  			case 0x0E0000:				// Disk Control Register
   1.145 +				break;
   1.146  			case 0x0F0000:				// Line Printer Data Register
   1.147  				break;
   1.148  		}
   1.149 @@ -415,8 +478,35 @@
   1.150  						break;
   1.151  					case 0x030000:		// [ef][3b]xxxx ==> Real Time Clock data bits
   1.152  						break;
   1.153 +					case 0x040000:		// [ef][4c]xxxx ==> General Control Register
   1.154 +						switch (address & 0x077000) {
   1.155 +							case 0x040000:		// [ef][4c][08]xxx ==> EE
   1.156 +								break;
   1.157 +							case 0x041000:		// [ef][4c][19]xxx ==> P1E
   1.158 +								break;
   1.159 +							case 0x042000:		// [ef][4c][2A]xxx ==> BP
   1.160 +								break;
   1.161 +							case 0x043000:		// [ef][4c][3B]xxx ==> ROMLMAP
   1.162 +								break;
   1.163 +							case 0x044000:		// [ef][4c][4C]xxx ==> L1 MODEM
   1.164 +								break;
   1.165 +							case 0x045000:		// [ef][4c][5D]xxx ==> L2 MODEM
   1.166 +								break;
   1.167 +							case 0x046000:		// [ef][4c][6E]xxx ==> D/N CONNECT
   1.168 +								break;
   1.169 +							case 0x047000:		// [ef][4c][7F]xxx ==> Whole screen reverse video
   1.170 +								break;
   1.171 +						}
   1.172 +					case 0x050000:		// [ef][5d]xxxx ==> 8274
   1.173 +					case 0x060000:		// [ef][6e]xxxx ==> Control regs
   1.174 +						switch (address & 0x07F000) {
   1.175 +							default:
   1.176 +								break;
   1.177 +						}
   1.178 +						break;
   1.179 +					case 0x070000:		// [ef][7f]xxxx ==> 6850 Keyboard Controller
   1.180  					default:
   1.181 -						fprintf(stderr, "NOTE: RD16 to undefined E/F-block address 0x%08X", address);
   1.182 +						fprintf(stderr, "NOTE: RD16 from undefined E/F-block address 0x%08X", address);
   1.183  				}
   1.184  		}
   1.185  	}
   1.186 @@ -462,43 +552,61 @@
   1.187  				data = RD8(state.vram, address, 0x7FFF);
   1.188  				break;
   1.189  			case 0x030000:				// Bus Status Register 0
   1.190 +				break;
   1.191  			case 0x040000:				// Bus Status Register 1
   1.192 +				break;
   1.193  			case 0x050000:				// Phone status
   1.194 +				break;
   1.195  			case 0x060000:				// DMA Count
   1.196 +				break;
   1.197  			case 0x070000:				// Line Printer Status Register
   1.198 +				break;
   1.199  			case 0x080000:				// Real Time Clock
   1.200 +				break;
   1.201  			case 0x090000:				// Phone registers
   1.202  				switch (address & 0x0FF000) {
   1.203  					case 0x090000:		// Handset relay
   1.204  					case 0x098000:
   1.205 +						break;
   1.206  					case 0x091000:		// Line select 2
   1.207  					case 0x099000:
   1.208 +						break;
   1.209  					case 0x092000:		// Hook relay 1
   1.210  					case 0x09A000:
   1.211 +						break;
   1.212  					case 0x093000:		// Hook relay 2
   1.213  					case 0x09B000:
   1.214 +						break;
   1.215  					case 0x094000:		// Line 1 hold
   1.216  					case 0x09C000:
   1.217 +						break;
   1.218  					case 0x095000:		// Line 2 hold
   1.219  					case 0x09D000:
   1.220 +						break;
   1.221  					case 0x096000:		// Line 1 A-lead
   1.222  					case 0x09E000:
   1.223 +						break;
   1.224  					case 0x097000:		// Line 2 A-lead
   1.225  					case 0x09F000:
   1.226  						break;
   1.227  				}
   1.228  				break;
   1.229  			case 0x0A0000:				// Miscellaneous Control Register
   1.230 +				break;
   1.231  			case 0x0B0000:				// TM/DIALWR
   1.232 +				break;
   1.233  			case 0x0C0000:				// CSR
   1.234 +				break;
   1.235  			case 0x0D0000:				// DMA Address Register
   1.236 +				break;
   1.237  			case 0x0E0000:				// Disk Control Register
   1.238 +				break;
   1.239  			case 0x0F0000:				// Line Printer Data Register
   1.240  				break;
   1.241  		}
   1.242  	} else if ((address >= 0xC00000) && (address <= 0xFFFFFF)) {
   1.243  		// I/O register space, zone B
   1.244 -		printf("RD32 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.245 +		printf("RD8 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.246  		switch (address & 0xF00000) {
   1.247  			case 0xC00000:				// Expansion slots
   1.248  			case 0xD00000:
   1.249 @@ -511,7 +619,7 @@
   1.250  					case 0xD40000:		// Expansion slot 5
   1.251  					case 0xD80000:		// Expansion slot 6
   1.252  					case 0xDC0000:		// Expansion slot 7
   1.253 -						fprintf(stderr, "NOTE: RD8 from expansion card address 0x%08X\n", address);
   1.254 +						fprintf(stderr, "NOTE: RD8 from expansion card space, addr=0x%08X\n", address);
   1.255  						break;
   1.256  				}
   1.257  				break;
   1.258 @@ -526,6 +634,33 @@
   1.259  						break;
   1.260  					case 0x030000:		// [ef][3b]xxxx ==> Real Time Clock data bits
   1.261  						break;
   1.262 +					case 0x040000:		// [ef][4c]xxxx ==> General Control Register
   1.263 +						switch (address & 0x077000) {
   1.264 +							case 0x040000:		// [ef][4c][08]xxx ==> EE
   1.265 +								break;
   1.266 +							case 0x041000:		// [ef][4c][19]xxx ==> P1E
   1.267 +								break;
   1.268 +							case 0x042000:		// [ef][4c][2A]xxx ==> BP
   1.269 +								break;
   1.270 +							case 0x043000:		// [ef][4c][3B]xxx ==> ROMLMAP
   1.271 +								break;
   1.272 +							case 0x044000:		// [ef][4c][4C]xxx ==> L1 MODEM
   1.273 +								break;
   1.274 +							case 0x045000:		// [ef][4c][5D]xxx ==> L2 MODEM
   1.275 +								break;
   1.276 +							case 0x046000:		// [ef][4c][6E]xxx ==> D/N CONNECT
   1.277 +								break;
   1.278 +							case 0x047000:		// [ef][4c][7F]xxx ==> Whole screen reverse video
   1.279 +								break;
   1.280 +						}
   1.281 +					case 0x050000:		// [ef][5d]xxxx ==> 8274
   1.282 +					case 0x060000:		// [ef][6e]xxxx ==> Control regs
   1.283 +						switch (address & 0x07F000) {
   1.284 +							default:
   1.285 +								break;
   1.286 +						}
   1.287 +						break;
   1.288 +					case 0x070000:		// [ef][7f]xxxx ==> 6850 Keyboard Controller
   1.289  					default:
   1.290  						fprintf(stderr, "NOTE: RD8 from undefined E/F-block address 0x%08X", address);
   1.291  				}
   1.292 @@ -554,7 +689,7 @@
   1.293  		WR32(state.ram, mapAddr(address, false), state.ram_size - 1, value);
   1.294  	} else if ((address >= 0x400000) && (address <= 0x7FFFFF)) {
   1.295  		// I/O register space, zone A
   1.296 -		printf("WR32 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.297 +		printf("WR32 0x%08X ==> 0x%08X %s\n", address, value, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.298  		switch (address & 0x0F0000) {
   1.299  			case 0x000000:				// Map RAM access
   1.300  				if (address > 0x4007FF) fprintf(stderr, "NOTE: WR32 to MapRAM mirror, addr=0x%08X, data=0x%08X\n", address, value);
   1.301 @@ -568,37 +703,55 @@
   1.302  				WR32(state.vram, address, 0x7FFF, value);
   1.303  				break;
   1.304  			case 0x030000:				// Bus Status Register 0
   1.305 +				break;
   1.306  			case 0x040000:				// Bus Status Register 1
   1.307 +				break;
   1.308  			case 0x050000:				// Phone status
   1.309 +				break;
   1.310  			case 0x060000:				// DMA Count
   1.311 +				break;
   1.312  			case 0x070000:				// Line Printer Status Register
   1.313 +				break;
   1.314  			case 0x080000:				// Real Time Clock
   1.315 +				break;
   1.316  			case 0x090000:				// Phone registers
   1.317  				switch (address & 0x0FF000) {
   1.318  					case 0x090000:		// Handset relay
   1.319  					case 0x098000:
   1.320 +						break;
   1.321  					case 0x091000:		// Line select 2
   1.322  					case 0x099000:
   1.323 +						break;
   1.324  					case 0x092000:		// Hook relay 1
   1.325  					case 0x09A000:
   1.326 +						break;
   1.327  					case 0x093000:		// Hook relay 2
   1.328  					case 0x09B000:
   1.329 +						break;
   1.330  					case 0x094000:		// Line 1 hold
   1.331  					case 0x09C000:
   1.332 +						break;
   1.333  					case 0x095000:		// Line 2 hold
   1.334  					case 0x09D000:
   1.335 +						break;
   1.336  					case 0x096000:		// Line 1 A-lead
   1.337  					case 0x09E000:
   1.338 +						break;
   1.339  					case 0x097000:		// Line 2 A-lead
   1.340  					case 0x09F000:
   1.341  						break;
   1.342  				}
   1.343  				break;
   1.344  			case 0x0A0000:				// Miscellaneous Control Register
   1.345 +				break;
   1.346  			case 0x0B0000:				// TM/DIALWR
   1.347 +				break;
   1.348  			case 0x0C0000:				// CSR
   1.349 +				break;
   1.350  			case 0x0D0000:				// DMA Address Register
   1.351 +				break;
   1.352  			case 0x0E0000:				// Disk Control Register
   1.353 +				break;
   1.354  			case 0x0F0000:				// Line Printer Data Register
   1.355  				break;
   1.356  		}
   1.357 @@ -632,6 +785,36 @@
   1.358  						break;
   1.359  					case 0x030000:		// [ef][3b]xxxx ==> Real Time Clock data bits
   1.360  						break;
   1.361 +					case 0x040000:		// [ef][4c]xxxx ==> General Control Register
   1.362 +						switch (address & 0x077000) {
   1.363 +							case 0x040000:		// [ef][4c][08]xxx ==> EE
   1.364 +								break;
   1.365 +							case 0x041000:		// [ef][4c][19]xxx ==> P1E
   1.366 +								break;
   1.367 +							case 0x042000:		// [ef][4c][2A]xxx ==> BP
   1.368 +								break;
   1.369 +							case 0x043000:		// [ef][4c][3B]xxx ==> ROMLMAP
   1.370 +								state.romlmap = ((value & 0x8000) == 0x8000);
   1.371 +								break;
   1.372 +							case 0x044000:		// [ef][4c][4C]xxx ==> L1 MODEM
   1.373 +								break;
   1.374 +							case 0x045000:		// [ef][4c][5D]xxx ==> L2 MODEM
   1.375 +								break;
   1.376 +							case 0x046000:		// [ef][4c][6E]xxx ==> D/N CONNECT
   1.377 +								break;
   1.378 +							case 0x047000:		// [ef][4c][7F]xxx ==> Whole screen reverse video
   1.379 +								break;
   1.380 +						}
   1.381 +					case 0x050000:		// [ef][5d]xxxx ==> 8274
   1.382 +						break;
   1.383 +					case 0x060000:		// [ef][6e]xxxx ==> Control regs
   1.384 +						switch (address & 0x07F000) {
   1.385 +							default:
   1.386 +								break;
   1.387 +						}
   1.388 +						break;
   1.389 +					case 0x070000:		// [ef][7f]xxxx ==> 6850 Keyboard Controller
   1.390 +						break;
   1.391  					default:
   1.392  						fprintf(stderr, "NOTE: WR32 to undefined E/F-block space, addr=0x%08X, data=0x%08X\n", address, value);
   1.393  				}
   1.394 @@ -659,7 +842,7 @@
   1.395  		WR16(state.ram, mapAddr(address, false), state.ram_size - 1, value);
   1.396  	} else if ((address >= 0x400000) && (address <= 0x7FFFFF)) {
   1.397  		// I/O register space, zone A
   1.398 -		printf("WR16 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.399 +		printf("WR16 0x%08X ==> 0x%04X %s\n", address, value, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.400  		switch (address & 0x0F0000) {
   1.401  			case 0x000000:				// Map RAM access
   1.402  				if (address > 0x4007FF) fprintf(stderr, "NOTE: WR16 to MapRAM mirror, addr=0x%08X, data=0x%04X\n", address, value);
   1.403 @@ -673,37 +856,55 @@
   1.404  				WR16(state.vram, address, 0x7FFF, value);
   1.405  				break;
   1.406  			case 0x030000:				// Bus Status Register 0
   1.407 +				break;
   1.408  			case 0x040000:				// Bus Status Register 1
   1.409 +				break;
   1.410  			case 0x050000:				// Phone status
   1.411 +				break;
   1.412  			case 0x060000:				// DMA Count
   1.413 +				break;
   1.414  			case 0x070000:				// Line Printer Status Register
   1.415 +				break;
   1.416  			case 0x080000:				// Real Time Clock
   1.417 +				break;
   1.418  			case 0x090000:				// Phone registers
   1.419  				switch (address & 0x0FF000) {
   1.420  					case 0x090000:		// Handset relay
   1.421  					case 0x098000:
   1.422 +						break;
   1.423  					case 0x091000:		// Line select 2
   1.424  					case 0x099000:
   1.425 +						break;
   1.426  					case 0x092000:		// Hook relay 1
   1.427  					case 0x09A000:
   1.428 +						break;
   1.429  					case 0x093000:		// Hook relay 2
   1.430  					case 0x09B000:
   1.431 +						break;
   1.432  					case 0x094000:		// Line 1 hold
   1.433  					case 0x09C000:
   1.434 +						break;
   1.435  					case 0x095000:		// Line 2 hold
   1.436  					case 0x09D000:
   1.437 +						break;
   1.438  					case 0x096000:		// Line 1 A-lead
   1.439  					case 0x09E000:
   1.440 +						break;
   1.441  					case 0x097000:		// Line 2 A-lead
   1.442  					case 0x09F000:
   1.443  						break;
   1.444  				}
   1.445  				break;
   1.446  			case 0x0A0000:				// Miscellaneous Control Register
   1.447 +				break;
   1.448  			case 0x0B0000:				// TM/DIALWR
   1.449 +				break;
   1.450  			case 0x0C0000:				// CSR
   1.451 +				break;
   1.452  			case 0x0D0000:				// DMA Address Register
   1.453 +				break;
   1.454  			case 0x0E0000:				// Disk Control Register
   1.455 +				break;
   1.456  			case 0x0F0000:				// Line Printer Data Register
   1.457  				break;
   1.458  		}
   1.459 @@ -737,8 +938,38 @@
   1.460  						break;
   1.461  					case 0x030000:		// [ef][3b]xxxx ==> Real Time Clock data bits
   1.462  						break;
   1.463 +					case 0x040000:		// [ef][4c]xxxx ==> General Control Register
   1.464 +						switch (address & 0x077000) {
   1.465 +							case 0x040000:		// [ef][4c][08]xxx ==> EE
   1.466 +								break;
   1.467 +							case 0x041000:		// [ef][4c][19]xxx ==> P1E
   1.468 +								break;
   1.469 +							case 0x042000:		// [ef][4c][2A]xxx ==> BP
   1.470 +								break;
   1.471 +							case 0x043000:		// [ef][4c][3B]xxx ==> ROMLMAP
   1.472 +								state.romlmap = ((value & 0x8000) == 0x8000);
   1.473 +								break;
   1.474 +							case 0x044000:		// [ef][4c][4C]xxx ==> L1 MODEM
   1.475 +								break;
   1.476 +							case 0x045000:		// [ef][4c][5D]xxx ==> L2 MODEM
   1.477 +								break;
   1.478 +							case 0x046000:		// [ef][4c][6E]xxx ==> D/N CONNECT
   1.479 +								break;
   1.480 +							case 0x047000:		// [ef][4c][7F]xxx ==> Whole screen reverse video
   1.481 +								break;
   1.482 +						}
   1.483 +					case 0x050000:		// [ef][5d]xxxx ==> 8274
   1.484 +						break;
   1.485 +					case 0x060000:		// [ef][6e]xxxx ==> Control regs
   1.486 +						switch (address & 0x07F000) {
   1.487 +							default:
   1.488 +								break;
   1.489 +						}
   1.490 +						break;
   1.491 +					case 0x070000:		// [ef][7f]xxxx ==> 6850 Keyboard Controller
   1.492 +						break;
   1.493  					default:
   1.494 -						fprintf(stderr, "NOTE: WR16 to undefined E/F-block space, addr=0x%08X, data=0x%04X\n", address, value);
   1.495 +						fprintf(stderr, "NOTE: WR32 to undefined E/F-block space, addr=0x%08X, data=0x%08X\n", address, value);
   1.496  				}
   1.497  		}
   1.498  	}
   1.499 @@ -764,7 +995,7 @@
   1.500  		WR8(state.ram, mapAddr(address, false), state.ram_size - 1, value);
   1.501  	} else if ((address >= 0x400000) && (address <= 0x7FFFFF)) {
   1.502  		// I/O register space, zone A
   1.503 -		printf("WR8 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.504 +		printf("WR8 0x%08X ==> %02X %s\n", address, value, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
   1.505  		switch (address & 0x0F0000) {
   1.506  			case 0x000000:				// Map RAM access
   1.507  				if (address > 0x4007FF) fprintf(stderr, "NOTE: WR8 to MapRAM mirror, addr=%08X, data=%02X\n", address, value);
   1.508 @@ -778,37 +1009,55 @@
   1.509  				WR8(state.vram, address, 0x7FFF, value);
   1.510  				break;
   1.511  			case 0x030000:				// Bus Status Register 0
   1.512 +				break;
   1.513  			case 0x040000:				// Bus Status Register 1
   1.514 +				break;
   1.515  			case 0x050000:				// Phone status
   1.516 +				break;
   1.517  			case 0x060000:				// DMA Count
   1.518 +				break;
   1.519  			case 0x070000:				// Line Printer Status Register
   1.520 +				break;
   1.521  			case 0x080000:				// Real Time Clock
   1.522 +				break;
   1.523  			case 0x090000:				// Phone registers
   1.524  				switch (address & 0x0FF000) {
   1.525  					case 0x090000:		// Handset relay
   1.526  					case 0x098000:
   1.527 +						break;
   1.528  					case 0x091000:		// Line select 2
   1.529  					case 0x099000:
   1.530 +						break;
   1.531  					case 0x092000:		// Hook relay 1
   1.532  					case 0x09A000:
   1.533 +						break;
   1.534  					case 0x093000:		// Hook relay 2
   1.535  					case 0x09B000:
   1.536 +						break;
   1.537  					case 0x094000:		// Line 1 hold
   1.538  					case 0x09C000:
   1.539 +						break;
   1.540  					case 0x095000:		// Line 2 hold
   1.541  					case 0x09D000:
   1.542 +						break;
   1.543  					case 0x096000:		// Line 1 A-lead
   1.544  					case 0x09E000:
   1.545 +						break;
   1.546  					case 0x097000:		// Line 2 A-lead
   1.547  					case 0x09F000:
   1.548  						break;
   1.549  				}
   1.550  				break;
   1.551  			case 0x0A0000:				// Miscellaneous Control Register
   1.552 +				break;
   1.553  			case 0x0B0000:				// TM/DIALWR
   1.554 +				break;
   1.555  			case 0x0C0000:				// CSR
   1.556 +				break;
   1.557  			case 0x0D0000:				// DMA Address Register
   1.558 +				break;
   1.559  			case 0x0E0000:				// Disk Control Register
   1.560 +				break;
   1.561  			case 0x0F0000:				// Line Printer Data Register
   1.562  				break;
   1.563  		}
   1.564 @@ -842,8 +1091,40 @@
   1.565  						break;
   1.566  					case 0x030000:		// [ef][3b]xxxx ==> Real Time Clock data bits
   1.567  						break;
   1.568 +					case 0x040000:		// [ef][4c]xxxx ==> General Control Register
   1.569 +						switch (address & 0x077000) {
   1.570 +							case 0x040000:		// [ef][4c][08]xxx ==> EE
   1.571 +								break;
   1.572 +							case 0x041000:		// [ef][4c][19]xxx ==> P1E
   1.573 +								break;
   1.574 +							case 0x042000:		// [ef][4c][2A]xxx ==> BP
   1.575 +								break;
   1.576 +							case 0x043000:		// [ef][4c][3B]xxx ==> ROMLMAP
   1.577 +								if ((address & 1) == 0)
   1.578 +								state.romlmap = ((value & 0x8000) == 0x8000);
   1.579 +								break;
   1.580 +							case 0x044000:		// [ef][4c][4C]xxx ==> L1 MODEM
   1.581 +								break;
   1.582 +							case 0x045000:		// [ef][4c][5D]xxx ==> L2 MODEM
   1.583 +								break;
   1.584 +							case 0x046000:		// [ef][4c][6E]xxx ==> D/N CONNECT
   1.585 +								break;
   1.586 +							case 0x047000:		// [ef][4c][7F]xxx ==> Whole screen reverse video
   1.587 +								break;
   1.588 +						}
   1.589 +					case 0x050000:		// [ef][5d]xxxx ==> 8274
   1.590 +						break;
   1.591 +					case 0x060000:		// [ef][6e]xxxx ==> Control regs
   1.592 +						switch (address & 0x07F000) {
   1.593 +							default:
   1.594 +								break;
   1.595 +						}
   1.596 +						break;
   1.597 +					case 0x070000:		// [ef][7f]xxxx ==> 6850 Keyboard Controller
   1.598 +						break;
   1.599  					default:
   1.600  						fprintf(stderr, "NOTE: WR8 to undefined E/F-block space, addr=0x%08X, data=0x%08X\n", address, value);
   1.601 +						break;
   1.602  				}
   1.603  		}
   1.604  	}