diff options
Diffstat (limited to 'src/mess/machine')
| -rw-r--r-- | src/mess/machine/aim65.c | 2 | ||||
| -rw-r--r-- | src/mess/machine/amigakbd.c | 28 | ||||
| -rw-r--r-- | src/mess/machine/amstrad.c | 12 | ||||
| -rw-r--r-- | src/mess/machine/apple2.c | 8 | ||||
| -rw-r--r-- | src/mess/machine/apple3.c | 1 | ||||
| -rw-r--r-- | src/mess/machine/bbc.c | 26 | ||||
| -rw-r--r-- | src/mess/machine/concept.c | 8 | ||||
| -rw-r--r-- | src/mess/machine/electron.c | 10 | ||||
| -rw-r--r-- | src/mess/machine/gamecom.c | 8 | ||||
| -rw-r--r-- | src/mess/machine/gamepock.c | 2 | ||||
| -rw-r--r-- | src/mess/machine/intv.c | 8 | ||||
| -rw-r--r-- | src/mess/machine/lynx.c | 17 | ||||
| -rw-r--r-- | src/mess/machine/nc.c | 11 | ||||
| -rw-r--r-- | src/mess/machine/nes.c | 2 | ||||
| -rw-r--r-- | src/mess/machine/primo.c | 2 | ||||
| -rw-r--r-- | src/mess/machine/svi318.c | 16 | ||||
| -rw-r--r-- | src/mess/machine/thomson.c | 8 | ||||
| -rw-r--r-- | src/mess/machine/vtech2.c | 12 | ||||
| -rw-r--r-- | src/mess/machine/wswan.c | 38 |
19 files changed, 108 insertions, 111 deletions
diff --git a/src/mess/machine/aim65.c b/src/mess/machine/aim65.c index 92a30998ff7..a4b4d53d1ce 100644 --- a/src/mess/machine/aim65.c +++ b/src/mess/machine/aim65.c @@ -149,7 +149,7 @@ void aim65_state::machine_start() space.install_read_handler(0xc000, 0xcfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_z25)); if (m_z26->exists()) space.install_read_handler(0xb000, 0xbfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_z26)); - + // Init RAM space.install_ram(0x0000, ram->size() - 1, ram->pointer()); diff --git a/src/mess/machine/amigakbd.c b/src/mess/machine/amigakbd.c index ec88371482b..55f57cdcdfb 100644 --- a/src/mess/machine/amigakbd.c +++ b/src/mess/machine/amigakbd.c @@ -8,20 +8,20 @@ We currently emulate the Amiga 500 keyboard controller, which was also used in later Amiga 2000 keyboards. - TODO: - Natural keyboard mode doesn't work with shifted characters, - they get sent in the wrong order (core bug?) - - Move 6500/1 to its own CPU core so that it can be shared with - other systems - - Add support for more keyboard controllers (pending on them - getting dumped) + TODO: - Natural keyboard mode doesn't work with shifted characters, + they get sent in the wrong order (core bug?) + - Move 6500/1 to its own CPU core so that it can be shared with + other systems + - Add support for more keyboard controllers (pending on them + getting dumped) - Amiga 1000 keyboard part numbers (manufactured by Mitsumi): + Amiga 1000 keyboard part numbers (manufactured by Mitsumi): - - 327063-01 R56-2144 English - - 327063-02 British - - 327063-03 R56-2153 German - - 327063-04 R56-2152 French - - 327063-05 R56-2154 Italian + - 327063-01 R56-2144 English + - 327063-02 British + - 327063-03 R56-2153 German + - 327063-04 R56-2152 French + - 327063-05 R56-2154 Italian ***************************************************************************/ @@ -335,8 +335,8 @@ void amigakbd_device::device_reset() m_kclk = 1; m_port_c = 0xff; m_port_d = 0xff; - m_latch = 0xffff; // not initialized by hardware - m_counter = 0xffff; // not initialized by hardware + m_latch = 0xffff; // not initialized by hardware + m_counter = 0xffff; // not initialized by hardware m_control = 0x00; m_timer->adjust(attotime::zero, 0, attotime::from_hz(XTAL_3MHz / 2)); diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 0d9747a829c..5954bb90682 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -3031,7 +3031,7 @@ MACHINE_START_MEMBER(amstrad_state,plus) m_asic.ram = m_region_user1->base(); // 16kB RAM for ASIC, memory-mapped registers. m_system_type = SYSTEM_PLUS; m_centronics->write_data7(0); - + astring region_tag; m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); } @@ -3073,7 +3073,7 @@ MACHINE_START_MEMBER(amstrad_state,gx4000) { m_asic.ram = m_region_user1->base(); // 16kB RAM for ASIC, memory-mapped registers. m_system_type = SYSTEM_GX4000; - + astring region_tag; m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); } @@ -3187,7 +3187,7 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge) // check for .CPR header if (image.software_entry() == NULL) { - image.fread(header, 12); + image.fread(header, 12); if (strncmp((char *)header, "RIFF", 4) != 0) { // not a CPR file, so rewind the image at start @@ -3219,7 +3219,7 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge) return IMAGE_INIT_FAIL; } else - image.fread(m_cart->get_rom_base(), size); + image.fread(m_cart->get_rom_base(), size); } else { @@ -3229,7 +3229,7 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge) // Chunks labeled 'cb00' represent Cartridge block 0, and is loaded to &0000-&3fff // 'cb01' represent Cartridge block 1, and is loaded to &4000-&7fff // ... and so on. - + UINT32 offset = 0; UINT8 *crt = m_cart->get_rom_base(); dynamic_buffer temp_copy; @@ -3241,7 +3241,7 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge) char chunklen[4]; // chunk length (always little-endian) int chunksize; // chunk length, calcaulated from the above int ramblock; // 16k RAM block chunk is to be loaded into - unsigned int bytes_to_read; // total bytes to read, as mame_feof doesn't react to EOF without trying to go past it. + unsigned int bytes_to_read; // total bytes to read, as mame_feof doesn't react to EOF without trying to go past it. // Is RIFF format (*.cpr) if (strncmp((char*)(header + 8), "AMS!", 4) != 0) diff --git a/src/mess/machine/apple2.c b/src/mess/machine/apple2.c index 09f59120dab..927e678ec7a 100644 --- a/src/mess/machine/apple2.c +++ b/src/mess/machine/apple2.c @@ -366,7 +366,7 @@ READ8_MEMBER(apple2_state::apple2_c080_r) } } } - + if ((m_machinetype == APPLE_IICPLUS) && (slot == 6)) { offset &= 0xf; @@ -377,7 +377,7 @@ READ8_MEMBER(apple2_state::apple2_c080_r) { offset &= 0xf; UINT8 retval = m_exp_regs[offset]; - + if (offset == 3) { retval = m_exp_ram[m_exp_liveptr&m_exp_addrmask]; @@ -2287,7 +2287,7 @@ MACHINE_START_MEMBER(apple2_state,apple2c) MACHINE_START_MEMBER(apple2_state,tk3000) { - m_machinetype = TK3000; // enhanced IIe clone with Z80 keyboard scanner subcpu + m_machinetype = TK3000; // enhanced IIe clone with Z80 keyboard scanner subcpu apple2eplus_init_common((void *)NULL); } @@ -2335,7 +2335,7 @@ MACHINE_START_MEMBER(apple2_state,laser128) apple2_init_common(); // 1 MB of expansion RAM in slot 5 - m_exp_ram = auto_alloc_array(machine(), UINT8, 1024*1024); + m_exp_ram = auto_alloc_array(machine(), UINT8, 1024*1024); memset(m_exp_ram, 0xff, 1024*1024); m_exp_bankhior = 0xf0; diff --git a/src/mess/machine/apple3.c b/src/mess/machine/apple3.c index 7ca8da875f9..e90f67b36df 100644 --- a/src/mess/machine/apple3.c +++ b/src/mess/machine/apple3.c @@ -1275,4 +1275,3 @@ WRITE_LINE_MEMBER(apple3_state::a2bus_nmi_w) m_maincpu->set_input_line(INPUT_LINE_NMI, state); } } - diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c index dcda1285da7..d1dfb92e980 100644 --- a/src/mess/machine/bbc.c +++ b/src/mess/machine/bbc.c @@ -1941,16 +1941,16 @@ WRITE8_MEMBER(bbc_state::bbc_disc_w) int bbc_state::bbc_load_cart(device_image_interface &image, generic_slot_device *slot) { UINT32 size = slot->common_get_size("rom"); - + if (size != 0x2000 && size != 0x4000) { image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); return IMAGE_INIT_FAIL; } - + slot->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); slot->common_load_rom(slot->get_rom_base(), size, "rom"); - + return IMAGE_INIT_PASS; } @@ -1969,7 +1969,7 @@ int bbc_state::bbcm_load_cart(device_image_interface &image, generic_slot_device image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); return IMAGE_INIT_FAIL; } - + slot->rom_alloc(filesize, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); image.fread(slot->get_rom_base(), filesize); return IMAGE_INIT_PASS; @@ -1978,18 +1978,18 @@ int bbc_state::bbcm_load_cart(device_image_interface &image, generic_slot_device { UINT32 size_lo = image.get_software_region_length("lorom"); UINT32 size_hi = image.get_software_region_length("uprom"); - + if (size_lo + size_hi != 0x8000) { image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); return IMAGE_INIT_FAIL; } - + slot->rom_alloc(size_lo + size_hi, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); memcpy(slot->get_rom_base() + 0, image.get_software_region("uprom"), size_hi); memcpy(slot->get_rom_base() + size_hi, image.get_software_region("lorom"), size_lo); } - + return IMAGE_INIT_PASS; } @@ -2052,7 +2052,7 @@ void bbc_state::bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, U eprom[3] = tmp_reg->base() + shift; else eprom[3] = m_region_opt->base() + 0xc000 + shift; - + membank->configure_entries(0, 1, eprom[0], size); membank->configure_entries(1, 1, eprom[1], size); membank->configure_entries(2, 1, eprom[2], size); @@ -2078,12 +2078,12 @@ void bbc_state::bbcm_setup_banks(memory_bank *membank, int banks, UINT32 shift, eprom[1] = tmp_reg->base() + shift; else eprom[1] = m_region_opt->base() + 0x8000 + shift; - + membank->configure_entries(0, 1, eprom[0], size); membank->configure_entries(1, 1, eprom[0] + 0x4000, size); membank->configure_entries(2, 1, eprom[1], size); membank->configure_entries(3, 1, eprom[1] + 0x4000, size); - + if (banks > 4) { for (int i = 0; i < banks - 4; i++) @@ -2127,7 +2127,7 @@ MACHINE_START_MEMBER(bbc_state, bbcb) m_previous_wd177x_int_state=1; bbc_setup_banks(m_bank4, 16, 0, 0x4000); if (m_region_dfs) - m_bank4->configure_entries(16, 8, m_region_dfs->base(), 0x4000); // additional bank for paged ram + m_bank4->configure_entries(16, 8, m_region_dfs->base(), 0x4000); // additional bank for paged ram } MACHINE_RESET_MEMBER(bbc_state, bbcb) @@ -2155,7 +2155,7 @@ MACHINE_START_MEMBER(bbc_state, bbcbp) m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(bbc_state::bbcbp_direct_handler), this)); bbc_setup_banks(m_bank4, 16, 0, 0x3000); - m_bank4->configure_entries(16, 1, m_region_maincpu->base() + 0x8000, 0x3000); // additional bank for paged ram + m_bank4->configure_entries(16, 1, m_region_maincpu->base() + 0x8000, 0x3000); // additional bank for paged ram bbc_setup_banks(m_bank6, 16, 0x3000, 0x1000); } @@ -2180,7 +2180,7 @@ MACHINE_START_MEMBER(bbc_state, bbcm) m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(bbc_state::bbcm_direct_handler), this)); bbcm_setup_banks(m_bank4, 16, 0, 0x1000); - m_bank4->configure_entries(16, 1, m_region_maincpu->base() + 0x8000, 0x1000); // additional bank for paged ram + m_bank4->configure_entries(16, 1, m_region_maincpu->base() + 0x8000, 0x1000); // additional bank for paged ram bbcm_setup_banks(m_bank5, 16, 0x1000, 0x3000); /* Set ROM/IO bank to point to rom */ diff --git a/src/mess/machine/concept.c b/src/mess/machine/concept.c index 46575f9256f..e071d92452c 100644 --- a/src/mess/machine/concept.c +++ b/src/mess/machine/concept.c @@ -154,7 +154,7 @@ WRITE8_MEMBER(concept_state::via_out_b) WRITE_LINE_MEMBER(concept_state::via_out_cb2) { -// LOG(("via_out_cb2: Sound control written: data=0x%2.2x\n", state)); +// LOG(("via_out_cb2: Sound control written: data=0x%2.2x\n", state)); m_speaker->level_w(state); } @@ -210,7 +210,7 @@ READ16_MEMBER(concept_state::concept_io_r) if (card) { - return card->read_cnxx(space, offset & 0xff); + return card->read_cnxx(space, offset & 0xff); } } break; @@ -245,7 +245,7 @@ READ16_MEMBER(concept_state::concept_io_r) case 3: /* NVIA versatile system interface */ -// LOG(("concept_io_r: VIA read at address 0x03%4.4x\n", offset << 1)); +// LOG(("concept_io_r: VIA read at address 0x03%4.4x\n", offset << 1)); { via6522_device *via_0 = machine().device<via6522_device>("via6522_0"); return via_0->read(space, offset & 0xf); @@ -301,7 +301,7 @@ WRITE16_MEMBER(concept_state::concept_io_w) if (card) { - return card->write_c0nx(space, offset & 0x0f, data); + return card->write_c0nx(space, offset & 0x0f, data); } } break; diff --git a/src/mess/machine/electron.c b/src/mess/machine/electron.c index bce85d595e2..ca6efe3b4d6 100644 --- a/src/mess/machine/electron.c +++ b/src/mess/machine/electron.c @@ -344,7 +344,7 @@ void electron_state::machine_reset() } void electron_state::machine_start() -{ +{ UINT8 *lo_rom, *up_rom; astring region_tag; memory_region *cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); @@ -357,7 +357,7 @@ void electron_state::machine_start() lo_rom = cart_rom->base() + 0x4000; else lo_rom = memregion("user1")->base(); - + membank("bank2")->configure_entries(0, 1, lo_rom, 0x4000); membank("bank2")->configure_entries(1, 11, memregion("user1")->base() + 0x04000, 0x4000); membank("bank2")->configure_entries(12, 1, up_rom, 0x4000); @@ -389,13 +389,13 @@ DEVICE_IMAGE_LOAD_MEMBER( electron_state, electron_cart ) { int upsize = image.get_software_region_length("uprom"); int losize = image.get_software_region_length("lorom"); - + if (upsize != 16384 && upsize != 0) { image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid size for uprom"); return IMAGE_INIT_FAIL; } - + if (losize != 16384 && losize != 0) { image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid size for lorom"); @@ -406,7 +406,7 @@ DEVICE_IMAGE_LOAD_MEMBER( electron_state, electron_cart ) if (upsize) memcpy(m_cart->get_rom_base(), image.get_software_region("uprom"), upsize); - + if (losize) memcpy(m_cart->get_rom_base() + upsize, image.get_software_region("lorom"), losize); diff --git a/src/mess/machine/gamecom.c b/src/mess/machine/gamecom.c index 75d69b049f6..c95e15fc0f2 100644 --- a/src/mess/machine/gamecom.c +++ b/src/mess/machine/gamecom.c @@ -640,15 +640,15 @@ int gamecom_state::common_load(device_image_interface &image, generic_slot_devic UINT32 load_offset = 0; if (size != 0x008000 && size != 0x040000 && size != 0x080000 - && size != 0x100000 && size != 0x1c0000 && size != 0x200000) + && size != 0x100000 && size != 0x1c0000 && size != 0x200000) { image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); return IMAGE_INIT_FAIL; } - + if (size == 0x1c0000) load_offset = 0x40000; - + // in order to simplify banked access from the driver, we always allocate 0x200000, slot->rom_alloc(0x200000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); // we load what we have @@ -661,7 +661,7 @@ int gamecom_state::common_load(device_image_interface &image, generic_slot_devic if (size < 0x080000) { memcpy(crt + 0x040000, crt, 0x040000); } /* ->512KB */ if (size < 0x100000) { memcpy(crt + 0x080000, crt, 0x080000); } /* ->1MB */ if (size < 0x1c0000) { memcpy(crt + 0x100000, crt, 0x100000); } /* -> >=1.8MB */ - + return IMAGE_INIT_PASS; } diff --git a/src/mess/machine/gamepock.c b/src/mess/machine/gamepock.c index e2ed49920a9..8c43df24314 100644 --- a/src/mess/machine/gamepock.c +++ b/src/mess/machine/gamepock.c @@ -139,7 +139,7 @@ void gamepock_state::machine_reset() if (m_cart->exists()) m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000,0xbfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); - + } UINT32 gamepock_state::screen_update_gamepock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) diff --git a/src/mess/machine/intv.c b/src/mess/machine/intv.c index f3c0bbc6d9d..52c250d030f 100644 --- a/src/mess/machine/intv.c +++ b/src/mess/machine/intv.c @@ -351,7 +351,7 @@ void intv_state::machine_start() save_item(NAME(m_ram16)); save_item(NAME(m_sr1_int_pending)); save_item(NAME(m_ram8)); - + // intvkbd if (m_is_keybd) { @@ -388,7 +388,7 @@ void intv_state::machine_start() case INTV_VOICE: m_cart->late_subslot_setup(); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x0080, 0x0081, read16_delegate(FUNC(intv_cart_slot_device::read_speech),(intv_cart_slot_device*)m_cart), write16_delegate(FUNC(intv_cart_slot_device::write_speech),(intv_cart_slot_device*)m_cart)); - + // passthru for RAM-equipped carts m_maincpu->space(AS_PROGRAM).install_write_handler(0x8800, 0x8fff, write16_delegate(FUNC(intv_cart_slot_device::write_88),(intv_cart_slot_device*)m_cart)); m_maincpu->space(AS_PROGRAM).install_write_handler(0xd000, 0xd7ff, write16_delegate(FUNC(intv_cart_slot_device::write_d0),(intv_cart_slot_device*)m_cart)); @@ -402,10 +402,10 @@ void intv_state::machine_start() m_maincpu->space(AS_PROGRAM).install_write_handler(0x7000, 0x7fff, write16_delegate(FUNC(intv_cart_slot_device::write_rom70),(intv_cart_slot_device*)m_cart)); m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000, 0xefff, write16_delegate(FUNC(intv_cart_slot_device::write_rome0),(intv_cart_slot_device*)m_cart)); m_maincpu->space(AS_PROGRAM).install_write_handler(0xf000, 0xffff, write16_delegate(FUNC(intv_cart_slot_device::write_romf0),(intv_cart_slot_device*)m_cart)); - + // passthru for Intellivoice expansion m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x0080, 0x0081, read16_delegate(FUNC(intv_cart_slot_device::read_speech),(intv_cart_slot_device*)m_cart), write16_delegate(FUNC(intv_cart_slot_device::write_speech),(intv_cart_slot_device*)m_cart)); - + // passthru for RAM-equipped carts m_maincpu->space(AS_PROGRAM).install_write_handler(0x8800, 0x8fff, write16_delegate(FUNC(intv_cart_slot_device::write_88),(intv_cart_slot_device*)m_cart)); m_maincpu->space(AS_PROGRAM).install_write_handler(0xd000, 0xd7ff, write16_delegate(FUNC(intv_cart_slot_device::write_d0),(intv_cart_slot_device*)m_cart)); diff --git a/src/mess/machine/lynx.c b/src/mess/machine/lynx.c index 061cf441ed3..f2864ef3ed6 100644 --- a/src/mess/machine/lynx.c +++ b/src/mess/machine/lynx.c @@ -1019,7 +1019,7 @@ READ8_MEMBER(lynx_state::suzy_read) case RCART: if (m_cart->exists()) value = m_cart->read_rom(space, (m_suzy.high * m_granularity) + m_suzy.low); - else + else value = 0; m_suzy.low = (m_suzy.low + 1) & (m_granularity - 1); break; @@ -2078,29 +2078,29 @@ DEVICE_IMAGE_LOAD_MEMBER( lynx_state, lynx_cart ) // 22 chars manufacturer UINT8 header[0x40]; image.fread(header, 0x40); - + // Check the image if (lynx_verify_cart((char*)header, LYNX_CART) == IMAGE_VERIFY_FAIL) return IMAGE_INIT_FAIL; - + /* 2008-10 FP: According to Handy source these should be page_size_bank0. Are we using it correctly in MESS? Moreover, the next two values should be page_size_bank1. We should implement this as well */ gran = header[4] | (header[5] << 8); - + logerror ("%s %dkb cartridge with %dbyte granularity from %s\n", header + 10, size / 1024, gran, header + 42); size -= 0x40; } - } + } m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); - m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); // set-up granularity if (image.software_entry() == NULL) { const char *filetype = image.filetype(); - if (!core_stricmp(filetype, "lnx")) // from header + if (!core_stricmp(filetype, "lnx")) // from header m_granularity = gran; else if (!core_stricmp(filetype, "lyx")) { @@ -2122,7 +2122,7 @@ DEVICE_IMAGE_LOAD_MEMBER( lynx_state, lynx_cart ) else m_granularity = 0x400; // Homebrew roms not using all 256 banks (T-Tris) (none currently in softlist) } - + // set-up rotation from softlist if (image.software_entry() != NULL) { @@ -2140,4 +2140,3 @@ DEVICE_IMAGE_LOAD_MEMBER( lynx_state, lynx_cart ) return IMAGE_INIT_PASS; } - diff --git a/src/mess/machine/nc.c b/src/mess/machine/nc.c index 3cbbb5b7835..25246fbac18 100644 --- a/src/mess/machine/nc.c +++ b/src/mess/machine/nc.c @@ -49,7 +49,7 @@ DEVICE_IMAGE_LOAD_MEMBER( nc_state, nc_pcmcia_card ) UINT32 size = m_card->common_get_size("rom"); m_card->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); - m_card->common_load_rom(m_card->get_rom_base(), size, "rom"); + m_card->common_load_rom(m_card->get_rom_base(), size, "rom"); set_card_present_state(1); m_membank_card_ram_mask = card_calculate_mask(size); @@ -64,14 +64,14 @@ DEVICE_IMAGE_UNLOAD_MEMBER( nc_state, nc_pcmcia_card ) // if there is no data to write, quit if (!m_card_size) return; - + logerror("attempting card save\n"); - + // write data image.fwrite(m_card_ram, m_card_size); - + logerror("write succeeded!\r\n"); - + // set card not present state set_card_present_state(0); m_card_size = 0; @@ -83,4 +83,3 @@ DRIVER_INIT_MEMBER( nc_state, nc ) set_card_present_state(0); m_card_size = 0; } - diff --git a/src/mess/machine/nes.c b/src/mess/machine/nes.c index fbe2bea6bdd..14ca4c6aabe 100644 --- a/src/mess/machine/nes.c +++ b/src/mess/machine/nes.c @@ -97,7 +97,7 @@ void nes_state::setup_ioports() sprintf(str, "FT_COL%i", i); m_io_ftrainer[i] = ioport(str); } - + m_io_ctrlsel = ioport("CTRLSEL"); m_io_exp = ioport("EXP"); m_io_paddle = ioport("PADDLE"); diff --git a/src/mess/machine/primo.c b/src/mess/machine/primo.c index 1a6035dc4f5..51d41e42fdb 100644 --- a/src/mess/machine/primo.c +++ b/src/mess/machine/primo.c @@ -244,7 +244,7 @@ void primo_state::machine_start() { astring region_tag; m_cart1_rom = memregion(region_tag.cpy(m_cart1->tag()).cat(GENERIC_ROM_REGION_TAG)); - m_cart2_rom = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG)); + m_cart2_rom = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG)); } void primo_state::machine_reset() diff --git a/src/mess/machine/svi318.c b/src/mess/machine/svi318.c index fb284345665..3a16ff819a1 100644 --- a/src/mess/machine/svi318.c +++ b/src/mess/machine/svi318.c @@ -60,7 +60,7 @@ DEVICE_IMAGE_LOAD_MEMBER( svi318_state, svi318_cart ) } m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); - m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); if (image.software_entry() == NULL && !cart_verify(m_cart->get_rom_base())) return IMAGE_INIT_FAIL; @@ -407,10 +407,10 @@ DRIVER_INIT_MEMBER(svi318_state, svi318) /* memory */ m_empty_bank = auto_alloc_array(machine(), UINT8, 0x8000); memset(m_empty_bank, 0xff, 0x8000); - + m_bank_low_ptr = m_empty_bank; m_bank_high1_ptr = m_empty_bank; - m_bank_high2_ptr = m_empty_bank; + m_bank_high2_ptr = m_empty_bank; } DRIVER_INIT_MEMBER(svi318_state, svi328_806) @@ -434,9 +434,9 @@ void svi318_state::machine_start() save_item(NAME(m_svi806_ram)); memset(m_svi806_ram, 0x00, 0x800); memset(m_svi806_ram + 0x800, 0xff, 0x800); - + m_svi806_gfx = memregion("gfx1")->base(); - + // Set SVI-806 80 column card palette m_palette->set_pen_color(TMS9928A_PALETTE_SIZE, 0, 0, 0); /* Monochrome black */ m_palette->set_pen_color(TMS9928A_PALETTE_SIZE+1, 0, 224, 0); /* Monochrome green */ @@ -459,7 +459,7 @@ void svi318_state::machine_start() save_item(NAME(m_svi806_present)); save_item(NAME(m_svi806_ram_enabled)); - + machine().save().register_postload(save_prepost_delegate(FUNC(svi318_state::postload), this)); } @@ -485,7 +485,7 @@ static void svi318_load_proc(device_image_interface &image) } void svi318_state::machine_reset() -{ +{ m_keyboard_row = 0; m_centronics_busy = 0; m_svi806_present = 0; @@ -587,7 +587,7 @@ void svi318_state::set_banks() } m_bank_high1_ptr = m_empty_bank; - m_bank_high1_read_only = 1; + m_bank_high1_read_only = 1; m_bank_high2_ptr = m_empty_bank; m_bank_high2_read_only = 1; diff --git a/src/mess/machine/thomson.c b/src/mess/machine/thomson.c index 72a81bb30f1..7b28e642a8e 100644 --- a/src/mess/machine/thomson.c +++ b/src/mess/machine/thomson.c @@ -1841,14 +1841,14 @@ void thomson_state::to9_set_video_mode( UINT8 data, int style ) thom_set_video_mode( THOM_VMODE_TO9 ); break; - // undocumented, but tested on a real TO8D - case 0x20: thom_set_video_mode( THOM_VMODE_MO5_ALT ); break; + // undocumented, but tested on a real TO8D + case 0x20: thom_set_video_mode( THOM_VMODE_MO5_ALT ); break; case 0x21: thom_set_video_mode( THOM_VMODE_BITMAP4 ); break; case 0x41: thom_set_video_mode( THOM_VMODE_BITMAP4_ALT ); break; - // also undocumented but tested + // also undocumented but tested case 0x59: thom_set_video_mode( THOM_VMODE_BITMAP4_ALT_HALF ); break; case 0x2a: @@ -1866,7 +1866,7 @@ void thomson_state::to9_set_video_mode( UINT8 data, int style ) case 0x26: thom_set_video_mode( THOM_VMODE_OVERLAY ); break; - // undocumented 160x200 variant of overlay + // undocumented 160x200 variant of overlay case 0x3e: thom_set_video_mode( THOM_VMODE_OVERLAY_HALF ); break; case 0x3f: thom_set_video_mode( THOM_VMODE_OVERLAY3 ); break; diff --git a/src/mess/machine/vtech2.c b/src/mess/machine/vtech2.c index 9be4b6aac21..e13f23c43da 100644 --- a/src/mess/machine/vtech2.c +++ b/src/mess/machine/vtech2.c @@ -71,11 +71,11 @@ DRIVER_INIT_MEMBER(vtech2_state,laser) m_laser_latch = -1; m_mem = memregion("maincpu")->base(); - + // check ROM expansion astring region_tag; m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); - + for (i = 0; i < ARRAY_LENGTH(m_laser_bank); i++) m_laser_bank[i] = -1; } @@ -88,7 +88,7 @@ void vtech2_state::laser_machine_init(int bank_mask, int video_mask) m_laser_video_bank = video_mask; m_videoram = m_mem + m_laser_video_bank * 0x04000; logerror("laser_machine_init(): bank mask $%04X, video %d [$%05X]\n", m_laser_bank_mask, m_laser_video_bank, m_laser_video_bank * 0x04000); - + for (int i = 0; i < ARRAY_LENGTH(m_laser_bank); i++) laser_bank_select_w(m_maincpu->space(AS_PROGRAM), i, 0); } @@ -153,13 +153,13 @@ WRITE8_MEMBER(vtech2_state::laser_bank_select_w) else { sprintf(bank, "bank%d", offset + 1); - if (data >= 12 && m_cart_rom && (m_cart_rom->bytes() > (data % 12) * 0x4000)) // Expansion ROM banks + if (data >= 12 && m_cart_rom && (m_cart_rom->bytes() > (data % 12) * 0x4000)) // Expansion ROM banks { membank(bank)->set_base(m_cart_rom->base()+ (data % 12) * 0x4000); m_maincpu->space(AS_PROGRAM).install_read_bank(offset * 0x4000, offset * 0x4000 + 0x3fff, mra_bank_hard[offset]); m_maincpu->space(AS_PROGRAM).install_write_bank(offset * 0x4000, offset * 0x4000 + 0x3fff, mwa_bank_hard[offset]); } - else if (data < 12 && (m_laser_bank_mask & (1 << data))) // ROM/RAM banks + else if (data < 12 && (m_laser_bank_mask & (1 << data))) // ROM/RAM banks { // video RAM bank selected? if (data == m_laser_video_bank) @@ -175,7 +175,7 @@ WRITE8_MEMBER(vtech2_state::laser_bank_select_w) m_maincpu->space(AS_PROGRAM).nop_readwrite(offset * 0x4000, offset * 0x4000 + 0x3fff); } } - + } } diff --git a/src/mess/machine/wswan.c b/src/mess/machine/wswan.c index d8a219e37d1..46d213e6eba 100644 --- a/src/mess/machine/wswan.c +++ b/src/mess/machine/wswan.c @@ -201,21 +201,21 @@ void wswan_state::common_start() { m_ws_bios_bank = auto_alloc_array(machine(), UINT8, 0x10000); memcpy(m_ws_bios_bank + 0xffc0, ws_fake_bios_code, 0x40); - + m_vdp.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(wswan_state::wswan_scanline_interrupt),this), &m_vdp); m_vdp.timer->adjust(attotime::from_ticks(256, 3072000), 0, attotime::from_ticks(256, 3072000)); - + wswan_register_save(); - + machine().device<nvram_device>("nvram")->set_base(m_internal_eeprom, INTERNAL_EEPROM_SIZE); - + if (m_cart->exists()) - { + { // ROM m_maincpu->space(AS_PROGRAM).install_read_handler(0x20000, 0x2ffff, read8_delegate(FUNC(ws_cart_slot_device::read_rom20),(ws_cart_slot_device*)m_cart)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x30000, 0x3ffff, read8_delegate(FUNC(ws_cart_slot_device::read_rom30),(ws_cart_slot_device*)m_cart)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x40000, 0xeffff, read8_delegate(FUNC(ws_cart_slot_device::read_rom40),(ws_cart_slot_device*)m_cart)); - + // SRAM if (m_cart->get_type() == WS_SRAM) { @@ -249,7 +249,7 @@ void wswan_state::machine_reset() if (m_cart->exists()) m_rotate = m_cart->get_is_rotated(); else - m_rotate = 0; + m_rotate = 0; /* Intialize ports */ memcpy(m_ws_portram, ws_portram_init, 256); @@ -332,14 +332,14 @@ READ8_MEMBER( wswan_state::port_r ) case 0xc1: case 0xc2: case 0xc3: - case 0xc4: // EEPROM data - case 0xc5: // EEPROM data + case 0xc4: // EEPROM data + case 0xc5: // EEPROM data case 0xc6: case 0xc7: case 0xc8: case 0xc9: case 0xca: - case 0xcb: // RTC data + case 0xcb: // RTC data case 0xcc: case 0xcd: case 0xce: @@ -1034,18 +1034,18 @@ WRITE8_MEMBER( wswan_state::port_w ) logerror( "Unsupported internal EEPROM command: %X\n", data ); } break; - case 0xc0: // ROM bank $40000-$fffff - case 0xc1: // SRAM bank - case 0xc2: // ROM bank $20000-$2ffff - case 0xc3: // ROM bank $30000-$3ffff + case 0xc0: // ROM bank $40000-$fffff + case 0xc1: // SRAM bank + case 0xc2: // ROM bank $20000-$2ffff + case 0xc3: // ROM bank $30000-$3ffff case 0xc4: case 0xc5: - case 0xc6: // EEPROM address / command - case 0xc7: // EEPROM address / command - case 0xc8: // EEPROM command + case 0xc6: // EEPROM address / command + case 0xc7: // EEPROM address / command + case 0xc8: // EEPROM command case 0xc9: - case 0xca: // RTC command - case 0xcb: // RTC data + case 0xca: // RTC command + case 0xcb: // RTC data case 0xcc: case 0xcd: case 0xce: |
