src/mess/machine/trs80.c
| r5893 | r5894 | |
| 324 | 324 | d3 Invert Video |
| 325 | 325 | d2 80/64 width |
| 326 | 326 | d1 Select bit 1 |
| 327 | | d0 Select bit 0 |
| 327 | d0 Select bit 0 */ |
| 328 | 328 | |
| 329 | | Note: Area from 0000-0FFF is controlled by tr80m4p_9c_w below */ |
| 330 | | |
| 331 | 329 | /* get address space instead of io space */ |
| 332 | 330 | const address_space *mem = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 333 | 331 | |
| r5893 | r5894 | |
| 342 | 340 | |
| 343 | 341 | if (trs80_model4 & 4) /* Model 4P gets RAM while Model 4 gets ROM */ |
| 344 | 342 | { |
| 343 | if (trs80_model4 & 8) |
| 344 | memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu")); |
| 345 | else |
| 346 | memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000); |
| 347 | |
| 345 | 348 | memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000); |
| 346 | 349 | memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea); |
| 347 | 350 | } |
| 348 | 351 | else |
| 349 | 352 | { |
| 353 | memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu")); |
| 350 | 354 | memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x01000); |
| 351 | 355 | memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x037ea); |
| 352 | 356 | } |
| r5893 | r5894 | |
| 370 | 374 | |
| 371 | 375 | if (trs80_model4 & 4) /* Model 4P gets RAM while Model 4 gets ROM */ |
| 372 | 376 | { |
| 377 | if (trs80_model4 & 8) |
| 378 | memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu")); |
| 379 | else |
| 380 | memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000); |
| 381 | |
| 373 | 382 | memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000); |
| 374 | 383 | memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x137e8); |
| 375 | 384 | memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea); |
| 376 | 385 | } |
| 377 | 386 | else |
| 378 | 387 | { |
| 388 | memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu")); |
| 379 | 389 | memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x01000); |
| 380 | 390 | memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x037e8); |
| 381 | 391 | memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x037ea); |
| r5893 | r5894 | |
| 950 | 960 | memory_install_readwrite8_handler (mem, 0x4000, 0xf3ff, 0, 0, SMH_BANK(7), SMH_BANK(17)); |
| 951 | 961 | memory_install_readwrite8_handler (mem, 0xf400, 0xf7ff, 0, 0, SMH_BANK(8), SMH_BANK(18)); |
| 952 | 962 | memory_install_readwrite8_handler (mem, 0xf800, 0xffff, 0, 0, SMH_BANK(9), SMH_BANK(19)); |
| 963 | trs80m4p_9c_w(mem, 0, 1); /* Enable the ROM */ |
| 953 | 964 | trs80m4_84_w(mem, 0, 0); /* switch in devices at power-on */ |
| 954 | | trs80m4p_9c_w(mem, 0, 1); /* Enable the ROM */ |
| 955 | 965 | } |
| 956 | 966 | |
| 957 | 967 | MACHINE_RESET( lnw80 ) |