Previous 15994 Revisions Next

r3702 Friday 28th November, 2008 at 10:41:31 UTC by Robbbert
[SYM1] Starts up
[src/mess/machine]sym1.c

src/mess/machine/sym1.c
r3701r3702
1919#include "machine/6532riot.h"
2020#include "machine/74145.h"
2121#include "sound/speaker.h"
22#include "deprecat.h"
2223
23
2424#define LED_REFRESH_DELAY  ATTOTIME_IN_USEC(70)
2525
2626
r3701r3702
198198{
199199   logerror("SYM1 VIA2 W 0x%02x\n", data);
200200
201   memory_install_write8_handler(space, 0xa600, 0xa67f, 0, 0,
201   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0xa600, 0xa67f, 0, 0,
202202      ((input_port_read(space->machine, "WP") & 0x01) && !(data & 0x01)) ? SMH_NOP : SMH_BANK5);
203203
204   memory_install_write8_handler(space, 0x0400, 0x07ff, 0, 0,
204   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0x0400, 0x07ff, 0, 0,
205205      ((input_port_read(space->machine, "WP") & 0x02) && !(data & 0x02)) ? SMH_NOP : SMH_BANK2);
206206
207   memory_install_write8_handler(space, 0x0800, 0x0bff, 0, 0,
207   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0x0800, 0x0bff, 0, 0,
208208      ((input_port_read(space->machine, "WP") & 0x04) && !(data & 0x04)) ? SMH_NOP : SMH_BANK3);
209209
210   memory_install_write8_handler(space, 0x0c00, 0x0fff, 0, 0,
210   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0x0c00, 0x0fff, 0, 0,
211211      ((input_port_read(space->machine, "WP") & 0x08) && !(data & 0x08)) ? SMH_NOP : SMH_BANK4);
212212}
213213
r3701r3702
277277   /* wipe expansion memory banks that are not installed */
278278   if (mess_ram_size < 4*1024)
279279   {
280      const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM );
281      memory_install_readwrite8_handler(space,
280      memory_install_readwrite8_handler(cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM ),
282281         mess_ram_size, 0x0fff, 0, 0, SMH_NOP, SMH_NOP);
283282   }
284283
r3701r3702
297296
298297MACHINE_RESET( sym1 )
299298{
300   const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM );
301
302299   via_reset();
303300   ttl74145_reset(0);
304301
305302   /* make 0xf800 to 0xffff point to the last half of the monitor ROM
306303      so that the CPU can find its reset vectors */
307   memory_install_readwrite8_handler(space,
304   memory_install_readwrite8_handler(cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM ),
308305         0xf800, 0xffff, 0, 0, SMH_BANK1, SMH_NOP);
309306   memory_set_bankptr(machine, 1, sym1_monitor + 0x800);
307   cpu_reset(cputag_get_cpu(machine, "main"));
310308}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team