/****************************************************************************** ** Function : console_reset ** ** Objective : Reset the system ** ** Parameters : type - machine type 5200, 800, XL/XE ** system_type - PAL or NTSC ** ram - amount of memory to emulate ** freq - frequency to run Pokey Sound at ** ** return : NONE ** ******************************************************************************/ void console_reset ( e_machine_type type, int system_type, int ram, int freq) { console.machine_type = type; console.ram_size = ram; mem_reset ( ); antic_init (); gtia_init ( system_type ); pokey_init ( freq ); pia_init (); sio_reset (); reset_6502 (); if ( system_type == PAL ) { console.frames_per_sec = 50; console.scanlines = 312; } else { console.frames_per_sec = 60; console.scanlines = 262; } console.option_key_pressed = 0; console.start_key_pressed = 0; if ( !console.basic_enable && (console.machine_type == MACHINE_TYPE_XL) ) console.option_key_pressed = 1; if ( console.mapping == CART_CASSETTE ) { console.start_key_pressed = 2; } } /* end console_reset */
void atari_common_state::atari_machine_start() { gtia_interface gtia_intf; /* GTIA */ memset(>ia_intf, 0, sizeof(gtia_intf)); if (machine().root_device().ioport("console") != NULL) gtia_intf.console_read = console_read; if (machine().device<dac_device>("dac") != NULL) gtia_intf.console_write = console_write; gtia_init(machine(), >ia_intf); /* pokey */ machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(pokey_reset), &machine())); /* ANTIC */ machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(_antic_reset), &machine())); /* save states */ machine().save().save_pointer(NAME((UINT8 *) &antic.r), sizeof(antic.r)); machine().save().save_pointer(NAME((UINT8 *) &antic.w), sizeof(antic.w)); }
void atari_machine_start(running_machine &machine) { gtia_interface gtia_intf; /* GTIA */ memset(>ia_intf, 0, sizeof(gtia_intf)); if (machine.root_device().ioport("console") != NULL) gtia_intf.console_read = console_read; if (machine.device<dac_device>("dac") != NULL) gtia_intf.console_write = console_write; gtia_init(machine, >ia_intf); /* pokey */ machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(pokey_reset), &machine)); /* ANTIC */ machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(_antic_reset), &machine)); /* save states */ state_save_register_global_pointer(machine, ((UINT8 *) &antic.r), sizeof(antic.r)); state_save_register_global_pointer(machine, ((UINT8 *) &antic.w), sizeof(antic.w)); }
static void atari_machine_start(running_machine *machine, int type, const pia6821_interface *pia_intf, int has_cart) { gtia_interface gtia_intf; atari = type; /* GTIA */ memset(>ia_intf, 0, sizeof(gtia_intf)); if (port_tag_to_index("console") >= 0) gtia_intf.console_read = console_read; if (sndti_exists(SOUND_DAC, 0)) gtia_intf.console_write = console_write; gtia_init(machine, >ia_intf); /* pokey */ add_reset_callback(Machine, pokey_reset); /* PIA */ if (pia_intf) { pia_config(0, pia_intf); add_reset_callback(Machine, _pia_reset); } /* ANTIC */ add_reset_callback(Machine, _antic_reset); /* cartridge */ if (has_cart) add_reset_callback(Machine, cart_reset); #ifdef MESS { offs_t ram_top; offs_t ram_size; if (!strcmp(Machine->gamedrv->name, "a400") || !strcmp(Machine->gamedrv->name, "a400pal") || !strcmp(Machine->gamedrv->name, "a800") || !strcmp(Machine->gamedrv->name, "a800pal") || !strcmp(Machine->gamedrv->name, "a800xl")) { ram_size = 0xA000; } else { ram_size = 0x8000; } /* install RAM */ ram_top = MIN(mess_ram_size, ram_size) - 1; memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0000, ram_top, 0, 0, SMH_BANK2); memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0000, ram_top, 0, 0, SMH_BANK2); memory_set_bankptr(2, mess_ram); } #endif /* MESS */ /* save states */ state_save_register_global_pointer(((UINT8 *) &antic.r), sizeof(antic.r)); state_save_register_global_pointer(((UINT8 *) &antic.w), sizeof(antic.w)); }