diff options
Diffstat (limited to 'src/mess')
42 files changed, 1032 insertions, 1042 deletions
diff --git a/src/mess/audio/dave.c b/src/mess/audio/dave.c index 0c8b4a2cab5..1dfc93e1cad 100644 --- a/src/mess/audio/dave.c +++ b/src/mess/audio/dave.c @@ -97,7 +97,7 @@ void dave_device::device_start() save_item(NAME(m_mame_volumes)); for (int i = 0; i < ARRAY_LENGTH(m_period); i++) - m_period[i] = (STEP * machine().sample_rate()) / 125000; + m_period[i] = (STEP * machine().sample_rate()) / 125000; for (int i = 0; i < ARRAY_LENGTH(m_count); i++) m_count[i] = (STEP * machine().sample_rate()) / 125000; diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c index 413cab064cc..e5406ff4efa 100644 --- a/src/mess/drivers/apple2.c +++ b/src/mess/drivers/apple2.c @@ -2,13 +2,13 @@ // copyright-holders:R. Belmont /*************************************************************************** - apple2.c - Apple II/II Plus and clones + apple2.c - Apple II/II Plus and clones - Next generation driver written in September/October 2014 by R. Belmont. - Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont - Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie. - -II: original base model. RAM sizes of 4, 8, 12, 16, 20, 24, 32, 36, and 48 KB possible. + Next generation driver written in September/October 2014 by R. Belmont. + Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont + Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie. + +II: original base model. RAM sizes of 4, 8, 12, 16, 20, 24, 32, 36, and 48 KB possible. 8K of ROM at $E000-$FFFF, empty sockets for $D000-$D7FF and $D800-$DFFF. Programmer's Aid #1 was sold by Apple for $D000-$D7FF, some third-party ROMs were also available. @@ -19,25 +19,25 @@ II: original base model. RAM sizes of 4, 8, 12, 16, 20, 24, 32, 36, and 48 KB p ROM contains original non-autostart Monitor and Integer BASIC; apparently Autostart + Integer is also possible. - -II Plus: RAM options reduced to 16/32/48 KB. + +II Plus: RAM options reduced to 16/32/48 KB. ROM expanded to 12KB from $D000-$FFFF containing Applesoft BASIC and the Autostart Monitor. Applesoft is a licensed version of Microsoft's 6502 BASIC as also found in Commodore and many other computers. - - + + Users of both models often connected the SHIFT key to the paddle #2 button (mapped to $C063) in order to inform properly written software that characters were to be intended upper/lower case. - + Both models commonly included a RAM "language card" in slot 0 which added 16K of RAM which could be banked into the $D000-$FFFF space to replace the ROMs. This allowed running Applesoft on a II and Integer BASIC on a II Plus. A II Plus with this card installed is often called a "64K Apple II"; this is the base configuration required to run ProDOS and some larger games. - -************************************************************************/ - + +************************************************************************/ + #include "emu.h" #include "machine/bankdev.h" #include "machine/ram.h" @@ -212,7 +212,7 @@ WRITE_LINE_MEMBER(napple2_state::a2bus_inh_w) { // assume no cards are pulling /INH m_inh_slot = -1; - + // scan the slots to figure out which card(s) are INHibiting stuff for (int i = 0; i <= 7; i++) { @@ -226,7 +226,7 @@ WRITE_LINE_MEMBER(napple2_state::a2bus_inh_w) { if (m_inh_bank != 1) { - m_upperbank->set_bank(1); + m_upperbank->set_bank(1); m_inh_bank = 1; } } @@ -234,7 +234,7 @@ WRITE_LINE_MEMBER(napple2_state::a2bus_inh_w) { if (m_inh_bank != 0) { - m_upperbank->set_bank(0); + m_upperbank->set_bank(0); m_inh_bank = 0; } } @@ -248,7 +248,7 @@ WRITE_LINE_MEMBER(napple2_state::a2bus_inh_w) // if no slots are inhibiting, make sure ROM is fully switched in if ((m_inh_slot == -1) && (m_inh_bank != 0)) { - m_upperbank->set_bank(0); + m_upperbank->set_bank(0); m_inh_bank = 0; } } @@ -315,7 +315,7 @@ void napple2_state::machine_reset() m_anykeydown = false; } -/*************************************************************************** +/*************************************************************************** VIDEO ***************************************************************************/ @@ -332,16 +332,16 @@ TIMER_DEVICE_CALLBACK_MEMBER(napple2_state::apple2_interrupt) m_video->m_sysconfig = m_sysconfig->read(); // check reset - if (m_resetdip) // if reset DIP is present, use it + if (m_resetdip) // if reset DIP is present, use it { if (m_resetdip->read() & 1) - { // CTRL-RESET + { // CTRL-RESET if ((m_kbspecial->read() & 0x88) == 0x88) { m_maincpu->reset(); } } - else // plain RESET + else // plain RESET { if (m_kbspecial->read() & 0x80) { @@ -349,7 +349,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(napple2_state::apple2_interrupt) } } } - else // no DIP, so always plain RESET + else // no DIP, so always plain RESET { if (m_kbspecial->read() & 0x80) { @@ -383,8 +383,8 @@ UINT32 napple2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, m_video->hgr_update(screen, bitmap, cliprect, 0, 191); } } - else // lo-res - { + else // lo-res + { if (m_video->m_mix) { m_video->lores_update(screen, bitmap, cliprect, 0, 159); @@ -404,7 +404,7 @@ UINT32 napple2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -/*************************************************************************** +/*************************************************************************** I/O ***************************************************************************/ // most softswitches don't care about read vs write, so handle them here @@ -440,12 +440,12 @@ void napple2_state::do_io(address_space &space, int offset) m_video->m_mix = true; break; case 0x54: // set page 1 - m_page2 = false; + m_page2 = false; m_video->m_page2 = false; break; case 0x55: // set page 2 - m_page2 = true; + m_page2 = true; m_video->m_page2 = true; break; @@ -479,7 +479,7 @@ void napple2_state::do_io(address_space &space, int offset) case 0x5f: // AN3 on m_an3 = true; break; - case 0x68: // IIgs STATE register, which ProDOS touches + case 0x68: // IIgs STATE register, which ProDOS touches break; case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: @@ -510,15 +510,15 @@ READ8_MEMBER(napple2_state::c000_r) case 0x68: return m_cassette->input() > 0.0 ? 0x80 : 0; - case 0x61: // button 0 + case 0x61: // button 0 case 0x69: return (m_joybuttons->read() & 0x10) ? 0x80 : 0; - case 0x62: // button 1 + case 0x62: // button 1 case 0x6a: return (m_joybuttons->read() & 0x20) ? 0x80 : 0; - case 0x63: // button 2 + case 0x63: // button 2 case 0x6b: // check if SHIFT key mod configured if (m_sysconfig->read() & 0x04) @@ -527,11 +527,11 @@ READ8_MEMBER(napple2_state::c000_r) } return (m_joybuttons->read() & 0x40) ? 0x80 : 0; - case 0x64: // joy 1 X axis + case 0x64: // joy 1 X axis case 0x6c: return (space.machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0; - case 0x65: // joy 1 Y axis + case 0x65: // joy 1 Y axis case 0x6d: return (space.machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0; @@ -666,10 +666,10 @@ READ8_MEMBER(napple2_state::inh_r) { if (m_inh_slot != -1) { - return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000); + return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000); } - assert(0); // hitting inh_r with invalid m_inh_slot should not be possible + assert(0); // hitting inh_r with invalid m_inh_slot should not be possible return read_floatingbus(); } @@ -942,7 +942,7 @@ WRITE_LINE_MEMBER(napple2_state::ay3600_data_ready_w) if (m_transchar != 0) { m_strobe = 0x80; -// printf("new char = %04x (%02x)\n", m_lastchar&0x3f, m_transchar); +// printf("new char = %04x (%02x)\n", m_lastchar&0x3f, m_transchar); } } } @@ -1021,7 +1021,7 @@ INPUT_PORTS_START( apple2_sysconfig ) PORT_CONFSETTING(0x02, "Green") PORT_CONFSETTING(0x03, "Amber") - PORT_CONFNAME(0x04, 0x04, "Shift key mod") // default to installed + PORT_CONFNAME(0x04, 0x04, "Shift key mod") // default to installed PORT_CONFSETTING(0x00, "Not present") PORT_CONFSETTING(0x04, "Installed") INPUT_PORTS_END @@ -1053,7 +1053,7 @@ static INPUT_PORTS_START( apple2_common ) PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*') PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=') @@ -1186,7 +1186,7 @@ INPUT_PORTS_END static SLOT_INTERFACE_START(apple2_slot0_cards) SLOT_INTERFACE("lang", A2BUS_RAMCARD16K) /* Apple II RAM Language Card */ - SLOT_INTERFACE("ssram", A2BUS_RAMCARD128K) /* Saturn Systems 128K extended language card */ + SLOT_INTERFACE("ssram", A2BUS_RAMCARD128K) /* Saturn Systems 128K extended language card */ SLOT_INTERFACE_END static SLOT_INTERFACE_START(apple2_cards) @@ -1277,7 +1277,7 @@ static MACHINE_CONFIG_START( apple2_common, napple2_state ) MCFG_AY3600_SHIFT_CB(READLINE(napple2_state, ay3600_shift_r)) MCFG_AY3600_CONTROL_CB(READLINE(napple2_state, ay3600_control_r)) MCFG_AY3600_DATA_READY_CB(WRITELINE(napple2_state, ay3600_data_ready_w)) - MCFG_AY3600_AKO_CB(WRITELINE(napple2_state, ay3600_ako_w)) + MCFG_AY3600_AKO_CB(WRITELINE(napple2_state, ay3600_ako_w)) /* repeat timer. 15 Hz from page 90 of "The Apple II Circuit Description */ MCFG_TIMER_DRIVER_ADD_PERIODIC("repttmr", napple2_state, ay3600_repeat, attotime::from_hz(15)) diff --git a/src/mess/drivers/apple2e.c b/src/mess/drivers/apple2e.c index be7e8693462..3439d62f659 100644 --- a/src/mess/drivers/apple2e.c +++ b/src/mess/drivers/apple2e.c @@ -4,88 +4,88 @@ apple2e.c - Apple IIe/IIc/IIc Plus and clones - Next generation driver written in September/October 2014 by R. Belmont. - Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont - Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie. - - - IIe: base of this driver. 64K RAM, slot 0 language card emulation without the double-read requirement, + Next generation driver written in September/October 2014 by R. Belmont. + Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont + Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie. + + + IIe: base of this driver. 64K RAM, slot 0 language card emulation without the double-read requirement, lowercase and SHIFT key on button 2, Open and Solid Apple buttons on joy buttons 0 and 1, auxiliary slot, built-in 80 column support if extra RAM added. - - Physical slot 0 was eliminated thanks to the built-in language card. - - Most of the write-only softswitches gained readback locations, necessary to make interrupt-driven - software possible. - - Base 80-column card: 1K RAM, allows 80 columns and double-lo-res, - no double-hi-res. - - Extended 80-column card: 64K RAM (including a second language card), - allows 80 columns, double-lo-res, and double-hi-res. - - Revision A motherboards (very rare) don't support double-hi-res; it's unclear - if double-lo-res works or not. We emulate the much more common Rev B or later - board. - - IIe enhanced: 65C02 CPU with more instructions, MouseText in the character generator. - - IIe platinum: Like enhanced but with added numeric keypad and extended 80-column card - included in the box. Keypad CLEAR generates ESC by default, one hardware mod - made it generate CTRL-X instead. (new keyboard encoder ROM?) - - NOTE: On real IIe and IIe enhanced h/w, pressing SHIFT and paddle button 2 will - short out the power supply and cause a safety shutdown. (We don't emulate - this "feature", and it was relatively rare in real life as Apple joysticks only - had buttons 0 and 1 normally). - - IIc: IIe enhanced shrunken into a pizzabox with a Disk II compatible - half-height drive included in the case. - - No slots, but included functionality equivalent to the following slots - on the motherboard: + + Physical slot 0 was eliminated thanks to the built-in language card. + + Most of the write-only softswitches gained readback locations, necessary to make interrupt-driven + software possible. + + Base 80-column card: 1K RAM, allows 80 columns and double-lo-res, + no double-hi-res. + + Extended 80-column card: 64K RAM (including a second language card), + allows 80 columns, double-lo-res, and double-hi-res. + + Revision A motherboards (very rare) don't support double-hi-res; it's unclear + if double-lo-res works or not. We emulate the much more common Rev B or later + board. + + IIe enhanced: 65C02 CPU with more instructions, MouseText in the character generator. + + IIe platinum: Like enhanced but with added numeric keypad and extended 80-column card + included in the box. Keypad CLEAR generates ESC by default, one hardware mod + made it generate CTRL-X instead. (new keyboard encoder ROM?) + + NOTE: On real IIe and IIe enhanced h/w, pressing SHIFT and paddle button 2 will + short out the power supply and cause a safety shutdown. (We don't emulate + this "feature", and it was relatively rare in real life as Apple joysticks only + had buttons 0 and 1 normally). + + IIc: IIe enhanced shrunken into a pizzabox with a Disk II compatible + half-height drive included in the case. + + No slots, but included functionality equivalent to the following slots + on the motherboard: - 2 Super Serial Cards (modem and printer ports) - extended 80 column card / 128K RAM - Disk II IWM controller - Apple II Mouse card (firmware entry points are compatible, but the hardware implementation omits the 68705 and is quite different!) - + Has a 40/80 column switch and a QWERTY/DVORAK switch. - - IIc (UniDisk 3.5): IIc with ROM doubled to 32K and the ROMSWITCH register - added to page between the original 16K ROM and the new added 16K. The - extra firmware space was dedicated to implementing the Protocol Converter, - later renamed "SmartPort", which communicates with "smart" packet devices - over the IWM bus. - - Partial AppleTalk code also exists in this ROM but it doesn't work and - was not completed. - - IIc (Original Memory Expansion): - Removes AppleTalk and adds support for a memory expansion card with up - to 1 MB; this is identical both in hardware and firmware to the "Slinky" - memory expansion card for the Apple IIe (a2bus/a2memexp.c). - - IIc (Revised Memory Expansion, Rev. 3): - Fixes several nasty bugs in the Original Memory Expansion version. Not - currently dumped. - - IIc (Rev 4): - Fixes memory size detection for memory cards with less than 1MB. Fixes - several screen hole errors introduced in Rev 3, and fixes Terminal Mode - wherein the firmware can be put into a built-in terminal mode for simple - tests with a modem. - - IIc Plus: - Like IIc with memory expansion, but with licensed built-in Zip Chip which - runs the 65C02 at 4 MHz turbo speed with a small cache RAM. - - The machine has an internal "Apple 3.5" drive plus a custom gate array - which emulates the functionality of the UniDisk 3.5's on-board 65C02. - This gets around the fact that 1 MHz isn't sufficient to handle direct - Woz-style control of a double-density 3.5" drive. - - External drive port allows IIgs-style daisy-chaining. + + IIc (UniDisk 3.5): IIc with ROM doubled to 32K and the ROMSWITCH register + added to page between the original 16K ROM and the new added 16K. The + extra firmware space was dedicated to implementing the Protocol Converter, + later renamed "SmartPort", which communicates with "smart" packet devices + over the IWM bus. + + Partial AppleTalk code also exists in this ROM but it doesn't work and + was not completed. + + IIc (Original Memory Expansion): + Removes AppleTalk and adds support for a memory expansion card with up + to 1 MB; this is identical both in hardware and firmware to the "Slinky" + memory expansion card for the Apple IIe (a2bus/a2memexp.c). + + IIc (Revised Memory Expansion, Rev. 3): + Fixes several nasty bugs in the Original Memory Expansion version. Not + currently dumped. + + IIc (Rev 4): + Fixes memory size detection for memory cards with less than 1MB. Fixes + several screen hole errors introduced in Rev 3, and fixes Terminal Mode + wherein the firmware can be put into a built-in terminal mode for simple + tests with a modem. + + IIc Plus: + Like IIc with memory expansion, but with licensed built-in Zip Chip which + runs the 65C02 at 4 MHz turbo speed with a small cache RAM. + + The machine has an internal "Apple 3.5" drive plus a custom gate array + which emulates the functionality of the UniDisk 3.5's on-board 65C02. + This gets around the fact that 1 MHz isn't sufficient to handle direct + Woz-style control of a double-density 3.5" drive. + + External drive port allows IIgs-style daisy-chaining. ---------------------------------- @@ -163,27 +163,27 @@ Address bus A0-A11 is Y0-Y11 #define A2_AUXSLOT_TAG "auxbus" #define A2_VIDEO_TAG "a2video" -#define A2_0000_TAG "r00bank" -#define A2_0200_TAG "r02bank" -#define A2_0400_TAG "r04bank" -#define A2_0800_TAG "r08bank" -#define A2_2000_TAG "r20bank" -#define A2_4000_TAG "r40bank" -#define A2_C100_TAG "c1bank" -#define A2_C300_TAG "c3bank" -#define A2_C400_TAG "c4bank" -#define A2_C800_TAG "c8bank" +#define A2_0000_TAG "r00bank" +#define A2_0200_TAG "r02bank" +#define A2_0400_TAG "r04bank" +#define A2_0800_TAG "r08bank" +#define A2_2000_TAG "r20bank" +#define A2_4000_TAG "r40bank" +#define A2_C100_TAG "c1bank" +#define A2_C300_TAG "c3bank" +#define A2_C400_TAG "c4bank" +#define A2_C800_TAG "c8bank" #define A2_LCBANK_TAG "lcbank" #define MOUSE_BUTTON_TAG "mse_button" #define MOUSE_XAXIS_TAG "mse_x" #define MOUSE_YAXIS_TAG "mse_y" -#define CNXX_UNCLAIMED -1 -#define CNXX_INTROM -2 +#define CNXX_UNCLAIMED -1 +#define CNXX_INTROM -2 #define IRQ_SLOT 0 -#define IRQ_VBL 1 +#define IRQ_VBL 1 #define IRQ_MOUSEXY 2 class apple2e_state : public driver_device @@ -430,7 +430,7 @@ WRITE_LINE_MEMBER(apple2e_state::a2bus_inh_w) { // assume no cards are pulling /INH m_inh_slot = -1; - + // scan the slots to figure out which card(s) are INHibiting stuff for (int i = 0; i <= 7; i++) { @@ -444,7 +444,7 @@ WRITE_LINE_MEMBER(apple2e_state::a2bus_inh_w) { if (m_inh_bank != 1) { - m_upperbank->set_bank(1); + m_upperbank->set_bank(1); m_inh_bank = 1; } } @@ -452,7 +452,7 @@ WRITE_LINE_MEMBER(apple2e_state::a2bus_inh_w) { if (m_inh_bank != 0) { - m_upperbank->set_bank(0); + m_upperbank->set_bank(0); m_inh_bank = 0; } } @@ -466,7 +466,7 @@ WRITE_LINE_MEMBER(apple2e_state::a2bus_inh_w) // if no slots are inhibiting, make sure ROM is fully switched in if ((m_inh_slot == -1) && (m_inh_bank != 0)) { - m_upperbank->set_bank(0); + m_upperbank->set_bank(0); m_inh_bank = 0; } } @@ -485,7 +485,7 @@ READ8_MEMBER(apple2e_state::memexp_r) { if (m_exp_liveptr <= m_exp_addrmask) { - retval = m_exp_ram[m_exp_liveptr]; + retval = m_exp_ram[m_exp_liveptr]; } else { @@ -569,7 +569,7 @@ void apple2e_state::machine_start() m_cassette_out = 0; if (m_cassette) { - m_cassette->output(-1.0f); + m_cassette->output(-1.0f); } m_upperbank->set_bank(0); m_lcbank->set_bank(0); @@ -587,7 +587,7 @@ void apple2e_state::machine_start() m_exp_addrmask = m_ram_size - (128*1024) - 1; m_exp_ram = m_ram_ptr + (128*1024); } - else // no expansion + else // no expansion { m_exp_addrmask = 0; m_exp_ram = NULL; @@ -612,13 +612,13 @@ void apple2e_state::machine_start() m_aux_ptr = m_auxslotdevice->get_vram_ptr(); m_aux_bank_ptr = m_auxslotdevice->get_auxbank_ptr(); } - else // IIc has 128K right on the motherboard + else // IIc has 128K right on the motherboard { m_auxslotdevice = NULL; if (m_ram_size >= (128*1024)) { - m_aux_ptr = &m_ram_ptr[0x10000]; + m_aux_ptr = &m_ram_ptr[0x10000]; m_aux_bank_ptr = m_aux_ptr; } } @@ -749,7 +749,7 @@ void apple2e_state::raise_irq(int irq) if (m_irqmask) { - m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); + m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); } } @@ -760,11 +760,11 @@ void apple2e_state::lower_irq(int irq) if (!m_irqmask) { - m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); + m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); } } -/*************************************************************************** +/*************************************************************************** VIDEO ***************************************************************************/ @@ -779,7 +779,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple2e_state::apple2_interrupt) if (m_isiic) { - update_iic_mouse(); + update_iic_mouse(); } if (scanline == 192) @@ -828,11 +828,11 @@ UINT32 apple2e_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, { if (m_video->m_dhires) { - m_video->dhgr_update(screen, bitmap, cliprect, 0, 159); + m_video->dhgr_update(screen, bitmap, cliprect, 0, 159); } else { - m_video->hgr_update(screen, bitmap, cliprect, 0, 159); + m_video->hgr_update(screen, bitmap, cliprect, 0, 159); } m_video->text_update(screen, bitmap, cliprect, 160, 191); } @@ -848,8 +848,8 @@ UINT32 apple2e_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, } } } - else // lo-res - { + else // lo-res + { if (m_video->m_mix) { if (m_video->m_dhires) @@ -867,11 +867,11 @@ UINT32 apple2e_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, { if (m_video->m_dhires) { - m_video->dlores_update(screen, bitmap, cliprect, 0, 191); + m_video->dlores_update(screen, bitmap, cliprect, 0, 191); } else { - m_video->lores_update(screen, bitmap, cliprect, 0, 191); + m_video->lores_update(screen, bitmap, cliprect, 0, 191); } } } @@ -886,7 +886,7 @@ UINT32 apple2e_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -/*************************************************************************** +/*************************************************************************** I/O ***************************************************************************/ void apple2e_state::auxbank_update() @@ -954,16 +954,16 @@ void apple2e_state::update_slotrom_banks() m_c100bank->set_bank(cxswitch); m_c400bank->set_bank(cxswitch); -// printf("intcxrom %d cnxx_slot %d isiic %d romswitch %d\n", m_intcxrom, m_cnxx_slot, m_isiic, m_romswitch); +// printf("intcxrom %d cnxx_slot %d isiic %d romswitch %d\n", m_intcxrom, m_cnxx_slot, m_isiic, m_romswitch); if ((m_intcxrom) || (m_cnxx_slot < 0) || (m_isiic)) { if (m_romswitch) { - m_c800bank->set_bank(2); + m_c800bank->set_bank(2); } else { - m_c800bank->set_bank(1); + m_c800bank->set_bank(1); } } else @@ -975,16 +975,16 @@ void apple2e_state::update_slotrom_banks() { if (m_romswitch) { - m_c300bank->set_bank(2); + m_c300bank->set_bank(2); } else { - m_c300bank->set_bank(1); + m_c300bank->set_bank(1); } } else { - m_c300bank->set_bank(0); + m_c300bank->set_bank(0); } } @@ -1018,27 +1018,27 @@ void apple2e_state::lc_update(int offset) { if (m_lcram) { - m_lcbank->set_bank(1); + m_lcbank->set_bank(1); } else { if (m_romswitch) { - m_lcbank->set_bank(2); + m_lcbank->set_bank(2); } else { - m_lcbank->set_bank(0); + m_lcbank->set_bank(0); } } } #if 0 - printf("LC: new state %c%c dxxx=%04x altzp=%d\n", - m_lcram ? 'R' : 'x', - m_lcwriteenable ? 'W' : 'x', - m_lcram2 ? 0x1000 : 0x0000, - m_altzp); + printf("LC: new state %c%c dxxx=%04x altzp=%d\n", + m_lcram ? 'R' : 'x', + m_lcwriteenable ? 'W' : 'x', + m_lcram2 ? 0x1000 : 0x0000, + m_altzp); #endif } @@ -1055,35 +1055,35 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) { switch (offset) { - case 0x58: // DisXY + case 0x58: // DisXY m_xy = false; break; - case 0x59: // EnbXY + case 0x59: // EnbXY m_xy = true; break; - case 0x5a: // DisVBL + case 0x5a: // DisVBL m_vblmask = false; break; - case 0x5b: // EnVBL + case 0x5b: // EnVBL m_vblmask = true; break; - case 0x5c: // RisX0Edge + case 0x5c: // RisX0Edge m_x0edge = false; break; - case 0x5d: // FalX0Edge + case 0x5d: // FalX0Edge m_x0edge = true; break; - case 0x5e: // RisY0Edge + case 0x5e: // RisY0Edge if (!m_ioudis) { - m_y0edge = false; + m_y0edge = false; } break; - case 0x5f: // FalY0Edge + case 0x5f: // FalY0Edge if (!m_ioudis) { - m_y0edge = true; + m_y0edge = true; } break; } @@ -1091,14 +1091,14 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) if (m_ioudis) { - switch (offset) + switch (offset) { - case 0x5e: // SETDHIRES - m_video->m_dhires = true; + case 0x5e: // SETDHIRES + m_video->m_dhires = true; break; - case 0x5f: // CLRDHIRES - m_video->m_dhires = false; + case 0x5f: // CLRDHIRES + m_video->m_dhires = false; break; } } @@ -1111,7 +1111,7 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) case 0x20: if (m_cassette) { - m_cassette_state ^= 1; + m_cassette_state ^= 1; m_cassette->output(m_cassette_state ? 1.0f : -1.0f); } break; @@ -1127,11 +1127,11 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) { if (m_romswitch) { - m_lcbank->set_bank(2); + m_lcbank->set_bank(2); } else { - m_lcbank->set_bank(0); + m_lcbank->set_bank(0); } } } @@ -1142,7 +1142,7 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) m_speaker->level_w(m_speaker_state); break; - case 0x48: // (IIc only) clear mouse X/Y interrupt flags + case 0x48: // (IIc only) clear mouse X/Y interrupt flags m_xirq = m_yirq = false; lower_irq(IRQ_MOUSEXY); break; @@ -1160,24 +1160,24 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) m_video->m_mix = true; break; case 0x54: // set page 1 - m_page2 = false; + m_page2 = false; m_video->m_page2 = false; auxbank_update(); break; case 0x55: // set page 2 - m_page2 = true; + m_page2 = true; m_video->m_page2 = true; auxbank_update(); break; case 0x56: // select lo-res - m_video->m_hires = false; + m_video->m_hires = false; auxbank_update(); break; case 0x57: // select hi-res - m_video->m_hires = true; + m_video->m_hires = true; auxbank_update(); break; @@ -1205,10 +1205,10 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) case 0x5f: // AN3 on m_an3 = true; break; - case 0x68: // IIgs STATE register, which ProDOS touches + case 0x68: // IIgs STATE register, which ProDOS touches break; - // trigger joypad read + // trigger joypad read case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: if (is_iic) @@ -1238,22 +1238,22 @@ READ8_MEMBER(apple2e_state::c000_r) case 0x00: // keyboard latch return m_transchar | m_strobe; - case 0x02: // RAMRDOFF + case 0x02: // RAMRDOFF m_ramrd = false; auxbank_update(); break; - case 0x03: // RAMRDON + case 0x03: // RAMRDON m_ramrd = true; auxbank_update(); break; - case 0x04: // RAMWRTOFF + case 0x04: // RAMWRTOFF m_ramwrt = false; auxbank_update(); break; - case 0x05: // RAMWRTON + case 0x05: // RAMWRTON m_ramwrt = true; auxbank_update(); break; @@ -1265,76 +1265,76 @@ READ8_MEMBER(apple2e_state::c000_r) return rv; } - case 0x11: // read LCRAM2 (LC Dxxx bank) + case 0x11: // read LCRAM2 (LC Dxxx bank) return m_lcram2 ? 0x80 : 0x00; - case 0x12: // read LCRAM (is LC readable?) + case 0x12: // read LCRAM (is LC readable?) return m_lcram ? 0x80 : 0x00; - case 0x13: // read RAMRD + case 0x13: // read RAMRD return m_ramrd ? 0x80 : 0x00; - case 0x14: // read RAMWRT + case 0x14: // read RAMWRT return m_ramwrt ? 0x80 : 0x00; - case 0x15: // read INTCXROM + case 0x15: // read INTCXROM return m_intcxrom ? 0x80 : 0x00; - case 0x16: // read ALTZP + case 0x16: // read ALTZP return m_altzp ? 0x80 : 0x00; - case 0x17: // read SLOTC3ROM + case 0x17: // read SLOTC3ROM return m_slotc3rom ? 0x80 : 0x00; - case 0x18: // read 80STORE + case 0x18: // read 80STORE return m_80store ? 0x80 : 0x00; - case 0x19: // read VBLBAR + case 0x19: // read VBLBAR return space.machine().first_screen()->vblank() ? 0x00 : 0x80; - case 0x1a: // read TEXT + case 0x1a: // read TEXT return m_video->m_graphics ? 0x00 : 0x80; - case 0x1b: // read MIXED + case 0x1b: // read MIXED return m_video->m_mix ? 0x80 : 0x00; - case 0x1c: // read PAGE2 + case 0x1c: // read PAGE2 return m_page2 ? 0x80 : 0x00; - case 0x1d: // read HIRES + case 0x1d: // read HIRES return m_video->m_hires ? 0x80 : 0x00; - case 0x1e: // read ALTCHARSET + case 0x1e: // read ALTCHARSET return m_video->m_altcharset ? 0x80 : 0x00; - case 0x1f: // read 80COL + case 0x1f: // read 80COL return m_video->m_80col ? 0x80 : 0x00; case 0x60: // cassette in case 0x68: if (m_cassette) { - return m_cassette->input() > 0.0 ? 0x80 : 0; + return m_cassette->input() > 0.0 ? 0x80 : 0; } return 0; - case 0x61: // button 0 or Open Apple + case 0x61: // button 0 or Open Apple case 0x69: return ((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0; - case 0x62: // button 1 or Solid Apple + case 0x62: // button 1 or Solid Apple case 0x6a: return ((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0; - case 0x63: // button 2 or SHIFT key + case 0x63: // button 2 or SHIFT key case 0x6b: return ((m_joybuttons->read() & 0x40) || (m_kbspecial->read() & 0x06)) ? 0x80 : 0; - case 0x64: // joy 1 X axis + case 0x64: // joy 1 X axis case 0x6c: return (space.machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0; - case 0x65: // joy 1 Y axis + case 0x65: // joy 1 Y axis case 0x6d: return (space.machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0; @@ -1346,10 +1346,10 @@ READ8_MEMBER(apple2e_state::c000_r) case 0x6f: return (space.machine().time().as_double() < m_joystick_y2_time) ? 0x80 : 0; - case 0x7e: // read IOUDIS + case 0x7e: // read IOUDIS return m_ioudis ? 0x80 : 0x00; - case 0x7f: // read DHIRES + case 0x7f: // read DHIRES return m_video->m_dhires ? 0x00 : 0x80; default: @@ -1366,79 +1366,79 @@ WRITE8_MEMBER(apple2e_state::c000_w) switch (offset) { - case 0x00: // 80STOREOFF + case 0x00: // 80STOREOFF m_80store = false; auxbank_update(); break; - case 0x01: // 80STOREON + case 0x01: // 80STOREON m_80store = true; auxbank_update(); break; - case 0x02: // RAMRDOFF + case 0x02: // RAMRDOFF m_ramrd = false; auxbank_update(); break; - case 0x03: // RAMRDON + case 0x03: // RAMRDON m_ramrd = true; auxbank_update(); break; - case 0x04: // RAMWRTOFF + case 0x04: // RAMWRTOFF m_ramwrt = false; auxbank_update(); break; - case 0x05: // RAMWRTON + case 0x05: // RAMWRTON m_ramwrt = true; auxbank_update(); break; - case 0x06: // INTCXROMOFF + case 0x06: // INTCXROMOFF m_intcxrom = false; update_slotrom_banks(); break; - case 0x07: // INTCXROMON + case 0x07: // INTCXROMON m_intcxrom = true; update_slotrom_banks(); break; - case 0x08: // ALTZPOFF + case 0x08: // ALTZPOFF m_altzp = false; auxbank_update(); break; - case 0x09: // ALTZPON + case 0x09: // ALTZPON m_altzp = true; auxbank_update(); break; - case 0x0a: // SETINTC3ROM + case 0x0a: // SETINTC3ROM m_slotc3rom = false; update_slotrom_banks(); break; - case 0x0b: // SETSLOTC3ROM + case 0x0b: // SETSLOTC3ROM m_slotc3rom = true; update_slotrom_banks(); break; - case 0x0c: // 80COLOFF + case 0x0c: // 80COLOFF m_video->m_80col = false; break; - case 0x0d: // 80COLON + case 0x0d: // 80COLON m_video->m_80col = true; break; - case 0x0e: // ALTCHARSETOFF + case 0x0e: // ALTCHARSETOFF m_video->m_altcharset = false; break; - case 0x0f: // ALTCHARSETON + case 0x0f: // ALTCHARSETON m_video->m_altcharset = true; break; @@ -1446,10 +1446,10 @@ WRITE8_MEMBER(apple2e_state::c000_w) m_strobe = 0; break; - case 0x20: // cassette output + case 0x20: // cassette output if (m_cassette) { - m_cassette_out ^= 1; + m_cassette_out ^= 1; m_cassette->output(m_cassette_out ? 1.0f : -1.0f); } break; @@ -1463,13 +1463,13 @@ WRITE8_MEMBER(apple2e_state::c000_w) // card may have banked auxram; get a new bank pointer m_aux_bank_ptr = m_auxslotdevice->get_auxbank_ptr(); } - do_io(space, offset, false); // make sure it also side-effect resets the paddles as documented + do_io(space, offset, false); // make sure it also side-effect resets the paddles as documented break; - case 0x7e: // SETIOUDIS + case 0x7e: // SETIOUDIS m_ioudis = true; break; - case 0x7f: // CLRIOUDIS + case 0x7f: // CLRIOUDIS m_ioudis = false; break; default: @@ -1487,114 +1487,114 @@ READ8_MEMBER(apple2e_state::c000_iic_r) case 0x00: // keyboard latch return m_transchar | m_strobe; - case 0x02: // RAMRDOFF + case 0x02: // RAMRDOFF m_ramrd = false; auxbank_update(); break; - case 0x03: // RAMRDON + case 0x03: // RAMRDON m_ramrd = true; auxbank_update(); break; - case 0x04: // RAMWRTOFF + case 0x04: // RAMWRTOFF m_ramwrt = false; auxbank_update(); break; - case 0x05: // RAMWRTON + case 0x05: // RAMWRTON m_ramwrt = true; auxbank_update(); break; - case 0x10: // read any key down, reset keyboard strobe + case 0x10: // read any key down, reset keyboard strobe { UINT8 rv = m_transchar | m_anykeydown; m_strobe = 0; return rv; } - case 0x11: // read LCRAM2 (LC Dxxx bank) + case 0x11: // read LCRAM2 (LC Dxxx bank) return m_lcram2 ? 0x80 : 0x00; - break; + break; - case 0x12: // read LCRAM (is LC readable?) + case 0x12: // read LCRAM (is LC readable?) return m_lcram ? 0x80 : 0x00; break; - case 0x13: // read RAMRD + case 0x13: // read RAMRD return m_ramrd ? 0x80 : 0x00; - case 0x14: // read RAMWRT + case 0x14: // read RAMWRT return m_ramwrt ? 0x80 : 0x00; - case 0x15: // read & reset mouse X0 interrupt flag + case 0x15: // read & reset mouse X0 interrupt flag lower_irq(IRQ_MOUSEXY); return m_xirq ? 0x80 : 0x00; - case 0x16: // read ALTZP + case 0x16: // read ALTZP return m_altzp ? 0x80 : 0x00; - case 0x17: // read & reset mouse Y0 interrupt flag + case 0x17: // read & reset mouse Y0 interrupt flag lower_irq(IRQ_MOUSEXY); return m_yirq ? 0x80 : 0x00; - case 0x18: // read 80STORE + case 0x18: // read 80STORE return m_80store ? 0x80 : 0x00; - case 0x19: // read VBL + case 0x19: // read VBL return m_vbl ? 0x80 : 0x00; - case 0x1a: // read TEXT + case 0x1a: // read TEXT return m_video->m_graphics ? 0x00 : 0x80; - case 0x1b: // read MIXED + case 0x1b: // read MIXED return m_video->m_mix ? 0x80 : 0x00; - case 0x1c: // read PAGE2 + case 0x1c: // read PAGE2 return m_page2 ? 0x80 : 0x00; - case 0x1d: // read HIRES + case 0x1d: // read HIRES return m_video->m_hires ? 0x80 : 0x00; - case 0x1e: // read ALTCHARSET + case 0x1e: // read ALTCHARSET return m_video->m_altcharset ? 0x80 : 0x00; - case 0x1f: // read 80COL + case 0x1f: // read 80COL return m_video->m_80col ? 0x80 : 0x00; - case 0x40: // read XYMask (IIc only) + case 0x40: // read XYMask (IIc only) return m_xy ? 0x80 : 0x00; - case 0x41: // read VBL mask (IIc only) + case 0x41: // read VBL mask (IIc only) return m_vblmask ? 0x80 : 0x00; - case 0x42: // read X0Edge (IIc only) + case 0x42: // read X0Edge (IIc only) return m_x0edge ? 0x80 : 0x00; - case 0x43: // read Y0Edge (IIc only) + case 0x43: // read Y0Edge (IIc only) return m_y0edge ? 0x80 : 0x00; case 0x60: // 40/80 column switch (IIc only) return (m_sysconfig->read() & 0x04) ? 0x80 : 0; - case 0x61: // button 0 or Open Apple or mouse button 1 + case 0x61: // button 0 or Open Apple or mouse button 1 case 0x69: return ((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0; - case 0x62: // button 1 or Solid Apple + case 0x62: // button 1 or Solid Apple case 0x6a: return ((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0; - case 0x63: // mouse button 2 (no other function on IIc) + case 0x63: // mouse button 2 (no other function on IIc) case 0x6b: return m_mouseb->read() ? 0 : 0x80; - case 0x64: // joy 1 X axis + case 0x64: // joy 1 X axis case 0x6c: return (space.machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0; - case 0x65: // joy 1 Y axis + case 0x65: // joy 1 Y axis case 0x6d: return (space.machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0; @@ -1606,12 +1606,12 @@ READ8_MEMBER(apple2e_state::c000_iic_r) case 0x6f: return m_y1 ? 0x80 : 0; - case 0x7e: // read IOUDIS + case 0x7e: // read IOUDIS m_vbl = false; lower_irq(IRQ_VBL); return m_ioudis ? 0x80 : 0x00; - case 0x7f: // read DHIRES + case 0x7f: // read DHIRES return m_video->m_dhires ? 0x00 : 0x80; default: @@ -1628,79 +1628,79 @@ WRITE8_MEMBER(apple2e_state::c000_iic_w) switch (offset) { - case 0x00: // 80STOREOFF + case 0x00: // 80STOREOFF m_80store = false; auxbank_update(); break; - case 0x01: // 80STOREON + case 0x01: // 80STOREON m_80store = true; auxbank_update(); break; - case 0x02: // RAMRDOFF + case 0x02: // RAMRDOFF m_ramrd = false; auxbank_update(); break; - case 0x03: // RAMRDON + case 0x03: // RAMRDON m_ramrd = true; auxbank_update(); break; - case 0x04: // RAMWRTOFF + case 0x04: // RAMWRTOFF m_ramwrt = false; auxbank_update(); break; - case 0x05: // RAMWRTON + case 0x05: // RAMWRTON m_ramwrt = true; auxbank_update(); break; - case 0x06: // INTCXROMOFF + case 0x06: // INTCXROMOFF m_intcxrom = false; update_slotrom_banks(); break; - case 0x07: // INTCXROMON + case 0x07: // INTCXROMON m_intcxrom = true; update_slotrom_banks(); break; - case 0x08: // ALTZPOFF + case 0x08: // ALTZPOFF m_altzp = false; auxbank_update(); break; - case 0x09: // ALTZPON + case 0x09: // ALTZPON m_altzp = true; auxbank_update(); break; - case 0x0a: // SETINTC3ROM + case 0x0a: // SETINTC3ROM m_slotc3rom = false; update_slotrom_banks(); break; - case 0x0b: // SETSLOTC3ROM + case 0x0b: // SETSLOTC3ROM m_slotc3rom = true; update_slotrom_banks(); break; - case 0x0c: // 80COLOFF + case 0x0c: // 80COLOFF m_video->m_80col = false; break; - case 0x0d: // 80COLON + case 0x0d: // 80COLON m_video->m_80col = true; break; - case 0x0e: // ALTCHARSETOFF + case 0x0e: // ALTCHARSETOFF m_video->m_altcharset = false; break; - case 0x0f: // ALTCHARSETON + case 0x0f: // ALTCHARSETON m_video->m_altcharset = true; break; @@ -1714,12 +1714,12 @@ WRITE8_MEMBER(apple2e_state::c000_iic_w) lower_irq(IRQ_VBL); break; - case 0x7e: // SETIOUDIS - m_ioudis = true; + case 0x7e: // SETIOUDIS + m_ioudis = true; break; - case 0x7f: // CLRIOUDIS - m_ioudis = false; + case 0x7f: // CLRIOUDIS + m_ioudis = false; break; default: @@ -1835,7 +1835,7 @@ READ8_MEMBER(apple2e_state::c080_r) } else { - if (m_slotdevice[slot] != NULL) + if (m_slotdevice[slot] != NULL) { return m_slotdevice[slot]->read_c0nx(space, offset % 0x10); } @@ -1867,7 +1867,7 @@ WRITE8_MEMBER(apple2e_state::c080_w) UINT8 apple2e_state::read_slot_rom(address_space &space, int slotbias, int offset) { - int slotnum = ((offset>>8) & 0xf) + slotbias; + int slotnum = ((offset>>8) & 0xf) + slotbias; if (m_slotdevice[slotnum] != NULL) { @@ -1970,10 +1970,10 @@ READ8_MEMBER(apple2e_state::inh_r) { if (m_inh_slot != -1) { - return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000); + return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000); } - assert(0); // hitting inh_r with invalid m_inh_slot should not be possible + assert(0); // hitting inh_r with invalid m_inh_slot should not be possible return read_floatingbus(); } @@ -1989,9 +1989,9 @@ READ8_MEMBER(apple2e_state::lc_r) { if (m_altzp) { - if (m_aux_bank_ptr) - { - if (offset < 0x1000) + if (m_aux_bank_ptr) + { + if (offset < 0x1000) { if (m_lcram2) { @@ -2004,15 +2004,15 @@ READ8_MEMBER(apple2e_state::lc_r) } return m_aux_bank_ptr[(offset & 0x1fff) + 0xe000]; - } - else - { - return read_floatingbus(); + } + else + { + return read_floatingbus(); } } else { - if (offset < 0x1000) + if (offset < 0x1000) { if (m_lcram2) { @@ -2038,8 +2038,8 @@ WRITE8_MEMBER(apple2e_state::lc_w) if (m_altzp) { if (m_aux_bank_ptr) - { - if (offset < 0x1000) + { + if (offset < 0x1000) { if (m_lcram2) { @@ -2057,7 +2057,7 @@ WRITE8_MEMBER(apple2e_state::lc_w) } else { - if (offset < 0x1000) + if (offset < 0x1000) { if (m_lcram2) { @@ -2295,8 +2295,8 @@ static ADDRESS_MAP_START( laser128_map, AS_PROGRAM, 8, apple2e_state ) AM_RANGE(0x2000, 0x3fff) AM_DEVICE(A2_2000_TAG, address_map_bank_device, amap8) AM_RANGE(0x4000, 0xbfff) AM_DEVICE(A2_4000_TAG, address_map_bank_device, amap8) AM_RANGE(0xc000, 0xc07f) AM_READWRITE(c000_r, c000_w) -// AM_RANGE(0xc098, 0xc09b) AM_DEVREADWRITE(IIC_ACIA1_TAG, mos6551_device, read, write) -// AM_RANGE(0xc0a8, 0xc0ab) AM_DEVREADWRITE(IIC_ACIA2_TAG, mos6551_device, read, write) +// AM_RANGE(0xc098, 0xc09b) AM_DEVREADWRITE(IIC_ACIA1_TAG, mos6551_device, read, write) +// AM_RANGE(0xc0a8, 0xc0ab) AM_DEVREADWRITE(IIC_ACIA2_TAG, mos6551_device, read, write) AM_RANGE(0xc0d0, 0xc0d3) AM_READWRITE(memexp_r, memexp_w) AM_RANGE(0xc0e0, 0xc0ef) AM_DEVREADWRITE(LASER128_UDC_TAG, applefdc_base_device, read, write) AM_RANGE(0xc080, 0xc0ff) AM_READWRITE(c080_r, c080_w) @@ -2309,20 +2309,20 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( r0000bank_map, AS_PROGRAM, 8, apple2e_state ) AM_RANGE(0x0000, 0x01ff) AM_READWRITE(ram0000_r, ram0000_w) - AM_RANGE(0x0200, 0x03ff) AM_READWRITE(auxram0000_r, auxram0000_w) + AM_RANGE(0x0200, 0x03ff) AM_READWRITE(auxram0000_r, auxram0000_w) ADDRESS_MAP_END static ADDRESS_MAP_START( r0200bank_map, AS_PROGRAM, 8, apple2e_state ) - AM_RANGE(0x0000, 0x01ff) AM_READWRITE(ram0200_r, ram0200_w) // wr 0 rd 0 + AM_RANGE(0x0000, 0x01ff) AM_READWRITE(ram0200_r, ram0200_w) // wr 0 rd 0 AM_RANGE(0x0200, 0x03ff) AM_READWRITE(auxram0200_r, ram0200_w) // wr 0 rd 1 AM_RANGE(0x0400, 0x05ff) AM_READWRITE(ram0200_r, auxram0200_w) // wr 1 rd 0 AM_RANGE(0x0600, 0x07ff) AM_READWRITE(auxram0200_r, auxram0200_w) // wr 1 rd 1 ADDRESS_MAP_END static ADDRESS_MAP_START( r0400bank_map, AS_PROGRAM, 8, apple2e_state ) - AM_RANGE(0x0000, 0x03ff) AM_READWRITE(ram0400_r, ram0400_w) // wr 0 rd 0 - AM_RANGE(0x0400, 0x07ff) AM_READWRITE(auxram0400_r, ram0400_w) // wr 0 rd 1 - AM_RANGE(0x0800, 0x0bff) AM_READWRITE(ram0400_r, auxram0400_w) // wr 1 rd 0 + AM_RANGE(0x0000, 0x03ff) AM_READWRITE(ram0400_r, ram0400_w) // wr 0 rd 0 + AM_RANGE(0x0400, 0x07ff) AM_READWRITE(auxram0400_r, ram0400_w) // wr 0 rd 1 + AM_RANGE(0x0800, 0x0bff) AM_READWRITE(ram0400_r, auxram0400_w) // wr 1 rd 0 AM_RANGE(0x0c00, 0x0fff) AM_READWRITE(auxram0400_r, auxram0400_w) // wr 1 rd 1 ADDRESS_MAP_END @@ -2330,21 +2330,21 @@ static ADDRESS_MAP_START( r0800bank_map, AS_PROGRAM, 8, apple2e_state ) AM_RANGE(0x0000, 0x17ff) AM_READWRITE(ram0800_r, ram0800_w) AM_RANGE(0x2000, 0x37ff) AM_READWRITE(auxram0800_r, ram0800_w) AM_RANGE(0x4000, 0x57ff) AM_READWRITE(ram0800_r, auxram0800_w) - AM_RANGE(0x6000, 0x77ff) AM_READWRITE(auxram0800_r, auxram0800_w) + AM_RANGE(0x6000, 0x77ff) AM_READWRITE(auxram0800_r, auxram0800_w) ADDRESS_MAP_END static ADDRESS_MAP_START( r2000bank_map, AS_PROGRAM, 8, apple2e_state ) AM_RANGE(0x0000, 0x1fff) AM_READWRITE(ram2000_r, ram2000_w) AM_RANGE(0x2000, 0x3fff) AM_READWRITE(auxram2000_r, ram2000_w) AM_RANGE(0x4000, 0x5fff) AM_READWRITE(ram2000_r, auxram2000_w) - AM_RANGE(0x6000, 0x7fff) AM_READWRITE(auxram2000_r, auxram2000_w) + AM_RANGE(0x6000, 0x7fff) AM_READWRITE(auxram2000_r, auxram2000_w) ADDRESS_MAP_END static ADDRESS_MAP_START( r4000bank_map, AS_PROGRAM, 8, apple2e_state ) AM_RANGE(0x00000, 0x07fff) AM_READWRITE(ram4000_r, ram4000_w) AM_RANGE(0x08000, 0x0ffff) AM_READWRITE(auxram4000_r, ram4000_w) AM_RANGE(0x10000, 0x17fff) AM_READWRITE(ram4000_r, auxram4000_w) - AM_RANGE(0x18000, 0x1ffff) AM_READWRITE(auxram4000_r, auxram4000_w) + AM_RANGE(0x18000, 0x1ffff) AM_READWRITE(auxram4000_r, auxram4000_w) ADDRESS_MAP_END static ADDRESS_MAP_START( c100bank_map, AS_PROGRAM, 8, apple2e_state ) @@ -2372,7 +2372,7 @@ static ADDRESS_MAP_START( c800bank_map, AS_PROGRAM, 8, apple2e_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( inhbank_map, AS_PROGRAM, 8, apple2e_state ) - AM_RANGE(0x0000, 0x2fff) AM_DEVICE(A2_LCBANK_TAG, address_map_bank_device, amap8) + AM_RANGE(0x0000, 0x2fff) AM_DEVICE(A2_LCBANK_TAG, address_map_bank_device, amap8) AM_RANGE(0x3000, 0x5fff) AM_READWRITE(inh_r, inh_w) ADDRESS_MAP_END @@ -2424,10 +2424,10 @@ WRITE_LINE_MEMBER(apple2e_state::ay3600_data_ready_w) trans |= (m_kbspecial->read() & 0x01) ? 0x0000 : 0x0200; // caps lock is bit 9 (active low) if (m_isiic) - { + { if (m_sysconfig->read() & 0x08) { - trans += 0x400; // go to DVORAK half of the ROM + trans += 0x400; // go to DVORAK half of the ROM } } @@ -2459,7 +2459,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple2e_state::ay3600_repeat) } else { - m_strobe = 0x80; + m_strobe = 0x80; } } } @@ -3169,7 +3169,7 @@ static MACHINE_CONFIG_START( apple2e, apple2e_state ) MCFG_AY3600_SHIFT_CB(READLINE(apple2e_state, ay3600_shift_r)) MCFG_AY3600_CONTROL_CB(READLINE(apple2e_state, ay3600_control_r)) MCFG_AY3600_DATA_READY_CB(WRITELINE(apple2e_state, ay3600_data_ready_w)) - MCFG_AY3600_AKO_CB(WRITELINE(apple2e_state, ay3600_ako_w)) + MCFG_AY3600_AKO_CB(WRITELINE(apple2e_state, ay3600_ako_w)) /* repeat timer. 15 Hz from page 7-15 of "Understanding the Apple IIe" */ MCFG_TIMER_DRIVER_ADD_PERIODIC("repttmr", apple2e_state, ay3600_repeat, attotime::from_hz(15)) @@ -3215,8 +3215,8 @@ static MACHINE_CONFIG_DERIVED( tk3000, apple2e ) MCFG_CPU_REPLACE("maincpu", M65C02, 1021800) /* close to actual CPU frequency of 1.020484 MHz */ MCFG_CPU_PROGRAM_MAP(apple2e_map) -// MCFG_CPU_ADD("subcpu", Z80, 1021800) // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock -// MCFG_CPU_PROGRAM_MAP(tk3000_kbd_map) +// MCFG_CPU_ADD("subcpu", Z80, 1021800) // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock +// MCFG_CPU_PROGRAM_MAP(tk3000_kbd_map) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( apple2ep, apple2e ) @@ -3597,4 +3597,3 @@ COMP( 1985, apple2c0, apple2c, 0, apple2c_iwm, apple2c, driver_device, COMP( 1986, apple2c3, apple2c, 0, apple2c_mem, apple2c, driver_device, 0, "Apple Computer", "Apple //c (Original Memory Expansion)", GAME_SUPPORTS_SAVE ) COMP( 1986, apple2c4, apple2c, 0, apple2c_mem, apple2c, driver_device, 0, "Apple Computer", "Apple //c (rev 4)", GAME_SUPPORTS_SAVE ) COMP( 1988, apple2cp, apple2c, 0, apple2cp, apple2c, driver_device, 0, "Apple Computer", "Apple //c Plus", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) - diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c index ba62948018f..d5d35416be3 100644 --- a/src/mess/drivers/apple2gs.c +++ b/src/mess/drivers/apple2gs.c @@ -143,7 +143,7 @@ PALETTE_INIT_MEMBER(apple2gs_state,apple2gs) { int i; -// PALETTE_INIT_NAME(apple2)(palette); +// PALETTE_INIT_NAME(apple2)(palette); for (i = 0; i < 16; i++) { diff --git a/src/mess/drivers/comp4.c b/src/mess/drivers/comp4.c index 2f29b3d28de..6259553bfa7 100644 --- a/src/mess/drivers/comp4.c +++ b/src/mess/drivers/comp4.c @@ -4,11 +4,11 @@ Milton Bradley Comp IV * TMC0904NL CP0904A (die labeled 4A0970D-04A) - + This is a handheld Mastermind game; a code-breaking game where the player needs to find out the correct sequence of colours (numbers in our case). It is known as Logic 5 in Europe, and as Pythaligoras in Japan. - + Press the R key to start, followed by a set of unique numbers and E. Refer to the official manual for more information. @@ -63,7 +63,7 @@ READ8_MEMBER(comp4_state::read_k) for (int i = 0; i < 3; i++) if (m_o & (1 << (i + 1))) k |= m_button_matrix[i]->read(); - + return k; } diff --git a/src/mess/drivers/dvk_ksm.c b/src/mess/drivers/dvk_ksm.c index 778cc6b6ba1..73413043813 100644 --- a/src/mess/drivers/dvk_ksm.c +++ b/src/mess/drivers/dvk_ksm.c @@ -18,15 +18,15 @@ F4 + 0..9 on numeric keypad = setup mode. 0 changes serial port speed, 1..9 toggle one of mode bits: - 1 XON/XOFF 0: Off 1: On - 2 Character set 0: N0/N1 2: N2 - 3 Auto LF 0: Off 1: On - 4 Auto repeat 0: On 1: Off - 5 Auto wraparound 0: On 1: Off - 6 Interpret controls 0: Interpret 1: Display - 7 Parity check 0: Off 1: On - 8 Parity bits 0: None 1: Even - 9 Stop bits + 1 XON/XOFF 0: Off 1: On + 2 Character set 0: N0/N1 2: N2 + 3 Auto LF 0: Off 1: On + 4 Auto repeat 0: On 1: Off + 5 Auto wraparound 0: On 1: Off + 6 Interpret controls 0: Interpret 1: Display + 7 Parity check 0: Off 1: On + 8 Parity bits 0: None 1: Even + 9 Stop bits N0/N1 charset has regular ASCII in C0 page and Cyrillic in C1 page, switching between them via SI/SO. N2 charset has uppercase Cyrillic @@ -39,9 +39,9 @@ Terminfo description would be something like ksm|DVK KSM, - am, bw, dch1=\EP, ich1=\EQ, - acsc=hRiTjXkClJmFnNqUtEuPv\174wKxW.M\054Q\055S\053\136~_{@}Z0\177, - use=vt52, + am, bw, dch1=\EP, ich1=\EQ, + acsc=hRiTjXkClJmFnNqUtEuPv\174wKxW.M\054Q\055S\053\136~_{@}Z0\177, + use=vt52, To do: - make Caps Lock work @@ -220,8 +220,8 @@ WRITE8_MEMBER(ksm_state::ksm_ppi_portc_w) WRITE_LINE_MEMBER(ksm_state::write_keyboard_clock) { -// KSM never sends data to keyboard -// m_i8251kbd->write_txc(state); +// KSM never sends data to keyboard +// m_i8251kbd->write_txc(state); m_i8251kbd->write_rxc(state); } @@ -284,7 +284,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ksm_state::scanline_callback) { UINT16 y = m_screen->vpos(); UINT16 offset; - + DBG_LOG(2,"scanline_cb", ("addr %02x frame %" I64FMT "d x %.4d y %.3d row %.2d\n", m_video.line, m_screen->frame_number(), m_screen->hpos(), y, y%11)); @@ -384,8 +384,8 @@ MACHINE_CONFIG_END /* - Assumes that SRAM is at 0x2000, which is where technical manual puts it. - Chargen has 1 missing pixel in 'G' character. + Assumes that SRAM is at 0x2000, which is where technical manual puts it. + Chargen has 1 missing pixel in 'G' character. */ ROM_START( dvk_ksm ) ROM_REGION(0x1000, "maincpu", ROMREGION_ERASE00) @@ -397,8 +397,8 @@ ROM_START( dvk_ksm ) ROM_END /* - Assumes that SRAM is at 0x2100, otherwise identical. - Chargen has no missing pixels in 'G' character. + Assumes that SRAM is at 0x2100, otherwise identical. + Chargen has no missing pixels in 'G' character. */ ROM_START( dvk_ksm01 ) ROM_REGION(0x1000, "maincpu", ROMREGION_ERASE00) diff --git a/src/mess/drivers/ec184x.c b/src/mess/drivers/ec184x.c index 16b9026a4f8..44f366d325b 100644 --- a/src/mess/drivers/ec184x.c +++ b/src/mess/drivers/ec184x.c @@ -232,7 +232,7 @@ static MACHINE_CONFIG_START( ec1840, ec184x_state ) MCFG_DEVICE_INPUT_DEFAULTS(ec1840) MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1840.0002", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // actually ec1840.0003 -- w/o mouse port + MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // actually ec1840.0003 -- w/o mouse port MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", ec184x_isa8_cards, NULL, false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, NULL, false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, NULL, false) @@ -258,8 +258,8 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state ) MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu") MCFG_DEVICE_INPUT_DEFAULTS(ec1841) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1841.0002", false) // cga - MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // fdc + mouse port + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1841.0002", false) // cga + MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // fdc + mouse port MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", ec184x_isa8_cards, "hdc", false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, NULL, false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, NULL, false) diff --git a/src/mess/drivers/gamate.c b/src/mess/drivers/gamate.c index 1728c3eedae..57adbc5a5e9 100644 --- a/src/mess/drivers/gamate.c +++ b/src/mess/drivers/gamate.c @@ -67,7 +67,7 @@ WRITE8_MEMBER( gamate_state::video_w ) case 5: video.y=data;break; case 7: if (video.bitmap.write) { - if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/) + if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/) video.bitmap.data[video.bitmap.page2][video.y][video.x]=data; else logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x); diff --git a/src/mess/drivers/iskr103x.c b/src/mess/drivers/iskr103x.c index c3dae58dadf..25717bc57d7 100644 --- a/src/mess/drivers/iskr103x.c +++ b/src/mess/drivers/iskr103x.c @@ -77,7 +77,7 @@ static MACHINE_CONFIG_START( iskr1030m, iskr103x_state ) MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") MCFG_DEVICE_INPUT_DEFAULTS(iskr1030m) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1030m", false) // actually MDA? + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1030m", false) // actually MDA? MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", iskr103x_isa8_cards, "fdc_xt", false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, NULL, false) // hdc is WIP MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, NULL, false) diff --git a/src/mess/drivers/leapster.c b/src/mess/drivers/leapster.c index ab8814a8d11..4ecebe4b2fe 100644 --- a/src/mess/drivers/leapster.c +++ b/src/mess/drivers/leapster.c @@ -1,33 +1,33 @@ -/* +/* LeapFrog - Leapster - educational system from 2003, software is all developed in MXFlash + educational system from 2003, software is all developed in MXFlash + + hwspecs - hwspecs - CPU: - Custom ASIC (ARCTangent 5.1 CPU @ 96MHz) + Custom ASIC (ARCTangent 5.1 CPU @ 96MHz) - Memory: - Leapster: 2MB onboard RAM, 256 bytes NVRAM. - Leapster2: 16MB RAM, 128kbytes NVRAM + Memory: + Leapster: 2MB onboard RAM, 256 bytes NVRAM. + Leapster2: 16MB RAM, 128kbytes NVRAM Media type: - Cartridges of 4-16MB with between 2 and 512kb NVRAM - - Graphics: - 4Mb ATI chip. + Cartridges of 4-16MB with between 2 and 512kb NVRAM + + Graphics: + 4Mb ATI chip. Audio: - Custom + Custom Screen: - 160x160 CSTN with touchscreen. + 160x160 CSTN with touchscreen. - - The Leapster 2 also has - USB 1.1 (client only) + full-sized SD slot. + + The Leapster 2 also has + USB 1.1 (client only) + full-sized SD slot. */ @@ -81,7 +81,7 @@ PCB - Handheld-Console: | | +------------| |------------+ | | C A R T R I D G E - S L O T | | - | | | | + | | | | | +-----------------------------+ | | | |ASY 310-10069 +-------------------+ | @@ -160,7 +160,7 @@ B1: 24L002B (GND)<- A2-| |-SCL VSS-| |-SDA +-----+ - + @@ -194,11 +194,11 @@ PCB - LEAPSTER-TV: | | C A R T R I D G E - S L O T | | | +-----------------------------+ | \ / - +-----------------------------------------------+ + +-----------------------------------------------+ + + + - - - diff --git a/src/mess/drivers/merlin.c b/src/mess/drivers/merlin.c index 1dba611ab9d..7934b30c4b8 100644 --- a/src/mess/drivers/merlin.c +++ b/src/mess/drivers/merlin.c @@ -2,7 +2,7 @@ Parker Bros Merlin handheld computer game * TMS1100NLL MP3404A-N2 (has internal ROM) - + To start a game, press NEW GAME, followed by a number: 1: Tic-Tac-Toe 2: Music Machine @@ -10,15 +10,15 @@ 4: Blackjack 13 5: Magic Square 6: Mindbender - + Refer to the official manual for more information on the games. - - + + Other handhelds assumed to be on similar hardware: - Dr. Smith - by Tomy, released in Japan (basically a white version of Merlin, let's assume for now that the ROM contents is identical) - Master Merlin - + Another sequel, called Split Second, looks like different hardware. @@ -96,7 +96,7 @@ SG = same game, CT = comp turn, NG = new game, HM = hit me */ READ8_MEMBER(merlin_state::read_k) { UINT8 k = 0; - + // read selected button rows for (int i = 0; i < 4; i++) if (m_o & (1 << i)) diff --git a/src/mess/drivers/ngen.c b/src/mess/drivers/ngen.c index d0faccdd97f..f70dfa31bcc 100644 --- a/src/mess/drivers/ngen.c +++ b/src/mess/drivers/ngen.c @@ -1,8 +1,8 @@ /* - Convergent NGen series + Convergent NGen series - 10-11-14 - Skeleton driver + 10-11-14 - Skeleton driver */ @@ -115,7 +115,7 @@ WRITE16_MEMBER(ngen_state::cpu_peripheral_cb) m_maincpu->device_t::memory().space(AS_IO).install_readwrite_handler(addr, addr + 0x3ff, read16_delegate(FUNC(ngen_state::peripheral_r), this), write16_delegate(FUNC(ngen_state::peripheral_w), this)); logerror("Mapped peripherals to I/O 0x%04x\n",addr); } - break; + break; case 4: m_middle = data; break; @@ -301,7 +301,7 @@ WRITE_LINE_MEMBER( ngen_state::dma_hrq_changed ) void ngen_state::set_dma_channel(int channel, int state) { - if(!state) + if(!state) m_dma_channel = channel; else if(m_dma_channel == channel) m_dma_channel = -1; diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c index eef97ba228a..458954ef945 100644 --- a/src/mess/drivers/pc9801.c +++ b/src/mess/drivers/pc9801.c @@ -17,7 +17,7 @@ - rewrite using slot devices - some later SWs put "Invalid command byte 05" (Absolutely Mahjong on Epson logo) - investigate on POR bit - - test 2dd more + - test 2dd more TODO (PC-9801RS): - extra features; @@ -607,8 +607,8 @@ public: DECLARE_WRITE8_MEMBER(pc9801rs_access_ctrl_w); DECLARE_WRITE8_MEMBER(pc9801rs_nmi_w); DECLARE_READ8_MEMBER(pc9801rs_midi_r); -// DECLARE_READ8_MEMBER(winram_r); -// DECLARE_WRITE8_MEMBER(winram_w); +// DECLARE_READ8_MEMBER(winram_r); +// DECLARE_WRITE8_MEMBER(winram_w); // DECLARE_READ8_MEMBER(pc9801_ext_opna_r); // DECLARE_WRITE8_MEMBER(pc9801_ext_opna_w); DECLARE_READ8_MEMBER(pic_r); @@ -2122,14 +2122,14 @@ WRITE8_MEMBER(pc9801_state::pc9821_ext2_video_ff_w) /*READ8_MEMBER(pc9801_state::winram_r) { - offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000; - return + offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000; + return } WRITE8_MEMBER(pc9801_state::winram_w) { - offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000; + offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000; }*/ static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state ) @@ -3222,7 +3222,7 @@ ROM_START( pc9801ux ) ROM_LOAD( "font_ux.rom", 0x000000, 0x046800, BAD_DUMP CRC(19a76eeb) SHA1(96a006e8515157a624599c2b53a581ae0dd560fd) ) LOAD_KANJI_ROMS -// LOAD_IDE_ROM +// LOAD_IDE_ROM ROM_END /* @@ -3325,7 +3325,7 @@ ROM_START( pc9801vm ) ROM_LOAD( "font_vm.rom", 0x000000, 0x046800, BAD_DUMP CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff) ) LOAD_KANJI_ROMS -// LOAD_IDE_ROM +// LOAD_IDE_ROM ROM_END /* diff --git a/src/mess/drivers/pcd.c b/src/mess/drivers/pcd.c index 19ec2338741..2ca91c48c20 100644 --- a/src/mess/drivers/pcd.c +++ b/src/mess/drivers/pcd.c @@ -128,9 +128,9 @@ static ADDRESS_MAP_START( pcd_io, AS_IO, 16, pcd_state ) AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram") AM_RANGE(0xf840, 0xf841) AM_DEVREADWRITE8("pic1", pic8259_device, read, write, 0xff00) AM_RANGE(0xf900, 0xf907) AM_DEVREADWRITE8("fdc", wd2793_t, read, write, 0x00ff) -// AM_RANGE(0xf940, 0xf941) // sasi controller here? +// AM_RANGE(0xf940, 0xf941) // sasi controller here? AM_RANGE(0xf980, 0xf981) AM_READWRITE8(crt_data_r, crt_data_w, 0x00ff) AM_READ8(crt_status_r, 0xff00) -// AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select) +// AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select) ADDRESS_MAP_END diff --git a/src/mess/drivers/px4.c b/src/mess/drivers/px4.c index 12a94451bf4..a07843f409d 100644 --- a/src/mess/drivers/px4.c +++ b/src/mess/drivers/px4.c @@ -45,7 +45,7 @@ // TYPE DEFINITIONS //************************************************************************** -class px4_state : public driver_device, public device_serial_interface +class px4_state : public driver_device, public device_serial_interface { public: px4_state(const machine_config &mconfig, device_type type, const char *tag) : @@ -60,7 +60,7 @@ public: m_speaker(*this, "speaker"), m_sio(*this, "sio"), m_rs232(*this, "rs232"), - m_caps1(*this, "capsule1"), m_caps2(*this, "capsule2"), + m_caps1(*this, "capsule1"), m_caps2(*this, "capsule2"), m_caps1_rom(NULL), m_caps2_rom(NULL), m_ctrl1(0), m_icrb(0), m_bankr(0), m_isr(0), m_ier(0), m_str(0), m_sior(0xbf), @@ -565,7 +565,7 @@ READ8_MEMBER( px4_state::sior_r ) { case 1: m_sior = (dec_2_bcd(m_time.local_time.year) >> 4) & 0xf; break; case 2: m_sior = dec_2_bcd(m_time.local_time.year) & 0xf; break; - case 3: m_sior = dec_2_bcd(m_time.local_time.month + 1); break; + case 3: m_sior = dec_2_bcd(m_time.local_time.month + 1); break; case 4: m_sior = dec_2_bcd(m_time.local_time.mday); break; case 5: m_sior = dec_2_bcd(m_time.local_time.hour); break; case 6: m_sior = dec_2_bcd(m_time.local_time.minute); break; diff --git a/src/mess/drivers/px8.c b/src/mess/drivers/px8.c index 38403ae531a..662a1bfeba3 100644 --- a/src/mess/drivers/px8.c +++ b/src/mess/drivers/px8.c @@ -801,7 +801,7 @@ static MACHINE_CONFIG_START( px8, px8_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("64K") - + // software MCFG_SOFTWARE_LIST_ADD("epson_cpm_list", "epson_cpm") MACHINE_CONFIG_END diff --git a/src/mess/drivers/simon.c b/src/mess/drivers/simon.c index e423973d172..48d1d4b2545 100644 --- a/src/mess/drivers/simon.c +++ b/src/mess/drivers/simon.c @@ -3,14 +3,14 @@ /*************************************************************************** Milton Bradley Simon - + Revision A hardware: * TMS1000 (has internal ROM), DS75494 lamp driver - + Newer revisions have a smaller 16-pin MB4850 chip instead of the TMS1000. This one has been decapped too, but we couldn't find an internal ROM. It is possibly a cost-reduced custom ASIC specifically for Simon. - + Other games assumed to be on similar hardware: - Pocket Simon, but there's a chance it only exists with MB4850 chip - Super Simon (TMS1100) @@ -61,7 +61,7 @@ public: READ8_MEMBER(simon_state::read_k) { UINT8 k = 0; - + // read selected button rows for (int i = 0; i < 4; i++) { @@ -82,7 +82,7 @@ WRITE16_MEMBER(simon_state::write_r) // R7 -> 75494 IN2 -> blue lamp for (int i = 0; i < 4; i++) output_set_lamp_value(i, data >> (4 + i) & 1); - + // R8 -> 75494 IN0 -> speaker m_speaker->level_w(data >> 8 & 1); diff --git a/src/mess/drivers/spc1000.c b/src/mess/drivers/spc1000.c index d9791d912a4..fe6b4a9d3b1 100644 --- a/src/mess/drivers/spc1000.c +++ b/src/mess/drivers/spc1000.c @@ -391,7 +391,7 @@ void spc1000_state::machine_reset() READ8_MEMBER(spc1000_state::mc6847_videoram_r) { - if (offset == ~0) + if (offset == ~0) return 0xff; // m_GMODE layout: CSS|NA|PS2|PS1|~A/G|GM0|GM1|NA @@ -416,7 +416,7 @@ READ8_MEMBER( spc1000_state::porta_r ) data |= (m_cass->input() > 0.0038) ? 0x80 : 0; data |= ((m_cass->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY) ? 0x00 : 0x40; data &= ~(m_io_joy->read() & 0x3f); - + return data; } diff --git a/src/mess/drivers/ti85.c b/src/mess/drivers/ti85.c index ca7e6658d3e..24938ff9a7d 100755 --- a/src/mess/drivers/ti85.c +++ b/src/mess/drivers/ti85.c @@ -170,13 +170,13 @@ TI-83PlusSE ports: 2: ? 3: ON status, LCD power 4: Interrupt status - 5: Memory page 3 + 5: Memory page 3 6: Memory page 1 7: Memory page 2 10: Controll port for the display controller 11: Data port for the display controller - 15: Asic Version - + 15: Asic Version + TI-85 ports: 0: Video buffer offset (write only) 1: Keypad @@ -296,7 +296,7 @@ static ADDRESS_MAP_START( ti83pse_io, AS_IO, 8, ti85_state ) AM_RANGE(0x0015, 0x0015) AM_READ(ti83pse_port_0015_r) AM_RANGE(0x0020, 0x0020) AM_READWRITE(ti83pse_port_0020_r, ti83pse_port_0020_w ) AM_RANGE(0x0021, 0x0021) AM_READWRITE(ti83pse_port_0021_r, ti83pse_port_0021_w ) - + AM_RANGE(0x0030, 0x0030) AM_READWRITE(ti83pse_ctimer1_setup_r, ti83pse_ctimer1_setup_w ) AM_RANGE(0x0031, 0x0031) AM_READWRITE(ti83pse_ctimer1_loop_r, ti83pse_ctimer1_loop_w ) AM_RANGE(0x0032, 0x0032) AM_READWRITE(ti83pse_ctimer1_count_r, ti83pse_ctimer1_count_w ) @@ -306,7 +306,7 @@ static ADDRESS_MAP_START( ti83pse_io, AS_IO, 8, ti85_state ) AM_RANGE(0x0036, 0x0036) AM_READWRITE(ti83pse_ctimer3_setup_r, ti83pse_ctimer3_setup_w ) AM_RANGE(0x0037, 0x0037) AM_READWRITE(ti83pse_ctimer3_loop_r, ti83pse_ctimer3_loop_w ) AM_RANGE(0x0038, 0x0038) AM_READWRITE(ti83pse_ctimer3_count_r, ti83pse_ctimer3_count_w ) - + AM_RANGE(0x0055, 0x0055) AM_READ(ti84pse_port_0055_r) AM_RANGE(0x0056, 0x0056) AM_READ(ti84pse_port_0056_r) ADDRESS_MAP_END @@ -713,7 +713,7 @@ static MACHINE_CONFIG_DERIVED( ti83p, ti81 ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - + MCFG_AMD_29F400T_ADD("flash") //MCFG_TI83PSERIAL_ADD( "tiserial" ) @@ -721,18 +721,18 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ti83pse, ti83p ) MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_CLOCK( 15000000) + MCFG_CPU_CLOCK( 15000000) MCFG_CPU_IO_MAP(ti83pse_io) - + MCFG_DEVICE_MODIFY("membank1") MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem) MCFG_DEVICE_MODIFY("membank2") MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem) - + MCFG_DEVICE_MODIFY("membank3") MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem) - + MCFG_DEVICE_MODIFY("membank4") MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem) @@ -743,7 +743,7 @@ static MACHINE_CONFIG_DERIVED( ti83pse, ti83p ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ti84p, ti83pse ) - MCFG_DEVICE_MODIFY("membank1") + MCFG_DEVICE_MODIFY("membank1") MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem) MCFG_DEVICE_MODIFY("membank2") @@ -756,7 +756,7 @@ static MACHINE_CONFIG_DERIVED( ti84p, ti83pse ) MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem) MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84p ) - MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0) + MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ti84pse, ti83pse ) @@ -909,10 +909,10 @@ ROM_START (ti84pse) ROM_END ROM_START (ti84p) - ROM_REGION (0x100000, "flash",0) - ROM_DEFAULT_BIOS("b100v255mp") - ROM_SYSTEM_BIOS( 0, "b100v255mp", "Boot 1.00 OS V 2.55MP" ) - ROMX_LOAD( "ti84pb100v255mp.bin", 0x00000, 0x100000, CRC(4AF31251) SHA1(8F67269346644B87E7CD0F353F5F4030E787CF57), ROM_BIOS(1) ) + ROM_REGION (0x100000, "flash",0) + ROM_DEFAULT_BIOS("b100v255mp") + ROM_SYSTEM_BIOS( 0, "b100v255mp", "Boot 1.00 OS V 2.55MP" ) + ROMX_LOAD( "ti84pb100v255mp.bin", 0x00000, 0x100000, CRC(4AF31251) SHA1(8F67269346644B87E7CD0F353F5F4030E787CF57), ROM_BIOS(1) ) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ diff --git a/src/mess/drivers/ticalc1x.c b/src/mess/drivers/ticalc1x.c index 1b87c1a4738..2b5ad7adcda 100644 --- a/src/mess/drivers/ticalc1x.c +++ b/src/mess/drivers/ticalc1x.c @@ -3,7 +3,7 @@ /*************************************************************************** Texas Instruments TMS1xxx/0970/0980 handheld calculators - + Texas Instruments WIZ-A-TRON * TMC0907NL DP0907BS (die labeled 0970F-07B) @@ -61,7 +61,7 @@ READ8_MEMBER(ticalc1x_state::read_k) for (int i = 0; i < 4; i++) if (m_o & (1 << (i + 1))) k |= m_button_matrix[i]->read(); - + return k; } diff --git a/src/mess/drivers/tk2000.c b/src/mess/drivers/tk2000.c index b2c83428363..66874015335 100644 --- a/src/mess/drivers/tk2000.c +++ b/src/mess/drivers/tk2000.c @@ -2,18 +2,18 @@ // copyright-holders:R. Belmont /*************************************************************************** - tk2000.c - Microdigital TK2000 - + tk2000.c - Microdigital TK2000 + Driver by R. Belmont - + This system is only vaguely Apple II compatible. The keyboard works entirely differently, which is a big deal. - + $C05A - banks RAM from c100-ffff $C05B - banks ROM from c100-ffff - -************************************************************************/ - + +************************************************************************/ + #include "emu.h" #include "machine/bankdev.h" #include "machine/ram.h" @@ -129,7 +129,7 @@ void tk2000_state::machine_reset() m_strobe = 0; } -/*************************************************************************** +/*************************************************************************** VIDEO ***************************************************************************/ @@ -158,7 +158,7 @@ UINT32 tk2000_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -/*************************************************************************** +/*************************************************************************** I/O ***************************************************************************/ // most softswitches don't care about read vs write, so handle them here @@ -181,27 +181,27 @@ void tk2000_state::do_io(address_space &space, int offset) m_speaker->level_w(m_speaker_state); break; - case 0x50: // monochrome + case 0x50: // monochrome break; - case 0x51: // color + case 0x51: // color break; case 0x54: // set page 1 - m_page2 = false; + m_page2 = false; m_video->m_page2 = false; break; case 0x55: // set page 2 - m_page2 = true; + m_page2 = true; m_video->m_page2 = true; break; - case 0x5a: // ROM + case 0x5a: // ROM m_upperbank->set_bank(0); break; - case 0x5b: // RAM + case 0x5b: // RAM m_upperbank->set_bank(1); break; @@ -240,7 +240,7 @@ WRITE8_MEMBER(tk2000_state::c000_w) { switch (offset) { - case 0x00: // write row mask for keyboard scan + case 0x00: // write row mask for keyboard scan switch (data) { case 0: @@ -255,10 +255,10 @@ WRITE8_MEMBER(tk2000_state::c000_w) case 0x40: m_strobe = m_row6->read(); break; case 0x80: m_strobe = m_row7->read(); break; } - break; + break; case 0x5f: - m_strobe = m_kbspecial->read(); + m_strobe = m_kbspecial->read(); break; default: @@ -454,22 +454,22 @@ ADDRESS_MAP_END INPUT PORTS ***************************************************************************/ -/* - TK2000 matrix: - - 0 1 2 3 4 5 6 7 +/* + TK2000 matrix: + + 0 1 2 3 4 5 6 7 0SHIF B V C X Z - 1 G F D S A + 1 G F D S A 2 SPC T R E W Q - 3 LFT 5 4 3 2 1 - 4 RGT 6 7 8 9 0 - 5 DWN Y U I O P - 6 UP H J K L : + 3 LFT 5 4 3 2 1 + 4 RGT 6 7 8 9 0 + 5 DWN Y U I O P + 6 UP H J K L : 7 RTN N M , . ? - + write row mask 1/2/4/8/10/20/40/80 to $C000 read column at $C010 - + If $C05F is written, the Ctrl key is read in bit 0 of $C010 immediately afterwards. */ static INPUT_PORTS_START( tk2000 ) diff --git a/src/mess/includes/pet.h b/src/mess/includes/pet.h index 0335faf4b58..d4572a99c05 100644 --- a/src/mess/includes/pet.h +++ b/src/mess/includes/pet.h @@ -236,7 +236,7 @@ public: class cbm8096_state : public pet80_state { public: - cbm8096_state(const machine_config &mconfig, device_type type, const char *tag) : + cbm8096_state(const machine_config &mconfig, device_type type, const char *tag) : pet80_state(mconfig, type, tag) { } }; diff --git a/src/mess/includes/ti85.h b/src/mess/includes/ti85.h index e967101f034..88cc93f3cd7 100755 --- a/src/mess/includes/ti85.h +++ b/src/mess/includes/ti85.h @@ -181,7 +181,7 @@ public: TIMER_CALLBACK_MEMBER(ti85_timer_callback); TIMER_CALLBACK_MEMBER(ti83_timer1_callback); TIMER_CALLBACK_MEMBER(ti83_timer2_callback); - + //crystal timers virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); void ti83pse_count( UINT8 timer, UINT8 data); @@ -207,8 +207,8 @@ public: DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_loop_w ); DECLARE_READ8_MEMBER( ti83pse_ctimer3_count_r ); DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_count_w ); - - + + void update_ti85_memory (); void update_ti83p_memory (); void update_ti83pse_memory (); @@ -218,9 +218,9 @@ public: void ti86_setup_snapshot (UINT8 * data); DECLARE_SNAPSHOT_LOAD_MEMBER( ti8x ); DECLARE_DIRECT_UPDATE_MEMBER( ti83p_direct_update_handler ); - + ti83pse_timer m_ctimer[3]; - + //address_space &asic; }; diff --git a/src/mess/includes/victor9k.h b/src/mess/includes/victor9k.h index 088b5943ee2..08030027cdc 100644 --- a/src/mess/includes/victor9k.h +++ b/src/mess/includes/victor9k.h @@ -48,7 +48,7 @@ #define RS232_B_TAG "rs232b" #define SCREEN_TAG "screen" #define VICTOR9K_KEYBOARD_TAG "victor9kb" -#define FDC_TAG "fdc" +#define FDC_TAG "fdc" class victor9k_state : public driver_device { diff --git a/src/mess/includes/wswan.h b/src/mess/includes/wswan.h index 418b44f5021..391dd901b98 100644 --- a/src/mess/includes/wswan.h +++ b/src/mess/includes/wswan.h @@ -40,9 +40,9 @@ public: m_cart(*this, "cartslot"), m_cursx(*this, "CURSX"), m_cursy(*this, "CURSY"), - m_buttons(*this, "BUTTONS") + m_buttons(*this, "BUTTONS") { } - + required_device<cpu_device> m_maincpu; required_device<wswan_video_device> m_vdp; required_device<wswan_sound_device> m_sound; @@ -50,7 +50,7 @@ public: DECLARE_READ8_MEMBER(bios_r); DECLARE_READ8_MEMBER(port_r); DECLARE_WRITE8_MEMBER(port_w); - + UINT8 m_ws_portram[256]; UINT8 m_internal_eeprom[INTERNAL_EEPROM_SIZE]; UINT8 m_system_type; @@ -58,7 +58,7 @@ public: UINT8 *m_ws_bios_bank; UINT8 m_bios_disabled; UINT8 m_rotate; - + void set_irq_line(int irq); void dma_sound_cb(); void common_start(); @@ -67,7 +67,7 @@ public: DECLARE_PALETTE_INIT(wswan); DECLARE_MACHINE_START(wscolor); DECLARE_PALETTE_INIT(wscolor); - + protected: /* Interrupt flags */ static const UINT8 WSWAN_IFLAG_STX = 0x01; @@ -78,7 +78,7 @@ protected: static const UINT8 WSWAN_IFLAG_VBLTMR = 0x20; static const UINT8 WSWAN_IFLAG_VBL = 0x40; static const UINT8 WSWAN_IFLAG_HBLTMR = 0x80; - + /* Interrupts */ static const UINT8 WSWAN_INT_STX = 0; static const UINT8 WSWAN_INT_KEY = 1; @@ -88,11 +88,11 @@ protected: static const UINT8 WSWAN_INT_VBLTMR = 5; static const UINT8 WSWAN_INT_VBL = 6; static const UINT8 WSWAN_INT_HBLTMR = 7; - + required_ioport m_cursx; required_ioport m_cursy; required_ioport m_buttons; - + void register_save(); void handle_irqs(); void clear_irq_line(int irq); diff --git a/src/mess/includes/xerox820.h b/src/mess/includes/xerox820.h index 8de4a25daac..797e5689b6e 100644 --- a/src/mess/includes/xerox820.h +++ b/src/mess/includes/xerox820.h @@ -36,7 +36,7 @@ #define SASIBUS_TAG "sasi" #define RS232_A_TAG "rs232a" #define RS232_B_TAG "rs232b" -#define KEYBOARD_TAG "kb" +#define KEYBOARD_TAG "kb" #define XEROX820_VIDEORAM_SIZE 0x1000 #define XEROX820_VIDEORAM_MASK 0x0fff diff --git a/src/mess/machine/coco.c b/src/mess/machine/coco.c index d701d4f8baf..656785d5f16 100644 --- a/src/mess/machine/coco.c +++ b/src/mess/machine/coco.c @@ -681,11 +681,11 @@ void coco_state::update_sound(void) /* determine the sound mux status */ soundmux_status_t status = soundmux_status(); - /* the SC77526 DAC chip internally biases the AC-coupled sound inputs for Cassette and Cartridge at the midpoint of the 3.9v output range */ - bool bCassSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1)); - bool bCartSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL2)); - UINT8 cassette_sound = (bCassSoundEnable ? 0x40 : 0); - UINT8 cart_sound = (bCartSoundEnable ? 0x40 : 0); + /* the SC77526 DAC chip internally biases the AC-coupled sound inputs for Cassette and Cartridge at the midpoint of the 3.9v output range */ + bool bCassSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1)); + bool bCartSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL2)); + UINT8 cassette_sound = (bCassSoundEnable ? 0x40 : 0); + UINT8 cart_sound = (bCartSoundEnable ? 0x40 : 0); /* determine the value to send to the DAC */ m_dac_output = (m_pia_1->a_output() & 0xFC) >> 2; @@ -1161,10 +1161,10 @@ WRITE8_MEMBER( coco_state::ff60_write ) READ8_MEMBER( coco_state::ff40_read ) { - if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1) - { - return m_beckerport->read(space, offset-1, mem_mask); - } + if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1) + { + return m_beckerport->read(space, offset-1, mem_mask); + } return m_cococart->read(space, offset, mem_mask); } @@ -1177,10 +1177,10 @@ READ8_MEMBER( coco_state::ff40_read ) WRITE8_MEMBER( coco_state::ff40_write ) { - if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1) - { - return m_beckerport->write(space, offset-1, data, mem_mask); - } + if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1) + { + return m_beckerport->write(space, offset-1, data, mem_mask); + } m_cococart->write(space, offset, data, mem_mask); } diff --git a/src/mess/machine/gamecom.c b/src/mess/machine/gamecom.c index 39b346f7da0..bbf2338da24 100644 --- a/src/mess/machine/gamecom.c +++ b/src/mess/machine/gamecom.c @@ -192,8 +192,8 @@ READ8_MEMBER( gamecom_state::gamecom_pio_r ) READ8_MEMBER( gamecom_state::gamecom_internal_r ) { // ToDo: Read from vblank bit -// if(SM8521_LCV == offset + 0x20) -// popmessage("Read from vblank bit, TODO"); +// if(SM8521_LCV == offset + 0x20) +// popmessage("Read from vblank bit, TODO"); return m_p_ram[offset + 0x20]; } diff --git a/src/mess/machine/hec2hrp.c b/src/mess/machine/hec2hrp.c index 1677ab0aed1..48ad1016dcd 100644 --- a/src/mess/machine/hec2hrp.c +++ b/src/mess/machine/hec2hrp.c @@ -878,4 +878,3 @@ MACHINE_CONFIG_FRAGMENT( hector_audio ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END - diff --git a/src/mess/machine/ie15_kbd.c b/src/mess/machine/ie15_kbd.c index 7e9b748059f..8a3438e0750 100644 --- a/src/mess/machine/ie15_kbd.c +++ b/src/mess/machine/ie15_kbd.c @@ -170,10 +170,10 @@ void ie15_keyboard_device::device_reset() /* Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y18 Y19 Y20 Y21 Y22 Y23 Y24 -- -;+ 1! 2" 3# 4$ 5% 6& 7' 8( 9) 0 -= 7 8 9 ТАБ ГТ СБР СТР СТС f1 f2 f3 -ЙJ ЦC УU КK ЕE НN ГG Ш[ Щ] ЗZ ХH :* 4 5 6 ПС ВК АР1 С1 АР2 f4 f5 f6 -ФF ЫY ВW АA ПP РR ОO ЛL ДD ЖV Э\ .> ЗБ 1 2 3 ПРД ПРМ ПРС f7 f8 f9 -ЯQ Ч^ СS МM ИI ТT ЬX БB Ю@ ,< /? _ SPC 0 , fA fB fC +;+ 1! 2" 3# 4$ 5% 6& 7' 8( 9) 0 -= 7 8 9 ?????? ???? ?????? ?????? ?????? f1 f2 f3 +??J ??C ??U ??K ??E ??N ??G ??[ ??] ??Z ??H :* 4 5 6 ???? ???? ????1 ??1 ????2 f4 f5 f6 +??F ??Y ??W ??A ??P ??R ??O ??L ??D ??V ??\ .> ???? 1 2 3 ?????? ?????? ?????? f7 f8 f9 +??Q ??^ ??S ??M ??I ??T ??X ??B ??@ ,< /? _ SPC 0 , fA fB fC rom: @@ -310,7 +310,7 @@ static INPUT_PORTS_START( ie15_keyboard ) PORT_START("TERM_LINEC") PORT_BIT(0x000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) -// PORT_BIT(0x000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) +// PORT_BIT(0x000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT(0x000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SetUp") PORT_CODE(KEYCODE_RSHIFT) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(RSHIFT)) PORT_BIT(0x000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SetUp") PORT_CODE(KEYCODE_PRTSCR) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(PRTSCR)) INPUT_PORTS_END diff --git a/src/mess/machine/ms7004.c b/src/mess/machine/ms7004.c index b145479db2b..da8108bcad4 100644 --- a/src/mess/machine/ms7004.c +++ b/src/mess/machine/ms7004.c @@ -87,94 +87,94 @@ const rom_entry *ms7004_device::device_rom_region() const // INPUT_PORTS( ms7004 ) //------------------------------------------------- /* -bit sig XSn ВРn ---- --- --- --- -0 8 16 15 -1 9 15 14 -2 10 14 13 -3 11 13 12 -4 12 19 16 -5 13 12 11 -6 14 11 10 -7 15 10 9 -8 16 9 8 -9 17 8 7 -10 18 7 6 -11 19 6 5 -12 20 3 1 -13 21 1 2 -14 22 4 3 -15 23 5 4 - -0xc9 KEY_LANGLE_RANGLE 'резервная клавиша' -0xbc KEY_DELETE ЗБ -0xbd KEY_RETURN ВК -0xbf KEY_TILDE '; +' -0xc4 - 'Ъ' -0xca - '/ ?' -0xed KEY_PERIOD 'Ю @' -0xf1 - '_' +bit sig XSn ????n +--- --- --- --- +0 8 16 15 +1 9 15 14 +2 10 14 13 +3 11 13 12 +4 12 19 16 +5 13 12 11 +6 14 11 10 +7 15 10 9 +8 16 9 8 +9 17 8 7 +10 18 7 6 +11 19 6 5 +12 20 3 1 +13 21 1 2 +14 22 4 3 +15 23 5 4 + +0xc9 KEY_LANGLE_RANGLE '?????????????????? ??????????????' +0xbc KEY_DELETE ???? +0xbd KEY_RETURN ???? +0xbf KEY_TILDE '; +' +0xc4 - '??' +0xca - '/ ?' +0xed KEY_PERIOD '?? @' +0xf1 - '_' <...> -0x56 KEY_F1 СТОП КАДР -0x57 KEY_F2 ПЕЧАТЬ КАДРА -0x58 KEY_F3 ПАУЗА -0x59 KEY_F4 УСТ РЕЖИМА -0x5a KEY_F5 Ф5 - -0x64 KEY_F6 ПРЕРЫВ -0x65 KEY_F7 ПРОДОЛЖ -0x66 KEY_F8 ОТМЕН -0x67 KEY_F9 ОСНОВН КАДР -0x69 KEY_F10 ВЫХОД - -0x71 KEY_F11 Ф11 (АР2) -0x72 KEY_F12 Ф12 (ВШ) -0x73 KEY_F13 Ф13 (ПС) -0x74 KEY_F14 ДОП ВАРИАНТ - -0x7c KEY_HELP ПМ -0x7d KEY_MENU ИСП - -0x80 KEY_F17 Ф17 -0x81 KEY_F18 Ф18 -0x82 KEY_F19 Ф19 -0x83 KEY_F20 Ф20 - -0xb0 KEY_LOCK ФКС -0xae KEY_SHIFT ВР -0xaf KEY_CTRL СУ - -0xb1 KEY_META КМП -0xb2 - РУС/ЛАТ - -0x8a KEY_FIND НТ -0x8b KEY_INSERT_HERE ВСТ -0x8c KEY_REMOVE УДАЛ -0x8d KEY_SELECT ВЫБР -0x8e KEY_PREV_SCREEN ПРЕД КАДР -0x8f KEY_NEXT_SCREEN СЛЕД КАДР +0x56 KEY_F1 ???????? ???????? +0x57 KEY_F2 ???????????? ?????????? +0x58 KEY_F3 ?????????? +0x59 KEY_F4 ?????? ???????????? +0x5a KEY_F5 ??5 + +0x64 KEY_F6 ???????????? +0x65 KEY_F7 ?????????????? +0x66 KEY_F8 ?????????? +0x67 KEY_F9 ???????????? ???????? +0x69 KEY_F10 ?????????? + +0x71 KEY_F11 ??11 (????2) +0x72 KEY_F12 ??12 (????) +0x73 KEY_F13 ??13 (????) +0x74 KEY_F14 ?????? ?????????????? + +0x7c KEY_HELP ???? +0x7d KEY_MENU ?????? + +0x80 KEY_F17 ??17 +0x81 KEY_F18 ??18 +0x82 KEY_F19 ??19 +0x83 KEY_F20 ??20 + +0xb0 KEY_LOCK ?????? +0xae KEY_SHIFT ???? +0xaf KEY_CTRL ???? + +0xb1 KEY_META ?????? +0xb2 - ??????/?????? + +0x8a KEY_FIND ???? +0x8b KEY_INSERT_HERE ?????? +0x8c KEY_REMOVE ???????? +0x8d KEY_SELECT ???????? +0x8e KEY_PREV_SCREEN ???????? ???????? +0x8f KEY_NEXT_SCREEN ???????? ???????? nothing sends '@' or '`' -`/~ sends ^/~ -2/@ sends 2/" -6/^ sends 6/& -7/& sends 7/' -8/ * sends 8/( -9/( sends 9/) -0/) sends 0/0 --/_ sends _/_ -+/= sends -/= -;/: sends ;/+ -'/" sends :/ * - -F10 sends ^C -F11 sends ESC -F12 sends ^H +`/~ sends ^/~ +2/@ sends 2/" +6/^ sends 6/& +7/& sends 7/' +8/ * sends 8/( +9/( sends 9/) +0/) sends 0/0 +-/_ sends _/_ ++/= sends -/= +;/: sends ;/+ +'/" sends :/ * + +F10 sends ^C +F11 sends ESC +F12 sends ^H */ INPUT_PORTS_START( ms7004 ) - PORT_START("KBD12") // vertical row 1 + PORT_START("KBD12") // vertical row 1 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Print Screen (F2)") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Hold Screen (F1)") PORT_CODE(KEYCODE_F1) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) // '{' / '|' @@ -184,7 +184,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) // what PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LShift") PORT_CODE(KEYCODE_LSHIFT) - PORT_START("KBD13") // vertical row 2 + PORT_START("KBD13") // vertical row 2 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Setup (F3)") PORT_CODE(KEYCODE_F3) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Data / Talk (F4)") PORT_CODE(KEYCODE_F4) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("1") PORT_CODE(KEYCODE_1) @@ -194,7 +194,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_ESC) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Compose") PORT_CODE(KEYCODE_LALT) - PORT_START("KBD14") // vertical row 3 + PORT_START("KBD14") // vertical row 3 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Break (F5)") PORT_CODE(KEYCODE_F5) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("2") PORT_CODE(KEYCODE_2) @@ -204,7 +204,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("KBD15") // vertical row 4 + PORT_START("KBD15") // vertical row 4 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("4") PORT_CODE(KEYCODE_4) @@ -214,7 +214,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("KBD11") // vertical row 5 + PORT_START("KBD11") // vertical row 5 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Interrupt (F6)") PORT_CODE(KEYCODE_F6) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("E") PORT_CODE(KEYCODE_E) @@ -224,7 +224,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("KBD10") // vertical row 6 + PORT_START("KBD10") // vertical row 6 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Resume (F7)") PORT_CODE(KEYCODE_F7) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("N") PORT_CODE(KEYCODE_N) @@ -234,7 +234,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) - PORT_START("KBD9") // vertical row 7 + PORT_START("KBD9") // vertical row 7 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Cancel (F8)") PORT_CODE(KEYCODE_F8) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Main Screen (F9)") PORT_CODE(KEYCODE_F9) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("7") PORT_CODE(KEYCODE_7) @@ -244,7 +244,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("B") PORT_CODE(KEYCODE_B) - PORT_START("KBD8") // vertical row 8 + PORT_START("KBD8") // vertical row 8 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Exit (F10)") PORT_CODE(KEYCODE_F10) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("8") PORT_CODE(KEYCODE_8) @@ -254,7 +254,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) // '@' PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) - PORT_START("KBD7") // vertical row 9 + PORT_START("KBD7") // vertical row 9 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ESC (F11)") PORT_CODE(KEYCODE_F11) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("0") PORT_CODE(KEYCODE_0) @@ -264,27 +264,27 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) - PORT_START("KBD6") // vertical row 10 + PORT_START("KBD6") // vertical row 10 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("BS (F12)") PORT_CODE(KEYCODE_F12) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LF (F13)") PORT_CODE(KEYCODE_PRTSCR) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) // '}' PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) // ':' - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // 'ъ' + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // '??' PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) - PORT_START("KBD5") // vertical row 11 + PORT_START("KBD5") // vertical row 11 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Additional Options (F14)") PORT_CODE(KEYCODE_PAUSE) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Delete <X") PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) // ??? + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) // ??? PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("RShift") PORT_CODE(KEYCODE_RSHIFT) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("KBD3") // vertical row 12 + PORT_START("KBD3") // vertical row 12 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Help (F15)") PORT_CODE(KEYCODE_RALT) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Insert Here") PORT_CODE(KEYCODE_HOME) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Find") PORT_CODE(KEYCODE_INSERT) @@ -294,7 +294,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("KBD2") // vertical row 13 + PORT_START("KBD2") // vertical row 13 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Remove") PORT_CODE(KEYCODE_PGUP) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Next [v]") PORT_CODE(KEYCODE_PGDN) @@ -304,7 +304,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("KBD1") // vertical row 14 + PORT_START("KBD1") // vertical row 14 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Do (F16)") PORT_CODE(KEYCODE_RCONTROL) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF1") PORT_CODE(KEYCODE_NUMLOCK) @@ -314,7 +314,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 2") PORT_CODE(KEYCODE_2_PAD) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 0") PORT_CODE(KEYCODE_0_PAD) - PORT_START("KBD0") // vertical row 15 + PORT_START("KBD0") // vertical row 15 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F17") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F18") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF2") PORT_CODE(KEYCODE_SLASH_PAD) @@ -324,7 +324,7 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 6") PORT_CODE(KEYCODE_6_PAD) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 3") PORT_CODE(KEYCODE_3_PAD) - PORT_START("KBD4") // vertical row 16 + PORT_START("KBD4") // vertical row 16 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F19") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F20") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF4") PORT_CODE(KEYCODE_MINUS_PAD) @@ -355,7 +355,7 @@ ioport_constructor ms7004_device::device_input_ports() const ms7004_device::ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, MS7004, "MS7004 keyboard", tag, owner, clock, "ms7004", __FILE__), -// device_serial_interface(mconfig, *this), +// device_serial_interface(mconfig, *this), m_maincpu(*this, MS7004_CPU_TAG), m_speaker(*this, MS7004_SPK_TAG), m_i8243(*this, "i8243"), @@ -458,7 +458,7 @@ WRITE8_MEMBER( ms7004_device::i8243_port_w ) DBG_LOG(2,0,( "%s: 8243 port %d data %02xH\n", tag(), offset + 4, data)); - + if (data) { switch(offset << 4 | data) { case 0x01: sense = m_kbd0->read(); break; diff --git a/src/mess/machine/ti85.c b/src/mess/machine/ti85.c index 90c8577394d..6e6702de6e5 100755 --- a/src/mess/machine/ti85.c +++ b/src/mess/machine/ti85.c @@ -155,20 +155,18 @@ void ti85_state::update_ti83p_memory () //address_space &space = m_maincpu->space(AS_PROGRAM); m_membank1->set_bank(m_booting ? 0x1f : 0); //Always flash page 0, well allmost - + if (m_ti83p_port4 & 1) { - m_membank2->set_bank(m_ti8x_memory_page_1 & 0xfe); - m_membank3->set_bank(m_ti8x_memory_page_1); + m_membank3->set_bank(m_ti8x_memory_page_1); m_membank4->set_bank(m_ti8x_memory_page_2); - + } else { - m_membank2->set_bank(m_ti8x_memory_page_1); m_membank3->set_bank(m_ti8x_memory_page_2); @@ -181,23 +179,21 @@ void ti85_state::update_ti83p_memory () void ti85_state::update_ti83pse_memory () { //address_space &space = m_maincpu->space(AS_PROGRAM); - + m_membank1->set_bank(m_booting ? (m_model==TI84P ? 0x3f : 0x7f) : 0); - + if (m_ti83p_port4 & 1) - { - + { m_membank2->set_bank(m_ti8x_memory_page_1 & 0xfe); - + m_membank3->set_bank(m_ti8x_memory_page_1 | 1); m_membank4->set_bank(m_ti8x_memory_page_2); - + } else { - m_membank2->set_bank(m_ti8x_memory_page_1); m_membank3->set_bank(m_ti8x_memory_page_2); @@ -277,12 +273,12 @@ DIRECT_UPDATE_MEMBER(ti85_state::ti83p_direct_update_handler) { if (m_booting) { - if (((m_ti83p_port4 & 1) && (address >= 0x4000 && address < 0xc000)) || (address >= 0x4000 && address < 0x8000)) - { - m_booting = false; + if (((m_ti83p_port4 & 1) && (address >= 0x4000 && address < 0xc000)) || (address >= 0x4000 && address < 0x8000)) + { + m_booting = false; update_ti83p_memory(); } - } + } return address; } @@ -294,19 +290,19 @@ MACHINE_RESET_MEMBER(ti85_state,ti83p) m_PCR = 0xc0; - m_ti8x_memory_page_1 = 0; + m_ti8x_memory_page_1 = 0; m_ti8x_memory_page_2 = 0; m_ti8x_memory_page_3 = 0; m_ti83p_port4 = 1; m_booting = true; if (m_model == TI83P) - { - update_ti83p_memory(); - } - else - { - update_ti83pse_memory(); - } + { + update_ti83p_memory(); + } + else + { + update_ti83pse_memory(); + } } MACHINE_START_MEMBER(ti85_state,ti83p) @@ -336,7 +332,7 @@ MACHINE_START_MEMBER(ti85_state,ti83p) m_booting = true; - ti85_state::update_ti83p_memory(); + ti85_state::update_ti83p_memory(); machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this)); @@ -345,7 +341,7 @@ MACHINE_START_MEMBER(ti85_state,ti83p) /* save states and debugging */ save_item(NAME(m_timer_interrupt_status)); - save_item(NAME(m_timer_interrupt_mask)); + save_item(NAME(m_timer_interrupt_mask)); save_item(NAME(m_ti8x_memory_page_1)); save_item(NAME(m_ti8x_memory_page_2)); save_item(NAME(m_ti8x_memory_page_3)); @@ -400,21 +396,21 @@ void ti85_state::ti8xpse_init_common() MACHINE_START_MEMBER(ti85_state,ti83pse) { - m_model = TI84PSE; + m_model = TI84PSE; - ti8xpse_init_common(); + ti8xpse_init_common(); } MACHINE_START_MEMBER(ti85_state,ti84pse) { - m_model = TI83PSE; + m_model = TI83PSE; - ti8xpse_init_common(); + ti8xpse_init_common(); } MACHINE_START_MEMBER(ti85_state,ti84p) { - m_model = TI84P; + m_model = TI84P; ti8xpse_init_common(); } @@ -572,7 +568,7 @@ READ8_MEMBER(ti85_state::ti83_port_0003_r ) data |= 0x08; data |= m_timer_interrupt_status; - + return data; } @@ -606,7 +602,7 @@ READ8_MEMBER(ti85_state::ti83p_port_0004_r ) data |= m_timer_interrupt_status; data |= m_ctimer_interrupt_status; - + return data; } @@ -758,7 +754,7 @@ WRITE8_MEMBER(ti85_state::ti83p_int_mask_w) //m_LCD_mask = (data&0x08) >> 2; m_ON_interrupt_mask = data & 0x01; m_ON_interrupt_status &= m_ON_interrupt_mask; - + m_timer_interrupt_mask = data & 0x06; m_timer_interrupt_status &= m_timer_interrupt_mask; @@ -796,7 +792,6 @@ WRITE8_MEMBER(ti85_state::ti83pse_port_0005_w) WRITE8_MEMBER(ti85_state::ti83pse_port_0006_w) { - if ((m_model == TI84P) && (data < 0x80)) { m_ti8x_memory_page_1 = data & 0x3f; @@ -873,7 +868,7 @@ void ti85_state::ti83pse_count( UINT8 timer, UINT8 data) if (m_ctimer[timer].setup) { - switch (m_ctimer[timer].setup & 0x07) + switch (m_ctimer[timer].setup & 0x07) { case 0x00: m_ctimer[timer].divsor = 3.0; @@ -914,7 +909,7 @@ void ti85_state::ti83pse_count( UINT8 timer, UINT8 data) m_crystal_timer3->adjust(attotime::zero, 0, attotime::from_hz( 32768.0/m_ctimer[timer].divsor)); m_crystal_timer3->enable(true); break; - + } } } diff --git a/src/mess/machine/victor9k_fdc.c b/src/mess/machine/victor9k_fdc.c index 87308971d3a..9d16f9ca244 100644 --- a/src/mess/machine/victor9k_fdc.c +++ b/src/mess/machine/victor9k_fdc.c @@ -13,8 +13,8 @@ TODO: - - disk error 2 (cannot find block header?) - - 8048 spindle speed control + - disk error 2 (cannot find block header?) + - 8048 spindle speed control - read PLL - write logic diff --git a/src/mess/machine/victor9kb.c b/src/mess/machine/victor9kb.c index d4b5c4e57ee..34047e4aa26 100644 --- a/src/mess/machine/victor9kb.c +++ b/src/mess/machine/victor9kb.c @@ -355,7 +355,7 @@ WRITE8_MEMBER( victor9k_keyboard_device::kb_p2_w ) bit description P20 ? - P21 KBRDY + P21 KBRDY P22 ? P23 KBDATA diff --git a/src/mess/machine/wswan.c b/src/mess/machine/wswan.c index afa8ce8077f..e0e2a351f85 100644 --- a/src/mess/machine/wswan.c +++ b/src/mess/machine/wswan.c @@ -155,11 +155,11 @@ void wswan_state::register_save() save_item(NAME(m_internal_eeprom)); save_item(NAME(m_bios_disabled)); save_item(NAME(m_rotate)); - + save_item(NAME(m_sound_dma.source)); save_item(NAME(m_sound_dma.size)); save_item(NAME(m_sound_dma.enable)); - + if (m_cart->exists()) m_cart->save_nvram(); } @@ -168,18 +168,18 @@ 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); - + 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) { @@ -204,18 +204,18 @@ MACHINE_START_MEMBER(wswan_state, wscolor) void wswan_state::machine_reset() { m_bios_disabled = 0; - + if (m_cart->exists()) m_rotate = m_cart->get_is_rotated(); else m_rotate = 0; - + /* Intialize ports */ memcpy(m_ws_portram, ws_portram_init, 256); - + render_target *target = machine().render().first_target(); target->set_view(m_rotate); - + /* Initialize sound DMA */ memset(&m_sound_dma, 0, sizeof(m_sound_dma)); } @@ -231,13 +231,13 @@ READ8_MEMBER( wswan_state::bios_r ) READ8_MEMBER( wswan_state::port_r ) { UINT8 value = m_ws_portram[offset]; - + if (offset != 2) logerror("PC=%X: port read %02X\n", m_maincpu->pc(), offset); - + if (offset < 0x40 || (offset >= 0xa1 && offset < 0xb0)) return m_vdp->reg_r(space, offset); - + switch (offset) { case 0x4a: // Sound DMA source address (low) @@ -288,7 +288,7 @@ READ8_MEMBER( wswan_state::port_r ) value = m_cart->read_io(space, offset & 0x0f); break; } - + return value; } @@ -297,49 +297,49 @@ WRITE8_MEMBER( wswan_state::port_w ) address_space &mem = m_maincpu->space(AS_PROGRAM); UINT8 input; logerror("PC=%X: port write %02X <- %02X\n", m_maincpu->pc(), offset, data); - + if (offset < 0x40 || (offset >= 0xa1 && offset < 0xb0)) { m_vdp->reg_w(space, offset, data); return; } - + switch (offset) { case 0x40: /* DMA source address (low) - Bit 0-7 - DMA source address bit 0-7 - */ + Bit 0-7 - DMA source address bit 0-7 + */ case 0x41: /* DMA source address (high) - Bit 0-7 - DMA source address bit 8-15 - */ + Bit 0-7 - DMA source address bit 8-15 + */ case 0x42: /* DMA source bank - Bit 0-7 - DMA source bank number - */ + Bit 0-7 - DMA source bank number + */ case 0x43: /* DMA destination bank - Bit 0-7 - DMA destination bank number - */ + Bit 0-7 - DMA destination bank number + */ case 0x44: /* DMA destination address (low) - Bit 0-7 - DMA destination address bit 0-7 - */ + Bit 0-7 - DMA destination address bit 0-7 + */ case 0x45: /* DMA destination address (high) - Bit 0-7 - DMA destination address bit 8-15 - */ + Bit 0-7 - DMA destination address bit 8-15 + */ case 0x46: /* Size of copied data (low) - Bit 0-7 - DMA size bit 0-7 - */ + Bit 0-7 - DMA size bit 0-7 + */ case 0x47: /* Size of copied data (high) - Bit 0-7 - DMA size bit 8-15 - */ + Bit 0-7 - DMA size bit 8-15 + */ break; case 0x48: /* DMA control - Bit 0-6 - Unknown - Bit 7 - DMA stop/start - */ + Bit 0-6 - Unknown + Bit 7 - DMA stop/start + */ if (data & 0x80) { UINT32 src, dst; UINT16 length; - + src = m_ws_portram[0x40] + (m_ws_portram[0x41] << 8) + (m_ws_portram[0x42] << 16); dst = m_ws_portram[0x44] + (m_ws_portram[0x45] << 8) + (m_ws_portram[0x43] << 16); length = m_ws_portram[0x46] + (m_ws_portram[0x47] << 8); @@ -362,167 +362,167 @@ WRITE8_MEMBER( wswan_state::port_w ) } break; case 0x4a: /* Sound DMA source address (low) - Bit 0-7 - Sound DMA source address bit 0-7 - */ + Bit 0-7 - Sound DMA source address bit 0-7 + */ m_sound_dma.source = (m_sound_dma.source & 0x0fff00) | data; break; case 0x4b: /* Sound DMA source address (high) - Bit 0-7 - Sound DMA source address bit 8-15 - */ + Bit 0-7 - Sound DMA source address bit 8-15 + */ m_sound_dma.source = (m_sound_dma.source & 0x0f00ff) | (data << 8); break; case 0x4c: /* Sound DMA source memory segment - Bit 0-3 - Sound DMA source address segment - Bit 4-7 - Unknown - */ + Bit 0-3 - Sound DMA source address segment + Bit 4-7 - Unknown + */ m_sound_dma.source = (m_sound_dma.source & 0xffff) | ((data & 0x0f) << 16); break; case 0x4d: /* Unknown */ break; case 0x4e: /* Sound DMA transfer size (low) - Bit 0-7 - Sound DMA transfer size bit 0-7 - */ + Bit 0-7 - Sound DMA transfer size bit 0-7 + */ m_sound_dma.size = (m_sound_dma.size & 0xff00) | data; break; case 0x4f: /* Sound DMA transfer size (high) - Bit 0-7 - Sound DMA transfer size bit 8-15 - */ + Bit 0-7 - Sound DMA transfer size bit 8-15 + */ m_sound_dma.size = (m_sound_dma.size & 0xff) | (data << 8); break; case 0x50: /* Unknown */ case 0x51: /* Unknown */ break; case 0x52: /* Sound DMA start/stop - Bit 0-6 - Unknown - Bit 7 - Sound DMA stop/start - */ + Bit 0-6 - Unknown + Bit 7 - Sound DMA stop/start + */ m_sound_dma.enable = data; break; case 0x60: m_vdp->reg_w(space, offset, data); break; case 0x80: /* Audio 1 freq (lo) - Bit 0-7 - Audio channel 1 frequency bit 0-7 - */ + Bit 0-7 - Audio channel 1 frequency bit 0-7 + */ case 0x81: /* Audio 1 freq (hi) - Bit 0-7 - Audio channel 1 frequency bit 8-15 - */ + Bit 0-7 - Audio channel 1 frequency bit 8-15 + */ case 0x82: /* Audio 2 freq (lo) - Bit 0-7 - Audio channel 2 frequency bit 0-7 - */ + Bit 0-7 - Audio channel 2 frequency bit 0-7 + */ case 0x83: /* Audio 2 freq (hi) - Bit 0-7 - Audio channel 2 frequency bit 8-15 - */ + Bit 0-7 - Audio channel 2 frequency bit 8-15 + */ case 0x84: /* Audio 3 freq (lo) - Bit 0-7 - Audio channel 3 frequency bit 0-7 - */ + Bit 0-7 - Audio channel 3 frequency bit 0-7 + */ case 0x85: /* Audio 3 freq (hi) - Bit 0-7 - Audio channel 3 frequency bit 8-15 - */ + Bit 0-7 - Audio channel 3 frequency bit 8-15 + */ case 0x86: /* Audio 4 freq (lo) - Bit 0-7 - Audio channel 4 frequency bit 0-7 - */ + Bit 0-7 - Audio channel 4 frequency bit 0-7 + */ case 0x87: /* Audio 4 freq (hi) - Bit 0-7 - Audio channel 4 frequency bit 8-15 - */ + Bit 0-7 - Audio channel 4 frequency bit 8-15 + */ case 0x88: /* Audio 1 volume - Bit 0-3 - Right volume audio channel 1 - Bit 4-7 - Left volume audio channel 1 - */ + Bit 0-3 - Right volume audio channel 1 + Bit 4-7 - Left volume audio channel 1 + */ case 0x89: /* Audio 2 volume - Bit 0-3 - Right volume audio channel 2 - Bit 4-7 - Left volume audio channel 2 - */ + Bit 0-3 - Right volume audio channel 2 + Bit 4-7 - Left volume audio channel 2 + */ case 0x8a: /* Audio 3 volume - Bit 0-3 - Right volume audio channel 3 - Bit 4-7 - Left volume audio channel 3 - */ + Bit 0-3 - Right volume audio channel 3 + Bit 4-7 - Left volume audio channel 3 + */ case 0x8b: /* Audio 4 volume - Bit 0-3 - Right volume audio channel 4 - Bit 4-7 - Left volume audio channel 4 - */ + Bit 0-3 - Right volume audio channel 4 + Bit 4-7 - Left volume audio channel 4 + */ case 0x8c: /* Sweep step - Bit 0-7 - Sweep step - */ + Bit 0-7 - Sweep step + */ case 0x8d: /* Sweep time - Bit 0-7 - Sweep time - */ + Bit 0-7 - Sweep time + */ case 0x8e: /* Noise control - Bit 0-2 - Noise generator type - Bit 3 - Reset - Bit 4 - Enable - Bit 5-7 - Unknown - */ + Bit 0-2 - Noise generator type + Bit 3 - Reset + Bit 4 - Enable + Bit 5-7 - Unknown + */ case 0x8f: /* Sample location - Bit 0-7 - Sample address location 0 00xxxxxx xx000000 - */ + Bit 0-7 - Sample address location 0 00xxxxxx xx000000 + */ case 0x90: /* Audio control - Bit 0 - Audio 1 enable - Bit 1 - Audio 2 enable - Bit 2 - Audio 3 enable - Bit 3 - Audio 4 enable - Bit 4 - Unknown - Bit 5 - Audio 2 voice mode enable - Bit 6 - Audio 3 sweep mode enable - Bit 7 - Audio 4 noise mode enable - */ + Bit 0 - Audio 1 enable + Bit 1 - Audio 2 enable + Bit 2 - Audio 3 enable + Bit 3 - Audio 4 enable + Bit 4 - Unknown + Bit 5 - Audio 2 voice mode enable + Bit 6 - Audio 3 sweep mode enable + Bit 7 - Audio 4 noise mode enable + */ case 0x91: /* Audio output - Bit 0 - Mono select - Bit 1-2 - Output volume - Bit 3 - External stereo - Bit 4-6 - Unknown - Bit 7 - External speaker (Read-only, set by hardware) - */ + Bit 0 - Mono select + Bit 1-2 - Output volume + Bit 3 - External stereo + Bit 4-6 - Unknown + Bit 7 - External speaker (Read-only, set by hardware) + */ case 0x92: /* Noise counter shift register (lo) - Bit 0-7 - Noise counter shift register bit 0-7 - */ + Bit 0-7 - Noise counter shift register bit 0-7 + */ case 0x93: /* Noise counter shift register (hi) - Bit 0-6 - Noise counter shift register bit 8-14 - bit 7 - Unknown - */ + Bit 0-6 - Noise counter shift register bit 8-14 + bit 7 - Unknown + */ case 0x94: /* Master volume - Bit 0-3 - Master volume - Bit 4-7 - Unknown - */ + Bit 0-3 - Master volume + Bit 4-7 - Unknown + */ m_sound->port_w(space, offset, data); break; case 0xa0: /* Hardware type - this is probably read only - Bit 0 - Enable cartridge slot and/or disable bios - Bit 1 - Hardware type: 0 = WS, 1 = WSC - Bit 2-7 - Unknown - */ + Bit 0 - Enable cartridge slot and/or disable bios + Bit 1 - Hardware type: 0 = WS, 1 = WSC + Bit 2-7 - Unknown + */ if ((data & 0x01) && !m_bios_disabled) m_bios_disabled = 1; break; - + case 0xb0: /* Interrupt base vector - Bit 0-7 - Interrupt base vector - */ + Bit 0-7 - Interrupt base vector + */ break; case 0xb1: /* Communication byte - Bit 0-7 - Communication byte - */ + Bit 0-7 - Communication byte + */ break; case 0xb2: /* Interrupt enable - Bit 0 - Serial transmit interrupt enable - Bit 1 - Key press interrupt enable - Bit 2 - RTC alarm interrupt enable - Bit 3 - Serial receive interrupt enable - Bit 4 - Drawing line detection interrupt enable - Bit 5 - VBlank timer interrupt enable - Bit 6 - VBlank interrupt enable - Bit 7 - HBlank timer interrupt enable - */ + Bit 0 - Serial transmit interrupt enable + Bit 1 - Key press interrupt enable + Bit 2 - RTC alarm interrupt enable + Bit 3 - Serial receive interrupt enable + Bit 4 - Drawing line detection interrupt enable + Bit 5 - VBlank timer interrupt enable + Bit 6 - VBlank interrupt enable + Bit 7 - HBlank timer interrupt enable + */ break; case 0xb3: /* serial communication control - Bit 0 - Receive complete - Bit 1 - Error - Bit 2 - Send complete - Bit 3-4 - Unknown - Bit 5 - Send data interrupt generation - Bit 6 - Connection speed: 0 = 9600 bps, 1 = 38400 bps - bit 7 - Receive data interrupt generation - */ + Bit 0 - Receive complete + Bit 1 - Error + Bit 2 - Send complete + Bit 3-4 - Unknown + Bit 5 - Send data interrupt generation + Bit 6 - Connection speed: 0 = 9600 bps, 1 = 38400 bps + bit 7 - Receive data interrupt generation + */ // data |= 0x02; m_ws_portram[0xb1] = 0xff; if (data & 0x80) @@ -536,13 +536,13 @@ WRITE8_MEMBER( wswan_state::port_w ) } break; case 0xb5: /* Read controls - Bit 0-3 - Current state of input lines (read-only) - Bit 4-6 - Select line of inputs to read - 001 - Read Y cursors - 010 - Read X cursors - 100 - Read START,A,B buttons - Bit 7 - Unknown - */ + Bit 0-3 - Current state of input lines (read-only) + Bit 4-6 - Select line of inputs to read + 001 - Read Y cursors + 010 - Read X cursors + 100 - Read START,A,B buttons + Bit 7 - Unknown + */ data = data & 0xf0; switch (data) { @@ -576,43 +576,43 @@ WRITE8_MEMBER( wswan_state::port_w ) } break; case 0xb6: /* Interrupt acknowledge - Bit 0 - Serial transmit interrupt acknowledge - Bit 1 - Key press interrupt acknowledge - Bit 2 - RTC alarm interrupt acknowledge - Bit 3 - Serial receive interrupt acknowledge - Bit 4 - Drawing line detection interrupt acknowledge - Bit 5 - VBlank timer interrupt acknowledge - Bit 6 - VBlank interrupt acknowledge - Bit 7 - HBlank timer interrupt acknowledge - */ + Bit 0 - Serial transmit interrupt acknowledge + Bit 1 - Key press interrupt acknowledge + Bit 2 - RTC alarm interrupt acknowledge + Bit 3 - Serial receive interrupt acknowledge + Bit 4 - Drawing line detection interrupt acknowledge + Bit 5 - VBlank timer interrupt acknowledge + Bit 6 - VBlank interrupt acknowledge + Bit 7 - HBlank timer interrupt acknowledge + */ clear_irq_line(data); data = m_ws_portram[0xb6]; break; case 0xba: /* Internal EEPROM data (low) - Bit 0-7 - Internal EEPROM data transfer bit 0-7 - */ + Bit 0-7 - Internal EEPROM data transfer bit 0-7 + */ case 0xbb: /* Internal EEPROM data (high) - Bit 0-7 - Internal EEPROM data transfer bit 8-15 - */ + Bit 0-7 - Internal EEPROM data transfer bit 8-15 + */ break; case 0xbc: /* Internal EEPROM address (low) - Bit 0-7 - Internal EEPROM address bit 1-8 - */ + Bit 0-7 - Internal EEPROM address bit 1-8 + */ case 0xbd: /* Internal EEPROM address (high) - Bit 0 - Internal EEPROM address bit 9(?) - Bit 1-7 - Unknown - Only 1KByte internal EEPROM?? - */ + Bit 0 - Internal EEPROM address bit 9(?) + Bit 1-7 - Unknown + Only 1KByte internal EEPROM?? + */ break; case 0xbe: /* Internal EEPROM command - Bit 0 - Read complete (read only) - Bit 1 - Write complete (read only) - Bit 2-3 - Unknown - Bit 4 - Read - Bit 5 - Write - Bit 6 - Protect - Bit 7 - Initialize - */ + Bit 0 - Read complete (read only) + Bit 1 - Write complete (read only) + Bit 2-3 - Unknown + Bit 4 - Read + Bit 5 - Write + Bit 6 - Protect + Bit 7 - Initialize + */ if (data & 0x20) { UINT16 addr = ( ( ( m_ws_portram[0xbd] << 8 ) | m_ws_portram[0xbc] ) << 1 ) & 0x1FF; @@ -654,7 +654,7 @@ WRITE8_MEMBER( wswan_state::port_w ) logerror( "Write to unsupported port: %X - %X\n", offset, data ); break; } - + /* Update the port value */ m_ws_portram[offset] = data; } diff --git a/src/mess/machine/x820kb.c b/src/mess/machine/x820kb.c index 0e89efc38f6..09ebd038dbc 100644 --- a/src/mess/machine/x820kb.c +++ b/src/mess/machine/x820kb.c @@ -36,10 +36,10 @@ Notes: /* - TODO: + TODO: - - repeat - - what are T0/T1/INT? + - repeat + - what are T0/T1/INT? */ @@ -307,16 +307,16 @@ WRITE8_MEMBER( xerox_820_keyboard_t::kb_p1_w ) { /* - bit description + bit description - 0 A0 - 1 A1 - 2 A2 - 3 A3 - 4 KBSTB - 5 - 6 - 7 ? (toggled if T1=0) + 0 A0 + 1 A1 + 2 A2 + 3 A3 + 4 KBSTB + 5 + 6 + 7 ? (toggled if T1=0) */ diff --git a/src/mess/mess.lst b/src/mess/mess.lst index 82dc67d530f..5e3d5e10a11 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -2557,4 +2557,3 @@ minicom gameking leapster leapstertv - diff --git a/src/mess/tools/castool/main.c b/src/mess/tools/castool/main.c index 4038588b6b7..22564dcdf78 100644 --- a/src/mess/tools/castool/main.c +++ b/src/mess/tools/castool/main.c @@ -104,7 +104,7 @@ const struct SupportedCassetteFormats formats[] = { {"sol20", sol20_cassette_formats ,"PTC SOL-20"}, {"sorcerer", sorcerer_cassette_formats ,"Exidy Sorcerer"}, {"sordm5", sordm5_cassette_formats ,"Sord M5"}, - {"spc1000", spc1000_cassette_formats ,"Samsung SPC-1000"}, + {"spc1000", spc1000_cassette_formats ,"Samsung SPC-1000"}, {"svi", svi_cassette_formats ,"Spectravideo SVI-318 & SVI-328"}, {"to7", to7_cassette_formats ,"Thomson TO-series"}, {"trs80l2", trs80l2_cassette_formats ,"TRS-80 Level 2"}, @@ -120,7 +120,7 @@ const struct SupportedCassetteFormats formats[] = { {"zx81_p", zx81_p_format ,"Sinclair ZX81"}, - + {NULL,NULL,NULL} }; diff --git a/src/mess/video/apple2.c b/src/mess/video/apple2.c index eb0e394c564..fbf21517aed 100644 --- a/src/mess/video/apple2.c +++ b/src/mess/video/apple2.c @@ -668,7 +668,7 @@ UINT32 apple2_state::screen_update_apple2(screen_device &screen, bitmap_ind16 &b } /* - New implementation + New implementation */ const device_type APPLE2_VIDEO = &device_creator<a2_video_device>; @@ -784,8 +784,8 @@ void a2_video_device::plot_text_character(bitmap_ind16 &bitmap, int xpos, int yp { if ((code >= 0x60) && (code <= 0x7f)) { - code |= 0x80; // map to lowercase normal - i = fg; // and flip the color + code |= 0x80; // map to lowercase normal + i = fg; // and flip the color fg = bg; bg = i; } @@ -1022,20 +1022,20 @@ void a2_video_device::dlores_update(screen_device &screen, bitmap_ind16 &bitmap, { UINT16 *vram = &bitmap.pix16(row + y, (col * 14)); - *vram++ = abits & (1 << 0) ? fg : 0; - *vram++ = abits & (1 << 1) ? fg : 0; - *vram++ = abits & (1 << 2) ? fg : 0; - *vram++ = abits & (1 << 3) ? fg : 0; - *vram++ = abits & (1 << 0) ? fg : 0; - *vram++ = abits & (1 << 1) ? fg : 0; - *vram++ = abits & (1 << 2) ? fg : 0; - *vram++ = bits & (1 << 0) ? fg : 0; - *vram++ = bits & (1 << 1) ? fg : 0; - *vram++ = bits & (1 << 2) ? fg : 0; - *vram++ = bits & (1 << 3) ? fg : 0; - *vram++ = bits & (1 << 0) ? fg : 0; - *vram++ = bits & (1 << 1) ? fg : 0; - *vram++ = bits & (1 << 2) ? fg : 0; + *vram++ = abits & (1 << 0) ? fg : 0; + *vram++ = abits & (1 << 1) ? fg : 0; + *vram++ = abits & (1 << 2) ? fg : 0; + *vram++ = abits & (1 << 3) ? fg : 0; + *vram++ = abits & (1 << 0) ? fg : 0; + *vram++ = abits & (1 << 1) ? fg : 0; + *vram++ = abits & (1 << 2) ? fg : 0; + *vram++ = bits & (1 << 0) ? fg : 0; + *vram++ = bits & (1 << 1) ? fg : 0; + *vram++ = bits & (1 << 2) ? fg : 0; + *vram++ = bits & (1 << 3) ? fg : 0; + *vram++ = bits & (1 << 0) ? fg : 0; + *vram++ = bits & (1 << 1) ? fg : 0; + *vram++ = bits & (1 << 2) ? fg : 0; } bits = (code >> 4) & 0x0F; @@ -1045,20 +1045,20 @@ void a2_video_device::dlores_update(screen_device &screen, bitmap_ind16 &bitmap, { UINT16 *vram = &bitmap.pix16(row + y, (col * 14)); - *vram++ = abits & (1 << 0) ? fg : 0; - *vram++ = abits & (1 << 1) ? fg : 0; - *vram++ = abits & (1 << 2) ? fg : 0; - *vram++ = abits & (1 << 3) ? fg : 0; - *vram++ = abits & (1 << 0) ? fg : 0; - *vram++ = abits & (1 << 1) ? fg : 0; - *vram++ = abits & (1 << 2) ? fg : 0; - *vram++ = bits & (1 << 0) ? fg : 0; - *vram++ = bits & (1 << 1) ? fg : 0; - *vram++ = bits & (1 << 2) ? fg : 0; - *vram++ = bits & (1 << 3) ? fg : 0; - *vram++ = bits & (1 << 0) ? fg : 0; - *vram++ = bits & (1 << 1) ? fg : 0; - *vram++ = bits & (1 << 2) ? fg : 0; + *vram++ = abits & (1 << 0) ? fg : 0; + *vram++ = abits & (1 << 1) ? fg : 0; + *vram++ = abits & (1 << 2) ? fg : 0; + *vram++ = abits & (1 << 3) ? fg : 0; + *vram++ = abits & (1 << 0) ? fg : 0; + *vram++ = abits & (1 << 1) ? fg : 0; + *vram++ = abits & (1 << 2) ? fg : 0; + *vram++ = bits & (1 << 0) ? fg : 0; + *vram++ = bits & (1 << 1) ? fg : 0; + *vram++ = bits & (1 << 2) ? fg : 0; + *vram++ = bits & (1 << 3) ? fg : 0; + *vram++ = bits & (1 << 0) ? fg : 0; + *vram++ = bits & (1 << 1) ? fg : 0; + *vram++ = bits & (1 << 2) ? fg : 0; } } } @@ -1070,7 +1070,7 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c int row, col; UINT32 start_address; UINT32 address; - UINT8 *aux_page = m_ram_ptr; + UINT8 *aux_page = m_ram_ptr; int fg = 0; int bg = 0; @@ -1079,12 +1079,12 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c start_address = 0x400; if (m_aux_ptr) { - aux_page = m_aux_ptr; + aux_page = m_aux_ptr; } } else { - start_address = m_page2 ? 0x800 : 0x400; + start_address = m_page2 ? 0x800 : 0x400; } beginrow = MAX(beginrow, cliprect.min_y - (cliprect.min_y % 8)); @@ -1102,7 +1102,7 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c { if (m_80col) { - for (col = 0; col < 40; col++) + for (col = 0; col < 40; col++) { /* calculate address */ address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col)); @@ -1115,7 +1115,7 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c } else { - for (col = 0; col < 40; col++) + for (col = 0; col < 40; col++) { /* calculate address */ address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col)); @@ -1129,7 +1129,7 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c void a2_video_device::text_update_orig(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow) { int row, col; - UINT32 start_address = m_page2 ? 0x800 : 0x400; + UINT32 start_address = m_page2 ? 0x800 : 0x400; UINT32 address; int fg = 0; int bg = 0; @@ -1147,7 +1147,7 @@ void a2_video_device::text_update_orig(screen_device &screen, bitmap_ind16 &bitm for (row = beginrow; row <= endrow; row += 8) { - for (col = 0; col < 40; col++) + for (col = 0; col < 40; col++) { /* calculate address */ address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col)); @@ -1361,7 +1361,7 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c vram = &m_ram_ptr[page]; if (m_aux_ptr) { - vaux = m_aux_ptr; + vaux = m_aux_ptr; } else { @@ -1462,5 +1462,3 @@ PALETTE_INIT_MEMBER(a2_video_device, apple2) { palette.set_pen_colors(0, apple2_palette, ARRAY_LENGTH(apple2_palette)); } - - diff --git a/src/mess/video/apple2.h b/src/mess/video/apple2.h index c109ccf9111..79ce9076777 100644 --- a/src/mess/video/apple2.h +++ b/src/mess/video/apple2.h @@ -1,7 +1,7 @@ /********************************************************************* - - video/apple2.h - Video handling for 8-bit Apple IIs - + + video/apple2.h - Video handling for 8-bit Apple IIs + *********************************************************************/ #ifndef __A2_VIDEO__ diff --git a/src/mess/video/wswan_video.c b/src/mess/video/wswan_video.c index c4f6c72c8c5..5b52ccdab60 100644 --- a/src/mess/video/wswan_video.c +++ b/src/mess/video/wswan_video.c @@ -1,16 +1,16 @@ /*************************************************************************** - + wswan_video.c - + File to handle video emulation of the Bandai WonderSwan VDP. - + Anthony Kruize Wilbert Pol - + TODO: - remove the redundant parts of m_regs - split the Color VDP from the Mono VDP? - + ***************************************************************************/ #include "wswan_video.h" @@ -32,7 +32,7 @@ void wswan_video_device::common_save() save_item(NAME(m_palette_port)); save_item(NAME(m_pal)); save_item(NAME(m_regs)); - + save_item(NAME(m_layer_bg_enable)); save_item(NAME(m_layer_fg_enable)); save_item(NAME(m_sprites_enable)); @@ -79,10 +79,10 @@ void wswan_video_device::common_save() void wswan_video_device::device_start() { machine().first_screen()->register_screen_bitmap(m_bitmap); - + m_timer = timer_alloc(TIMER_SCANLINE); m_timer->adjust(attotime::from_ticks(256, 3072000), 0, attotime::from_ticks(256, 3072000)); - + // bind callbacks m_set_irq_cb.bind_relative_to(*owner()); m_snd_dma_cb.bind_relative_to(*owner()); @@ -166,7 +166,7 @@ void wswan_video_device::device_reset() m_timer_vblank_mode = 0; m_timer_vblank_reload = 0; m_timer_vblank_count = 0; /* Vertical blank timer counter value */ - + memset(m_sprite_table_buffer, 0, sizeof(m_sprite_table_buffer)); memset(m_main_palette, 0, sizeof(m_main_palette)); memcpy(m_regs, vdp_regs_init, 256); @@ -190,15 +190,15 @@ void wswan_video_device::device_timer(emu_timer &timer, device_timer_id id, int void wswan_video_device::setup_palettes() { - if (m_color_mode) + if (m_color_mode) { - for (int i = 0; i < 16; i++) - for (int j = 0; j < 16; j++) + for (int i = 0; i < 16; i++) + for (int j = 0; j < 16; j++) m_pal[i][j] = ((m_palette_vram[(i << 5) + j * 2 + 1] << 8) | m_palette_vram[(i << 5) + j * 2]) & 0x0fff; - } - else + } + else { - for (int i = 0; i < 16; i++) + for (int i = 0; i < 16; i++) { m_pal[i][0] = (m_palette_port[(i << 1)] >> 0) & 0x07; m_pal[i][1] = (m_palette_port[(i << 1)] >> 4) & 0x07; @@ -212,8 +212,8 @@ void wswan_video_device::draw_background() { UINT16 map_addr = m_layer_bg_address + (((m_current_line + m_layer_bg_scroll_y) & 0xf8) << 3); UINT8 start_column = (m_layer_bg_scroll_x >> 3); - - for (int column = 0; column < 29; column++) + + for (int column = 0; column < 29; column++) { UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; int x_offset, tile_line, tile_address; @@ -221,34 +221,34 @@ void wswan_video_device::draw_background() | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)]; int tile_number = tile_data & 0x01ff; int tile_palette = (tile_data >> 9) & 0x0f; - + tile_line = (m_current_line + m_layer_bg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip tile_line = 7 - tile_line; - - if (m_colors_16) + + if (m_colors_16) { tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; plane2 = m_vram[tile_address + 2] << 2; plane3 = m_vram[tile_address + 3] << 3; } - } - else + } + else { tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; @@ -256,24 +256,24 @@ void wswan_video_device::draw_background() plane3 = 0; } } - - for (int x = 0; x < 8; x++) + + for (int x = 0; x < 8; x++) { int col; - if (m_tile_packed) + if (m_tile_packed) { - if (m_colors_16) + if (m_colors_16) { col = plane0 & 0x0f; plane0 = plane0 >> 4; - } - else + } + else { col = plane0 & 0x03; plane0 = plane0 >> 2; } - } - else + } + else { col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1); plane3 = plane3 >> 1; @@ -282,29 +282,29 @@ void wswan_video_device::draw_background() plane0 = plane0 >> 1; } - if (tile_data & 0x4000) + if (tile_data & 0x4000) x_offset = x + (column << 3) - (m_layer_bg_scroll_x & 0x07); else x_offset = 7 - x + (column << 3) - (m_layer_bg_scroll_x & 0x07); - if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS) + if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS) { - if (m_colors_16) + if (m_colors_16) { - if (col) + if (col) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; - else + else { /* Hmmmm, what should we do here... Is this correct?? */ m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; } } - } - else + } + else { - if (col || !(tile_palette & 4)) + if (col || !(tile_palette & 4)) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -322,7 +322,7 @@ void wswan_video_device::draw_foreground_0() UINT16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3); UINT8 start_column = (m_layer_fg_scroll_x >> 3); - for (int column = 0; column < 29; column++) + for (int column = 0; column < 29; column++) { UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; int x_offset, tile_line, tile_address; @@ -330,34 +330,34 @@ void wswan_video_device::draw_foreground_0() | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)]; int tile_number = tile_data & 0x01ff; int tile_palette = (tile_data >> 9) & 0x0f; - + tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip tile_line = 7 - tile_line; - - if (m_colors_16) + + if (m_colors_16) { tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; plane2 = m_vram[tile_address + 2] << 2; plane3 = m_vram[tile_address + 3] << 3; } - } - else + } + else { tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; @@ -366,23 +366,23 @@ void wswan_video_device::draw_foreground_0() } } - for (int x = 0; x < 8; x++ ) + for (int x = 0; x < 8; x++ ) { int col; - if (m_tile_packed) + if (m_tile_packed) { - if (m_colors_16) + if (m_colors_16) { col = plane0 & 0x0f; plane0 = plane0 >> 4; - } - else + } + else { col = plane0 & 0x03; plane0 = plane0 >> 2; } - } - else + } + else { col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1); plane3 = plane3 >> 1; @@ -391,16 +391,16 @@ void wswan_video_device::draw_foreground_0() plane0 = plane0 >> 1; } - if (tile_data & 0x4000) + if (tile_data & 0x4000) x_offset = x + (column << 3) - (m_layer_fg_scroll_x & 0x07); else x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07); - if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS) + if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS) { - if (m_colors_16) + if (m_colors_16) { - if (col) + if (col) { // if (m_color_mode) { m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -409,10 +409,10 @@ void wswan_video_device::draw_foreground_0() // m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; // } } - } - else + } + else { - if (col || !(tile_palette & 4)) + if (col || !(tile_palette & 4)) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -429,8 +429,8 @@ void wswan_video_device::draw_foreground_2() { UINT16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3); UINT8 start_column = (m_layer_fg_scroll_x >> 3); - - for (int column = 0; column < 29; column++) + + for (int column = 0; column < 29; column++) { UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; int x_offset, tile_line, tile_address; @@ -438,35 +438,35 @@ void wswan_video_device::draw_foreground_2() | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)]; int tile_number = tile_data & 0x01ff; int tile_palette = (tile_data >> 9) & 0x0f; - + tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip tile_line = 7 - tile_line; - - if (m_colors_16) + + if (m_colors_16) { tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; plane2 = m_vram[tile_address + 2] << 2; plane3 = m_vram[tile_address + 3] << 3; } - } - else + } + else { tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; @@ -475,23 +475,23 @@ void wswan_video_device::draw_foreground_2() } } - for (int x = 0; x < 8; x++) + for (int x = 0; x < 8; x++) { int col; - if (m_tile_packed) + if (m_tile_packed) { - if (m_colors_16) + if (m_colors_16) { col = plane0 & 0x0f; plane0 = plane0 >> 4; - } - else + } + else { col = plane0 & 0x03; plane0 = plane0 >> 2; } - } - else + } + else { col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1); plane3 = plane3 >> 1; @@ -500,16 +500,16 @@ void wswan_video_device::draw_foreground_2() plane0 = plane0 >> 1; } - if (tile_data & 0x4000) + if (tile_data & 0x4000) x_offset = x + (column << 3) - (m_layer_fg_scroll_x & 0x07); else x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07); - if (x_offset >= 0 && x_offset >= m_window_fg_left && x_offset < m_window_fg_right && x_offset < WSWAN_X_PIXELS) + if (x_offset >= 0 && x_offset >= m_window_fg_left && x_offset < m_window_fg_right && x_offset < WSWAN_X_PIXELS) { - if (m_colors_16) + if (m_colors_16) { - if (col) + if (col) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -517,10 +517,10 @@ void wswan_video_device::draw_foreground_2() /* Hmmmm, what should we do here... Is this correct?? */ m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; } - } - else + } + else { - if (col || !(tile_palette & 4)) + if (col || !(tile_palette & 4)) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -537,8 +537,8 @@ void wswan_video_device::draw_foreground_3() { UINT16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3); UINT8 start_column = (m_layer_fg_scroll_x >> 3); - - for (int column = 0; column < 29; column++) + + for (int column = 0; column < 29; column++) { UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; int x_offset, tile_line, tile_address; @@ -550,30 +550,30 @@ void wswan_video_device::draw_foreground_3() tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip tile_line = 7 - tile_line; - - if (m_colors_16) + + if (m_colors_16) { tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; plane2 = m_vram[tile_address + 2] << 2; plane3 = m_vram[tile_address + 3] << 3; } - } - else + } + else { tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; @@ -582,23 +582,23 @@ void wswan_video_device::draw_foreground_3() } } - for (int x = 0; x < 8; x++) + for (int x = 0; x < 8; x++) { int col; - if (m_tile_packed) + if (m_tile_packed) { - if (m_colors_16) + if (m_colors_16) { col = plane0 & 0x0f; plane0 = plane0 >> 4; - } - else + } + else { col = plane0 & 0x03; plane0 = plane0 >> 2; } - } - else + } + else { col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1); plane3 = plane3 >> 1; @@ -607,16 +607,16 @@ void wswan_video_device::draw_foreground_3() plane0 = plane0 >> 1; } - if (tile_data & 0x4000) + if (tile_data & 0x4000) x_offset = x + (column << 3) - (m_layer_fg_scroll_x & 0x07); else x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07); - if ((x_offset >= 0 && x_offset < m_window_fg_left) || (x_offset >= m_window_fg_right && x_offset < WSWAN_X_PIXELS)) + if ((x_offset >= 0 && x_offset < m_window_fg_left) || (x_offset >= m_window_fg_right && x_offset < WSWAN_X_PIXELS)) { - if (m_colors_16) + if (m_colors_16) { - if (col) + if (col) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -624,10 +624,10 @@ void wswan_video_device::draw_foreground_3() /* Hmmmm, what should we do here... Is this correct?? */ m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; } - } - else + } + else { - if (col || !(tile_palette & 4)) + if (col || !(tile_palette & 4)) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -645,14 +645,14 @@ void wswan_video_device::handle_sprites(int mask) if (m_sprite_count == 0) return; - for (int i = m_sprite_first + m_sprite_count - 1; i >= m_sprite_first; i--) + for (int i = m_sprite_first + m_sprite_count - 1; i >= m_sprite_first; i--) { UINT16 tile_data = (m_sprite_table_buffer[i * 4 + 1] << 8) | m_sprite_table_buffer[i * 4]; UINT8 y = m_sprite_table_buffer[ i * 4 + 2 ]; UINT8 x = m_sprite_table_buffer[ i * 4 + 3 ]; int tile_line = (m_current_line - y) & 0xff; - if ((tile_line >= 0) && (tile_line < 8) && ((tile_data & 0x2000) == mask)) + if ((tile_line >= 0) && (tile_line < 8) && ((tile_data & 0x2000) == mask)) { UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; int x_offset, tile_address; @@ -662,30 +662,30 @@ void wswan_video_device::handle_sprites(int mask) if (tile_data & 0x8000) tile_line = 7 - tile_line; - - if (m_colors_16) + + if (m_colors_16) { tile_address = 0x4000 + (tile_number * 32) + (tile_line << 2); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; plane2 = m_vram[tile_address + 2] << 2; plane3 = m_vram[tile_address + 3] << 3; } - } - else + } + else { tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); - if (m_tile_packed) + if (m_tile_packed) { plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; - } - else + } + else { plane0 = m_vram[tile_address + 0]; plane1 = m_vram[tile_address + 1] << 1; @@ -693,38 +693,38 @@ void wswan_video_device::handle_sprites(int mask) plane3 = 0; } } - - if (m_window_sprites_enable) + + if (m_window_sprites_enable) { - if (tile_data & 0x1000) + if (tile_data & 0x1000) { if (m_current_line >= m_window_sprites_top && m_current_line <= m_window_sprites_bottom) check_clip = 1; - } - else + } + else { if (m_current_line < m_window_sprites_top || m_current_line > m_window_sprites_bottom) continue; } } - - for (int j = 0; j < 8; j++) + + for (int j = 0; j < 8; j++) { int col; - if (m_tile_packed) + if (m_tile_packed) { - if (m_colors_16) + if (m_colors_16) { col = plane0 & 0x0f; plane0 = plane0 >> 4; - } - else + } + else { col = plane0 & 0x03; plane0 = plane0 >> 2; } - } - else + } + else { col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1); plane3 = plane3 >> 1; @@ -740,26 +740,26 @@ void wswan_video_device::handle_sprites(int mask) x_offset = x_offset & 0xff; - if (m_window_sprites_enable) + if (m_window_sprites_enable) { - if (tile_data & 0x1000 && check_clip) + if (tile_data & 0x1000 && check_clip) { if (x_offset >= m_window_sprites_left && x_offset <= m_window_sprites_right) continue; - } - else + } + else { - if (x_offset < m_window_sprites_left || x_offset > m_window_sprites_right) + if (x_offset < m_window_sprites_left || x_offset > m_window_sprites_right) { // continue; } } } - if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS) + if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS) { - if (m_colors_16) + if (m_colors_16) { - if (col) + if (col) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -767,10 +767,10 @@ void wswan_video_device::handle_sprites(int mask) /* Hmmmm, what should we do here... Is this correct?? */ m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; } - } - else + } + else { - if (col || !(tile_palette & 4)) + if (col || !(tile_palette & 4)) { if (m_color_mode) m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col]; @@ -788,9 +788,9 @@ void wswan_video_device::handle_sprites(int mask) void wswan_video_device::refresh_scanline() { setup_palettes(); - + rectangle rec(0, WSWAN_X_PIXELS, m_current_line, m_current_line); - if (m_lcd_control) + if (m_lcd_control) { /* Not sure if these background color checks and settings are correct */ if (m_color_mode && m_colors_16) @@ -798,24 +798,24 @@ void wswan_video_device::refresh_scanline() else m_bitmap.fill(m_main_palette[m_bg_control & 0x07], rec); } - else + else { m_bitmap.fill(0, rec); return; } - + // Draw background layer if (m_layer_bg_enable) draw_background(); - + // Draw sprites between background and foreground layers if (m_sprites_enable) handle_sprites(0); - + // Draw foreground layer, taking window settings into account - if (m_layer_fg_enable) + if (m_layer_fg_enable) { - switch (m_window_fg_mode) + switch (m_window_fg_mode) { case 0: // FG inside & outside window area draw_foreground_0(); @@ -835,7 +835,7 @@ void wswan_video_device::refresh_scanline() break; } } - + // Draw sprites in front of foreground layer if (m_sprites_enable) handle_sprites(0x2000); @@ -881,7 +881,7 @@ READ8_MEMBER(wswan_video_device::reg_r) value = m_timer_vblank_count >> 8; break; } - + return value; } @@ -900,7 +900,7 @@ WRITE8_MEMBER(wswan_video_device::reg_w) m_palette_port[offset & 0x1f] = data; return; } - + switch (offset) { case 0x00: // Display control @@ -1140,7 +1140,7 @@ void wswan_video_device::scanline_interrupt() { if (m_current_line < 144) refresh_scanline(); - + // Decrement 12kHz (HBlank) counter if (m_timer_hblank_enable && m_timer_hblank_reload != 0) { @@ -1152,24 +1152,24 @@ void wswan_video_device::scanline_interrupt() m_timer_hblank_count = m_timer_hblank_reload; else m_timer_hblank_reload = 0; - + logerror( "trigerring hbltmr interrupt\n" ); m_set_irq_cb(WSWAN_VIDEO_IFLAG_HBLTMR); } } - + // Handle Sound DMA m_snd_dma_cb(); - + // m_current_line = (m_current_line + 1) % 159; - + if (m_current_line == 144) // buffer sprite table { memcpy(m_sprite_table_buffer, &m_vram[m_sprite_table_address], 512); m_sprite_first = m_sprite_first_latch; // always zero? m_sprite_count = m_sprite_count_latch; } - + if (m_current_line == 144) { m_set_irq_cb(WSWAN_VIDEO_IFLAG_VBL); @@ -1184,18 +1184,18 @@ void wswan_video_device::scanline_interrupt() m_timer_vblank_count = m_timer_vblank_reload; else m_timer_vblank_reload = 0; - + logerror("triggering vbltmr interrupt\n"); m_set_irq_cb(WSWAN_VIDEO_IFLAG_VBLTMR); } } } - + // m_current_line = (m_current_line + 1) % 159; - + if (m_current_line == m_line_compare) m_set_irq_cb(WSWAN_VIDEO_IFLAG_LCMP); - + m_current_line = (m_current_line + 1) % 159; } diff --git a/src/mess/video/wswan_video.h b/src/mess/video/wswan_video.h index 0ac0914f06a..132f8c2fb54 100644 --- a/src/mess/video/wswan_video.h +++ b/src/mess/video/wswan_video.h @@ -1,9 +1,9 @@ /********************************************************************** wswan.h - + File to handle video emulation of the Bandai WonderSwan. - + Anthony Kruize Wilbert Pol @@ -74,7 +74,7 @@ protected: void refresh_scanline(); void scanline_interrupt(); void common_save(); - + bitmap_ind16 m_bitmap; UINT8 m_layer_bg_enable; /* Background layer on/off */ UINT8 m_layer_fg_enable; /* Foreground layer on/off */ |
