trunk/src/mame/drivers/galpanic.c
| r243523 | r243524 | |
| 315 | 315 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 316 | 316 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 317 | 317 | AM_RANGE(0x580000, 0x583fff) AM_RAM_WRITE(galpanic_bgvideoram_mirror_w) |
| 318 | | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 318 | AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 319 | 319 | AM_RANGE(0x680000, 0x68001f) AM_RAM |
| 320 | 320 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| 321 | 321 | AM_RANGE(0x701000, 0x71ffff) AM_RAM |
| r243523 | r243524 | |
| 336 | 336 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 337 | 337 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 338 | 338 | // AM_RANGE(0x580000, 0x583fff) AM_RAM_WRITE(galpanic_bgvideoram_mirror_w) // can't be right, causes half the display to vanish at times! |
| 339 | | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 339 | AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 340 | 340 | AM_RANGE(0x680000, 0x68001f) AM_RAM |
| 341 | 341 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| 342 | 342 | AM_RANGE(0x780000, 0x78001f) AM_RAM |
| r243523 | r243524 | |
| 359 | 359 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 360 | 360 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 361 | 361 | AM_RANGE(0x580000, 0x583fff) AM_RAM //_WRITE(galpanic_bgvideoram_mirror_w) // can't be right, causes half the display to vanish at times! |
| 362 | | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 362 | AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 363 | 363 | AM_RANGE(0x680000, 0x68001f) AM_RAM |
| 364 | 364 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| 365 | 365 | AM_RANGE(0x780000, 0x78001f) AM_RAM |
trunk/src/mess/drivers/edracula.c
| r243523 | r243524 | |
| 5 | 5 | Epoch Dracula (manufactured in Japan) |
| 6 | 6 | * NEC uCOM-43 MCU, labeled D553C 206 |
| 7 | 7 | * cyan/red/green VFD display NEC FIP8BM20T |
| 8 | | |
| 9 | | known releases: |
| 10 | | - Japan: Dracula House, yellow case |
| 11 | | - USA: Dracula, red case |
| 12 | | - Other: Dracula, yellow case, published by Hales |
| 13 | 8 | |
| 14 | | NOTE!: MESS external artwork is required to be able to play |
| 15 | 9 | |
| 16 | 10 | ***************************************************************************/ |
| 17 | 11 | |
| r243523 | r243524 | |
| 33 | 27 | |
| 34 | 28 | required_device<cpu_device> m_maincpu; |
| 35 | 29 | required_device<speaker_sound_device> m_speaker; |
| 36 | | |
| 37 | | UINT32 m_plate; |
| 38 | | UINT16 m_grid; |
| 39 | | |
| 40 | | DECLARE_WRITE8_MEMBER(grid_w); |
| 41 | | DECLARE_WRITE8_MEMBER(plate_w); |
| 42 | | DECLARE_WRITE8_MEMBER(port_i_w); |
| 43 | | |
| 44 | | UINT32 m_vfd_state[0x10]; |
| 45 | | void update_vfd(); |
| 46 | 30 | |
| 47 | 31 | virtual void machine_start(); |
| 48 | 32 | }; |
| 49 | 33 | |
| 50 | 34 | |
| 51 | 35 | |
| 52 | | /*************************************************************************** |
| 53 | | |
| 54 | | Display |
| 55 | | |
| 56 | | ***************************************************************************/ |
| 57 | | |
| 58 | | void edracula_state::update_vfd() |
| 59 | | { |
| 60 | | for (int i = 0; i < 8; i++) |
| 61 | | if (m_grid & (1 << i) && m_vfd_state[i] != m_plate) |
| 62 | | { |
| 63 | | // on difference, send to output |
| 64 | | for (int j = 0; j < 18; j++) |
| 65 | | output_set_lamp_value(i*100 + j, m_plate >> j & 1); |
| 66 | | |
| 67 | | m_vfd_state[i] = m_plate; |
| 68 | | } |
| 69 | | } |
| 70 | | |
| 71 | | |
| 72 | | |
| 73 | | /*************************************************************************** |
| 74 | | |
| 75 | | I/O |
| 76 | | |
| 77 | | ***************************************************************************/ |
| 78 | | |
| 79 | | WRITE8_MEMBER(edracula_state::grid_w) |
| 80 | | { |
| 81 | | // port C/D: vfd matrix grid |
| 82 | | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 83 | | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 84 | | |
| 85 | | update_vfd(); |
| 86 | | } |
| 87 | | |
| 88 | | WRITE8_MEMBER(edracula_state::plate_w) |
| 89 | | { |
| 90 | | // port E/F/G/H/I01: vfd matrix plate |
| 91 | | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
| 92 | | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 93 | | |
| 94 | | update_vfd(); |
| 95 | | } |
| 96 | | |
| 97 | | WRITE8_MEMBER(edracula_state::port_i_w) |
| 98 | | { |
| 99 | | plate_w(space, offset, data & 3); |
| 100 | | |
| 101 | | // I2: speaker out |
| 102 | | m_speaker->level_w(data >> 2 & 1); |
| 103 | | } |
| 104 | | |
| 105 | | |
| 106 | | |
| 107 | | /*************************************************************************** |
| 108 | | |
| 109 | | Inputs |
| 110 | | |
| 111 | | ***************************************************************************/ |
| 112 | | |
| 113 | 36 | static INPUT_PORTS_START( edracula ) |
| 114 | | PORT_START("IN0") |
| 115 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) |
| 116 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SELECT ) |
| 117 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 118 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 119 | | |
| 120 | | PORT_START("IN1") |
| 121 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
| 122 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) |
| 123 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 124 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 125 | 37 | INPUT_PORTS_END |
| 126 | 38 | |
| 127 | 39 | |
| r243523 | r243524 | |
| 134 | 46 | |
| 135 | 47 | void edracula_state::machine_start() |
| 136 | 48 | { |
| 137 | | // zerofill |
| 138 | | memset(m_vfd_state, 0, sizeof(m_vfd_state)); |
| 139 | | m_plate = 0; |
| 140 | | m_grid = 0; |
| 141 | | |
| 142 | | // register for savestates |
| 143 | | save_item(NAME(m_vfd_state)); |
| 144 | | save_item(NAME(m_plate)); |
| 145 | | save_item(NAME(m_grid)); |
| 146 | 49 | } |
| 147 | 50 | |
| 148 | 51 | |
| r243523 | r243524 | |
| 150 | 53 | |
| 151 | 54 | /* basic machine hardware */ |
| 152 | 55 | MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz) |
| 153 | | MCFG_UCOM4_READ_A_CB(IOPORT("IN0")) |
| 154 | | MCFG_UCOM4_READ_B_CB(IOPORT("IN1")) |
| 155 | | MCFG_UCOM4_WRITE_C_CB(WRITE8(edracula_state, grid_w)) |
| 156 | | MCFG_UCOM4_WRITE_D_CB(WRITE8(edracula_state, grid_w)) |
| 157 | | MCFG_UCOM4_WRITE_E_CB(WRITE8(edracula_state, plate_w)) |
| 158 | | MCFG_UCOM4_WRITE_F_CB(WRITE8(edracula_state, plate_w)) |
| 159 | | MCFG_UCOM4_WRITE_G_CB(WRITE8(edracula_state, plate_w)) |
| 160 | | MCFG_UCOM4_WRITE_H_CB(WRITE8(edracula_state, plate_w)) |
| 161 | | MCFG_UCOM4_WRITE_I_CB(WRITE8(edracula_state, port_i_w)) |
| 162 | 56 | |
| 163 | 57 | MCFG_DEFAULT_LAYOUT(layout_edracula) |
| 164 | 58 | |
| r243523 | r243524 | |
| 184 | 78 | ROM_END |
| 185 | 79 | |
| 186 | 80 | |
| 187 | | CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula", GAME_SUPPORTS_SAVE ) |
| 81 | CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
trunk/src/mess/drivers/tb303.c
| r243523 | r243524 | |
| 1 | | // license:BSD-3-Clause |
| 2 | | // copyright-holders:hap |
| 3 | | /*************************************************************************** |
| 4 | | |
| 5 | | Roland TB-303 |
| 6 | | * NEC uCOM-43 MCU, labeled D650C 133 |
| 7 | | |
| 8 | | x |
| 9 | | |
| 10 | | ***************************************************************************/ |
| 11 | | |
| 12 | | #include "emu.h" |
| 13 | | #include "cpu/ucom4/ucom4.h" |
| 14 | | #include "sound/speaker.h" |
| 15 | | |
| 16 | | #include "tb303.lh" |
| 17 | | |
| 18 | | |
| 19 | | class tb303_state : public driver_device |
| 20 | | { |
| 21 | | public: |
| 22 | | tb303_state(const machine_config &mconfig, device_type type, const char *tag) |
| 23 | | : driver_device(mconfig, type, tag), |
| 24 | | m_maincpu(*this, "maincpu") |
| 25 | | { } |
| 26 | | |
| 27 | | required_device<cpu_device> m_maincpu; |
| 28 | | |
| 29 | | virtual void machine_start(); |
| 30 | | }; |
| 31 | | |
| 32 | | |
| 33 | | static INPUT_PORTS_START( tb303 ) |
| 34 | | INPUT_PORTS_END |
| 35 | | |
| 36 | | |
| 37 | | |
| 38 | | /*************************************************************************** |
| 39 | | |
| 40 | | Machine Config |
| 41 | | |
| 42 | | ***************************************************************************/ |
| 43 | | |
| 44 | | void tb303_state::machine_start() |
| 45 | | { |
| 46 | | } |
| 47 | | |
| 48 | | |
| 49 | | static MACHINE_CONFIG_START( tb303, tb303_state ) |
| 50 | | |
| 51 | | /* basic machine hardware */ |
| 52 | | MCFG_CPU_ADD("maincpu", NEC_D650, 454545) // LC circuit, 2.2us pulse |
| 53 | | |
| 54 | | MCFG_DEFAULT_LAYOUT(layout_tb303) |
| 55 | | |
| 56 | | /* no video! */ |
| 57 | | |
| 58 | | /* sound hardware */ |
| 59 | | // discrete... |
| 60 | | MACHINE_CONFIG_END |
| 61 | | |
| 62 | | |
| 63 | | |
| 64 | | /*************************************************************************** |
| 65 | | |
| 66 | | Game driver(s) |
| 67 | | |
| 68 | | ***************************************************************************/ |
| 69 | | |
| 70 | | ROM_START( tb303 ) |
| 71 | | ROM_REGION( 0x0800, "maincpu", 0 ) |
| 72 | | ROM_LOAD( "d650c-133.ic8", 0x0000, 0x0800, CRC(dd2f26ae) SHA1(7f5e37f38d970219dc9e5d49a20dc5335a5c0b30) ) |
| 73 | | ROM_END |
| 74 | | |
| 75 | | |
| 76 | | CONS( 1982, tb303, 0, 0, tb303, tb303, driver_device, 0, "Roland", "TB-303", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) |
trunk/src/osd/sdl/video.c
| r243523 | r243524 | |
| 160 | 160 | info.cbSize = sizeof(info); |
| 161 | 161 | GetMonitorInfo((HMONITOR)m_handle, (LPMONITORINFO)&info); |
| 162 | 162 | m_dimensions.x = m_dimensions.y = 0; |
| 163 | | m_center_width = m_dimensions.w = info.rcMonitor.right - info.rcMonitor.left; |
| 164 | | m_center_height = m_dimensions.h = info.rcMonitor.bottom - info.rcMonitor.top; |
| 163 | m_dimensions.w = info.rcMonitor.right - info.rcMonitor.left; |
| 164 | m_dimensions.h = info.rcMonitor.bottom - info.rcMonitor.top; |
| 165 | 165 | char *temp = utf8_from_wstring(info.szDevice); |
| 166 | 166 | strcpy(m_monitor_device, temp); |
| 167 | 167 | osd_free(temp); |
| r243523 | r243524 | |
| 174 | 174 | dbounds = CGDisplayBounds(primary); |
| 175 | 175 | |
| 176 | 176 | m_dimensions.x = m_dimensions.y = 0; |
| 177 | | m_center_width = m_dimensions.w = dbounds.size.width - dbounds.origin.x; |
| 178 | | m_center_height = m_dimensions.h = dbounds.size.height - dbounds.origin.y; |
| 177 | m_dimensions.w = dbounds.size.width - dbounds.origin.x; |
| 178 | m_dimensions.h = dbounds.size.height - dbounds.origin.y; |
| 179 | 179 | strcpy(m_monitor_device, "Mac OS X display"); |
| 180 | 180 | #elif defined(SDLMAME_X11) || defined(SDLMAME_NO_X11) // X11 version |
| 181 | 181 | { |