src/mess/video/zx.c
| r4134 | r4135 | |
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | | void zx_ula_r(running_machine *machine, int offs, const char *region) |
| 137 | void zx_ula_r(running_machine *machine, int offs, const char *region, const UINT8 param) |
| 138 | 138 | { |
| 139 | 139 | const device_config *screen = video_screen_first(machine->config); |
| 140 | 140 | int offs0 = offs & 0x7fff; |
| r4134 | r4135 | |
| 146 | 146 | bitmap_t *bitmap = tmpbitmap; |
| 147 | 147 | UINT16 y, *scanline; |
| 148 | 148 | UINT16 ireg = cpu_get_reg(machine->cpu[0], Z80_I) << 8; |
| 149 | | UINT8 creg = cpu_get_reg(machine->cpu[0], Z80_C); |
| 150 | | UINT8 data, *chrgen; |
| 149 | UINT8 data, *chrgen, creg; |
| 150 | |
| 151 | if (param) |
| 152 | creg = cpu_get_reg(machine->cpu[0], Z80_B); |
| 153 | else |
| 154 | creg = cpu_get_reg(machine->cpu[0], Z80_C); |
| 155 | |
| 151 | 156 | chrgen = memory_region(machine, region); |
| 152 | 157 | |
| 153 | 158 | if ((++ula_scanline_count == video_screen_get_height(screen)) || (creg == 32)) |
src/mess/includes/zx.h
| r4134 | r4135 | |
| 12 | 12 | |
| 13 | 13 | DRIVER_INIT( zx ); |
| 14 | 14 | MACHINE_RESET( zx80 ); |
| 15 | | MACHINE_RESET( zx81 ); |
| 15 | MACHINE_RESET( lambda ); |
| 16 | 16 | MACHINE_RESET( pc8300 ); |
| 17 | 17 | |
| 18 | 18 | READ8_HANDLER( zx_ram_r ); |
| r4134 | r4135 | |
| 28 | 28 | VIDEO_EOF( zx ); |
| 29 | 29 | |
| 30 | 30 | void zx_ula_bkgnd(running_machine *machine, int color); |
| 31 | | void zx_ula_r(running_machine *machine, int offs, const char *region); |
| 31 | void zx_ula_r(running_machine *machine, int offs, const char *region, const UINT8 param); |
| 32 | //void zx_ula_r(running_machine *machine, int offs, const char *region); |
| 32 | 33 | //int zx_ula_r(running_machine *machine, int offs, const char *region); |
| 33 | 34 | |
| 34 | 35 | extern emu_timer *ula_nmi; |
src/mess/machine/zx.c
| r4134 | r4135 | |
| 61 | 61 | static DIRECT_UPDATE_HANDLER ( zx_setdirect ) |
| 62 | 62 | { |
| 63 | 63 | if (address & 0x8000) |
| 64 | | zx_ula_r(space->machine, address, "main"); |
| 64 | zx_ula_r(space->machine, address, "main", 0); |
| 65 | 65 | return address; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | static DIRECT_UPDATE_HANDLER ( pc8300_setdirect ) |
| 69 | 69 | { |
| 70 | 70 | if (address & 0x8000) |
| 71 | | zx_ula_r(space->machine, address, "gfx1"); |
| 71 | zx_ula_r(space->machine, address, "gfx1", 0); |
| 72 | 72 | return address; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | static DIRECT_UPDATE_HANDLER ( lambda_setdirect ) |
| 76 | { |
| 77 | if (address & 0x8000) |
| 78 | zx_ula_r(space->machine, address, "gfx1", 1); |
| 79 | return address; |
| 80 | } |
| 81 | |
| 75 | 82 | MACHINE_RESET ( zx80 ) |
| 76 | 83 | { |
| 77 | 84 | memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), zx_setdirect); |
| 78 | 85 | zx_tape_bit = 0x80; |
| 79 | 86 | } |
| 80 | 87 | |
| 81 | | MACHINE_RESET ( zx81 ) |
| 88 | MACHINE_RESET ( lambda ) |
| 82 | 89 | { |
| 83 | | memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), zx_setdirect); |
| 90 | memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), lambda_setdirect); |
| 84 | 91 | zx_tape_bit = 0x80; |
| 85 | 92 | } |
| 86 | 93 | |
src/mess/drivers/zx.c
| r4134 | r4135 | |
| 430 | 430 | MDRV_CPU_MODIFY("main") |
| 431 | 431 | MDRV_CPU_PROGRAM_MAP(zx81_map, 0) |
| 432 | 432 | |
| 433 | | MDRV_MACHINE_RESET(zx81) |
| 434 | | |
| 435 | 433 | MDRV_GFXDECODE(zx81) |
| 436 | 434 | |
| 437 | 435 | MDRV_CASSETTE_MODIFY( "cassette", zx81_cassette_config ) |
| r4134 | r4135 | |
| 465 | 463 | MDRV_CPU_MODIFY("main") |
| 466 | 464 | MDRV_CPU_PROGRAM_MAP(pc8300_map, 0) |
| 467 | 465 | |
| 468 | | MDRV_MACHINE_RESET(pc8300) |
| 466 | MDRV_MACHINE_RESET(lambda) |
| 469 | 467 | MDRV_GFXDECODE(pow3000) |
| 470 | 468 | MDRV_PALETTE_INIT(zx80) |
| 471 | 469 | MACHINE_DRIVER_END |
| 472 | 470 | |
| 471 | static MACHINE_DRIVER_START( lambda ) |
| 472 | MDRV_IMPORT_FROM(ts1000) |
| 473 | |
| 474 | MDRV_CPU_MODIFY("main") |
| 475 | MDRV_CPU_PROGRAM_MAP(pc8300_map, 0) |
| 476 | |
| 477 | MDRV_MACHINE_RESET(lambda) |
| 478 | MDRV_GFXDECODE(pc8300) |
| 479 | MDRV_PALETTE_INIT(zx80) |
| 480 | MACHINE_DRIVER_END |
| 481 | |
| 473 | 482 | /* ROMs */ |
| 474 | 483 | |
| 475 | 484 | ROM_START(zx80) |
| r4134 | r4135 | |
| 547 | 556 | COMP( 1982, ts1000, zx81, 0, ts1000, zx81, zx, zx81, "Timex Sinclair", "Timex Sinclair 1000", 0 ) |
| 548 | 557 | COMP( 1984, pc8300, zx81, 0, pc8300, pow3000, zx, pc8300, "Your Computer", "PC8300", 0 ) |
| 549 | 558 | COMP( 1983, pow3000, zx81, 0, pow3000, pow3000, zx, pc8300, "Creon Enterprises", "Power 3000", GAME_NOT_WORKING ) |
| 550 | | COMP( 1982, lambda, zx81, 0, pc8300, pow3000, zx, zx81, "Lambda Electronics Ltd", "Lambda 8300", GAME_NOT_WORKING ) |
| 559 | COMP( 1982, lambda, zx81, 0, lambda, pow3000, zx, zx81, "Lambda Electronics Ltd", "Lambda 8300", GAME_NOT_WORKING ) |