Previous 15994 Revisions Next

r4578 Tuesday 28th April, 2009 at 10:23:28 UTC by Robbbert
[LYNX] Fixed quickload.
[src/mess/drivers]lynx.c

src/mess/drivers/lynx.c
r4577r4578
9090   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
9191
9292   /* devices */
93   MDRV_QUICKLOAD_ADD("quickload", lynx, "o,lnx", 0)
93   MDRV_QUICKLOAD_ADD("quickload", lynx, "o", 0)
9494   
9595   MDRV_IMPORT_FROM(lynx_cartslot)
9696MACHINE_DRIVER_END
r4577r4578
139139
140140static QUICKLOAD_LOAD( lynx )
141141{
142   const device_config *cpu = cputag_get_cpu(image->machine, "maincpu");
143   const address_space *space = cputag_get_address_space(image->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
142144   UINT8 *data = NULL;
143145   UINT8 *rom = memory_region(image->machine, "maincpu");
144146   UINT8 header[10]; // 80 08 dw Start dw Len B S 9 3
r4577r4578
162164      return INIT_FAIL;
163165
164166   for (i = 0; i < length; i++)
165      memory_write_byte(cputag_get_address_space(image->machine,"maincpu",ADDRESS_SPACE_PROGRAM), start + i, data[i]);
167      memory_write_byte(space, start + i, data[i]);
166168
167169   rom[0x1fc] = start & 0xff;
168170   rom[0x1fd] = start >> 8;
171   memory_write_byte(space, 0x1fc, start & 0xff);
172   memory_write_byte(space, 0x1fd, start >> 8);
169173
170174   lynx_crc_keyword(devtag_get_device(image->machine, "quickload"));
171175
176   cpu_set_reg(cpu, REG_GENPC, start);
177
172178   return INIT_PASS;
173179}
174180

Previous 15994 Revisions Next


© 1998-2018 The MESS Team