src/mess/drivers/hec2hrp.c
| r9409 | r9410 | |
| 244 | 244 | /*****************************************************************************/ |
| 245 | 245 | { |
| 246 | 246 | UINT8 *RAM = memory_region(machine, "maincpu"); // pointer to mess ram |
| 247 | | UINT8 *RAMD2 = memory_region(machine, "disk2cpu"); // pointer to mess ram |
| 248 | 247 | UINT8 *ROM1 = memory_region(machine, "page1"); // pointer to rom page 1 |
| 249 | 248 | UINT8 *ROM2 = memory_region(machine, "page2"); // pointer to rom page 2 |
| 250 | | UINT32 index=0; |
| 249 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, PULSE_LINE); |
| 250 | // cputag_set_input_line(machine, "disk2cpu", INPUT_LINE_IRQ0, CLEAR_LINE); //INT / NMI... |
| 251 | |
| 252 | // Memory install for bank switching |
| 253 | memory_configure_bank(machine, "bank1", HECTOR_BANK_PROG , 1, &RAM[0xc000] , 0); // Mess ram |
| 254 | memory_configure_bank(machine, "bank1", HECTOR_BANK_VIDEO, 1, hector_videoram, 0); // Video ram |
| 255 | |
| 256 | // Set bank HECTOR_BANK_PROG as basic bank |
| 257 | memory_set_bank(machine, "bank1", HECTOR_BANK_PROG); |
| 258 | |
| 259 | /******************************************************SPECIFIQUE MX ***************************/ |
| 260 | memory_configure_bank(machine, "bank2", HECTORMX_BANK_PAGE0 , 1, &RAM[0x0000] , 0); // Mess ram |
| 261 | memory_configure_bank(machine, "bank2", HECTORMX_BANK_PAGE1 , 1, &ROM1[0x0000] , 0); // Rom page 1 |
| 262 | memory_configure_bank(machine, "bank2", HECTORMX_BANK_PAGE2 , 1, &ROM2[0x0000] , 0); // Rom page 2 |
| 263 | memory_set_bank(machine, "bank2", HECTORMX_BANK_PAGE0); |
| 264 | /******************************************************SPECIFIQUE MX ***************************/ |
| 265 | hector_init(machine); |
| 266 | } |
| 267 | |
| 268 | /*****************************************************************************/ |
| 269 | static MACHINE_START( hec2hrx ) |
| 270 | /*****************************************************************************/ |
| 271 | { |
| 272 | UINT8 *RAM = memory_region(machine, "maincpu"); // pointer to mess ram |
| 273 | UINT8 *RAMD2 = memory_region(machine, "disk2cpu"); // pointer to mess ram |
| 274 | UINT8 *ROM1 = memory_region(machine, "page1"); // pointer to rom page 1 |
| 275 | UINT8 *ROM2 = memory_region(machine, "page2"); // pointer to rom page 2 |
| 276 | UINT32 index=0; |
| 251 | 277 | //Patch rom possible ! |
| 252 | 278 | //RAMD2[0xff6b] = 0x0ff; // force verbose mode hector ! |
| 253 | 279 | |
| 254 | 280 | //Initialisation ROM |
| 255 | | while (index <0x01001) |
| 256 | | { |
| 257 | | Disk2memory[index] = RAMD2[index]; |
| 258 | | index++; |
| 259 | | } |
| 281 | while (index <0x01001) |
| 282 | { |
| 283 | Disk2memory[index] = RAMD2[index]; |
| 284 | index++; |
| 285 | } |
| 260 | 286 | cputag_set_input_line(machine, "disk2cpu", INPUT_LINE_RESET, PULSE_LINE); |
| 261 | 287 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, PULSE_LINE); |
| 262 | 288 | // cputag_set_input_line(machine, "disk2cpu", INPUT_LINE_IRQ0, CLEAR_LINE); //INT / NMI... |
| r9409 | r9410 | |
| 282 | 308 | { |
| 283 | 309 | memory_set_bank(machine, "bank1", HECTOR_BANK_PROG); |
| 284 | 310 | memory_set_bank(machine, "bank2", HECTORMX_BANK_PAGE0); |
| 285 | | hector_reset(machine, 1); |
| 311 | hec2hrp_reset(machine, 1); |
| 286 | 312 | } |
| 287 | 313 | |
| 314 | static MACHINE_RESET(hec2hrx) |
| 315 | { |
| 316 | memory_set_bank(machine, "bank1", HECTOR_BANK_PROG); |
| 317 | memory_set_bank(machine, "bank2", HECTORMX_BANK_PAGE0); |
| 318 | hec2hrx_reset(machine, 1); |
| 319 | } |
| 320 | |
| 288 | 321 | /* Cassette definition */ |
| 289 | 322 | static const struct CassetteOptions hector_cassette_options = { |
| 290 | 323 | 1, /* channels */ |
| r9409 | r9410 | |
| 400 | 433 | MDRV_CPU_PROGRAM_MAP(hec2hrp_mem) |
| 401 | 434 | MDRV_CPU_IO_MAP(hec2mx40_io) |
| 402 | 435 | MDRV_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the Z80 irq in Hz |
| 403 | | MDRV_MACHINE_RESET(hec2hrp) |
| 404 | | MDRV_MACHINE_START(hec2hrp) |
| 436 | MDRV_MACHINE_RESET(hec2hrx) |
| 437 | MDRV_MACHINE_START(hec2hrx) |
| 405 | 438 | |
| 406 | 439 | /* Disk II unit */ |
| 407 | 440 | MDRV_CPU_ADD("disk2cpu",Z80, XTAL_4MHz) |
| r9409 | r9410 | |
| 449 | 482 | MDRV_CPU_PROGRAM_MAP(hec2hrp_mem) |
| 450 | 483 | MDRV_CPU_IO_MAP(hec2hrx_io) |
| 451 | 484 | MDRV_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the Z80 irq in Hz |
| 452 | | MDRV_MACHINE_RESET(hec2hrp) |
| 453 | | MDRV_MACHINE_START(hec2hrp) |
| 485 | MDRV_MACHINE_RESET(hec2hrx) |
| 486 | MDRV_MACHINE_START(hec2hrx) |
| 454 | 487 | |
| 455 | 488 | /* Disk II unit */ |
| 456 | 489 | MDRV_CPU_ADD("disk2cpu",Z80, XTAL_4MHz) |