Previous 15994 Revisions Next

r7221 Monday 1st February, 2010 at 11:21:17 UTC by Dirk Best
[TF20] Fixed recent regressions
[src/mess/machine]tf20.c

src/mess/machine/tf20.c
r7220r7221
7575   tf20_state *tf20 = get_safe_token(space->cpu->owner);
7676   const address_space *prg = cpu_get_address_space(space->cpu, ADDRESS_SPACE_PROGRAM);
7777
78   memory_install_readwrite_bank(prg, 0x0000, 0x7fff, 0, 0,"bank21");
79   memory_set_bankptr(space->machine, "bank21", messram_get_ptr(tf20->ram));
78   /* switch in ram */
79   memory_install_ram(prg, 0x0000, 0x7fff, 0, 0, messram_get_ptr(tf20->ram));
8080
8181   /* clear tc */
8282   upd765_tc_w(tf20->upd765a, CLEAR_LINE);
r7220r7221
320320{
321321   tf20_state *tf20 = get_safe_token(device);
322322   running_device *cpu = device->subdevice("tf20");
323   const address_space *prg = cpu_get_address_space(cpu, ADDRESS_SPACE_PROGRAM);
323324
324325   cpu_set_irq_callback(cpu, tf20_irq_ack);
325326
r7220r7221
328329
329330   /* make sure its already running */
330331   if (!tf20->ram->started)
331   {
332      //device_delay_init(device);
333      return;
334   }
332      throw device_missing_dependencies();
335333
336334   /* locate child devices */
337335   tf20->upd765a = device->subdevice("5a");
r7220r7221
340338   tf20->floppy_1 = device->subdevice(FLOPPY_1);
341339
342340   /* enable second half of ram */
343   memory_set_bankptr(device->machine, "bank22", messram_get_ptr(tf20->ram) + 0x8000);
341   memory_install_ram(prg, 0x8000, 0xffff, 0, 0, messram_get_ptr(tf20->ram) + 0x8000);
344342}
345343
346344static DEVICE_RESET( tf20 )
r7220r7221
349347   const address_space *prg = cpu_get_address_space(cpu, ADDRESS_SPACE_PROGRAM);
350348
351349   /* enable rom */
352   memory_install_read_bank(prg, 0x0000, 0x07ff, 0, 0x7800, "bank21");
353   memory_nop_write(prg, 0x0000, 0x07ff, 0, 0x7800);
354   memory_set_bankptr(device->machine, "bank21", (void*)cpu->region);
350   memory_install_rom(prg, 0x0000, 0x07ff, 0, 0x7800, cpu->region->base.v);
355351}
356352
357353DEVICE_GET_INFO( tf20 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team