| Previous | 199869 Revisions | Next |
| r36103 Wednesday 25th February, 2015 at 07:09:13 UTC by Miodrag Milanović |
|---|
| Cleanups and version bump |
| [/branches/kale/src] | version.c |
| [/branches/kale/src/emu] | fileio.h render.h video.c |
| [/branches/kale/src/emu/bus/a2bus] | a2bus.h |
| [/branches/kale/src/emu/bus/cpc] | smartwatch.c smartwatch.h |
| [/branches/kale/src/emu/bus/nes_ctrl] | bcbattle.c miracle.c |
| [/branches/kale/src/emu/bus/snes_ctrl] | bcbattle.c bcbattle.h ctrl.h joypad.c joypad.h miracle.c mouse.c mouse.h multitap.c pachinko.c sscope.c sscope.h twintap.c |
| [/branches/kale/src/emu/cpu/amis2000] | amis2000.c amis2000.h amis2000d.c amis2000op.inc |
| [/branches/kale/src/emu/cpu/i386] | i386ops.h |
| [/branches/kale/src/emu/cpu/m6502] | m4510.c |
| [/branches/kale/src/emu/cpu/m68000] | m68000.h m68kcpu.h |
| [/branches/kale/src/emu/cpu/ucom4] | ucom4.c ucom4.h ucom4d.c ucom4op.inc |
| [/branches/kale/src/emu/debug] | dvbpoints.c dvwpoints.c |
| [/branches/kale/src/emu/drivers] | xtal.h |
| [/branches/kale/src/emu/machine] | jvshost.c |
| [/branches/kale/src/emu/sound] | saa1099.c |
| [/branches/kale/src/emu/video] | scn2674.c scn2674.h |
| [/branches/kale/src/lib] | lib.mak |
| [/branches/kale/src/lib/formats] | ap2_dsk.c |
| [/branches/kale/src/mame] | mame.lst |
| [/branches/kale/src/mame/audio] | seibu.c t5182.c t5182.h |
| [/branches/kale/src/mame/drivers] | armedf.c bnstars.c comebaby.c cops.c cps2.c cyclemb.c d9final.c darkmist.c dlair2.c dreambal.c exidyttl.c expro02.c fuukifg3.c galivan.c galpani2.c galpani3.c galpanic.c gladiatr.c gluck2.c goodejan.c gunsmoke.c hornet.c igs011.c limenko.c lordgun.c mastboy.c mcr.c namcops2.c naomi.c nbmj9195.c nwk-tr.c panicr.c peplus.c pipeline.c progolf.c quizo.c rabbit.c raiden2.c ramtek.c retofinv.c segaorun.c sengokmj.c sidepckt.c silvmil.c skeetsht.c skyarmy.c snowbros.c statriv2.c taitottl.c tecmosys.c tmmjprd.c welltris.c wink.c xxmissio.c |
| [/branches/kale/src/mame/includes] | bloodbro.h chaknpop.h darkmist.h dcon.h exzisus.h fastfred.h fuukifg2.h fuukifg3.h galpani2.h gladiatr.h gsword.h iqblock.h kaneko16.h liberate.h lordgun.h mustache.h nb1414m4.h pirates.h quizpani.h raiden.h retofinv.h rollrace.h scotrsht.h seicross.h shadfrce.h shootout.h sidepckt.h silkroad.h skydiver.h snowbros.h speedatk.h tecmo.h tecmo16.h tecmosys.h tehkanwc.h thedeep.h tnzs.h vball.h wc90.h welltris.h wrally.h wwfsstar.h xorworld.h xxmissio.h |
| [/branches/kale/src/mame/machine] | mie.c nb1414m4.c tait8741.c tnzs.c |
| [/branches/kale/src/mame/video] | bloodbro.c chaknpop.c darkmist.c dcon.c decospr.c fastfred.c gladiatr.c gsword.c iqblock.c kaneko_spr.c liberate.c mustache.c quizpani.c retofinv.c scotrsht.c shadfrce.c shootout.c skydiver.c tecmo.c tecmo16.c tecmosys.c tehkanwc.c vball.c welltris.c wwfsstar.c xxmissio.c |
| [/branches/kale/src/mess/audio] | gamate.c |
| [/branches/kale/src/mess/drivers] | alnchase.c c65.c c65_old.c edracula.c gamate.c ngen.c pc9801.c pcd.c snes.c splitsec.c tb303.c tc4.c tispeak.c tmtennis.c wildfire.c |
| [/branches/kale/src/mess/includes] | gamate.h |
| [/branches/kale/src/mess/machine] | amstrad.c apple3.c beta.c c65_old.c |
| [/branches/kale/src/mess/osd/windows] | windows.mak |
| [/branches/kale/src/mess/video] | apple3.c |
| [/branches/kale/src/osd/modules/debugger] | debugwin.c |
| [/branches/kale/src/osd/modules/debugger/osx] | debugcommandhistory.h debugconsole.h debugview.h debugwindowhandler.h deviceinfoviewer.h devicesviewer.h disassemblyviewer.h errorlogviewer.h memoryviewer.h pointsviewer.h |
| [/branches/kale/src/osd/modules/debugger/win] | consolewininfo.c consolewininfo.h debugbaseinfo.c debugbaseinfo.h debugviewinfo.c debugviewinfo.h debugwin.h debugwininfo.c debugwininfo.h disasmbasewininfo.c disasmbasewininfo.h disasmviewinfo.c disasmviewinfo.h disasmwininfo.c disasmwininfo.h editwininfo.c editwininfo.h logwininfo.c logwininfo.h memoryviewinfo.c memoryviewinfo.h memorywininfo.c memorywininfo.h pointswininfo.c pointswininfo.h uimetrics.c uimetrics.h |
| [/branches/kale/src/osd/modules/netdev] | pcap.c |
| [/branches/kale/src/osd/sdl] | blit13.h draw13.c drawbgfx.c drawogl.c drawsdl.c sdl.mak video.h window.c window.h |
| [/branches/kale/src/osd/windows] | d3dhlsl.h drawbgfx.c drawdd.c drawgdi.c video.h window.h windows.mak |
| r244614 | r244615 | |
|---|---|---|
| 176 | 176 | void recalc_slot_inh() { m_a2bus->recalc_inh(m_slot); } |
| 177 | 177 | void set_maincpu_halt(int state) { m_a2bus->set_maincpu_halt(state); } |
| 178 | 178 | |
| 179 | // pass through the original address space if any for debugger protection | |
| 179 | // pass through the original address space if any for debugger protection | |
| 180 | 180 | // when debugging e.g. coprocessor cards (Z80 SoftCard etc). |
| 181 | 181 | UINT8 slot_dma_read(address_space &space, UINT16 offset) { return m_a2bus->dma_r(space, offset); } |
| 182 | 182 | void slot_dma_write(address_space &space, UINT16 offset, UINT8 data) { m_a2bus->dma_w(space, offset, data); } |
| r244614 | r244615 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | Dobbertin Smartwatch | |
| 3 | ||
| 4 | Created: 23/2/2015 | |
| 5 | ||
| 6 | TODO: setting the time (requires the DS1315 core to be able to do this, | |
| 7 | at the moment it just reads the current time) | |
| 2 | Dobbertin Smartwatch | |
| 3 | ||
| 4 | Created: 23/2/2015 | |
| 5 | ||
| 6 | TODO: setting the time (requires the DS1315 core to be able to do this, | |
| 7 | at the moment it just reads the current time) | |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | #include "emu.h" |
| r244614 | r244615 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | Dobbertin Smartwatch | |
| 3 | ||
| 4 | Dallas DS1216 Smartwatch + DS1315 Phantom Time chip | |
| 5 | ||
| 6 | Further info at: http://www.cpcwiki.eu/index.php/Dobbertin_Smart_Watch | |
| 7 | ||
| 2 | Dobbertin Smartwatch | |
| 3 | ||
| 4 | Dallas DS1216 Smartwatch + DS1315 Phantom Time chip | |
| 5 | ||
| 6 | Further info at: http://www.cpcwiki.eu/index.php/Dobbertin_Smart_Watch | |
| 7 | ||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | #ifndef SMARTWATCH_H_ |
| r244614 | r244615 | |
|---|---|---|
| 35 | 35 | //------------------------------------------------- |
| 36 | 36 | |
| 37 | 37 | // This part is the hacky replacement for the real Barcode unit [shared with SNES implementation]: |
| 38 | // code periodically checks whether a new code has been scanned and it moves it to the | |
| 38 | // code periodically checks whether a new code has been scanned and it moves it to the | |
| 39 | 39 | // m_current_barcode array |
| 40 | 40 | void nes_bcbattle_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 41 | 41 | { |
| r244614 | r244615 | |
|---|---|---|
| 12 | 12 | #include "miracle.h" |
| 13 | 13 | |
| 14 | 14 | #define MIRACLE_MIDI_WAITING 0 |
| 15 | #define MIRACLE_MIDI_RECEIVE 1 // receive byte from piano | |
| 16 | #define MIRACLE_MIDI_SEND 2 // send byte to piano | |
| 15 | #define MIRACLE_MIDI_RECEIVE 1 // receive byte from piano | |
| 16 | #define MIRACLE_MIDI_SEND 2 // send byte to piano | |
| 17 | 17 | |
| 18 | 18 | //************************************************************************** |
| 19 | 19 | // DEVICE DEFINITIONS |
| r244614 | r244615 | |
| 141 | 141 | |
| 142 | 142 | void nes_miracle_device::write(UINT8 data) |
| 143 | 143 | { |
| 144 | // | |
| 144 | // printf("write: %d (%d %02x %d)\n", data & 1, m_sent_bits, m_data_sent, m_midi_mode); | |
| 145 | 145 | |
| 146 | 146 | if (m_midi_mode == MIRACLE_MIDI_SEND) |
| 147 | 147 | { |
| r244614 | r244615 | |
| 154 | 154 | // then we go back to waiting |
| 155 | 155 | if (m_sent_bits == 8) |
| 156 | 156 | { |
| 157 | // | |
| 157 | // printf("xmit MIDI byte %02x\n", m_data_sent); | |
| 158 | 158 | xmit_char(m_data_sent); |
| 159 | 159 | m_midi_mode = MIRACLE_MIDI_WAITING; |
| 160 | 160 | m_sent_bits = 0; |
| r244614 | r244615 | |
| 175 | 175 | // was timer running? |
| 176 | 176 | if (m_strobe_clock > 0) |
| 177 | 177 | { |
| 178 | // | |
| 178 | // printf("got strobe at %d clocks\n", m_strobe_clock); | |
| 179 | 179 | |
| 180 | 180 | if (m_strobe_clock < 66 && data == 0) |
| 181 | 181 | { |
| r244614 | r244615 | |
| 188 | 188 | m_status_bit = true; |
| 189 | 189 | if (m_recv_read != m_recv_write) |
| 190 | 190 | { |
| 191 | // | |
| 191 | // printf("Getting %02x from Miracle[%d]\n", m_recvring[m_recv_read], m_recv_read); | |
| 192 | 192 | m_data_sent = m_recvring[m_recv_read++]; |
| 193 | 193 | if (m_recv_read >= RECV_RING_SIZE) |
| 194 | 194 | { |
| r244614 | r244615 | |
| 199 | 199 | else |
| 200 | 200 | { |
| 201 | 201 | m_read_status = false; |
| 202 | // | |
| 202 | // printf("Miracle has no data\n"); | |
| 203 | 203 | } |
| 204 | 204 | return; |
| 205 | 205 | } |
| r244614 | r244615 | |
| 230 | 230 | receive_register_extract(); |
| 231 | 231 | UINT8 rcv = get_received_char(); |
| 232 | 232 | |
| 233 | // | |
| 233 | // printf("Got %02x -> [%d]\n", rcv, m_recv_write); | |
| 234 | 234 | m_recvring[m_recv_write++] = rcv; |
| 235 | 235 | if (m_recv_write >= RECV_RING_SIZE) |
| 236 | 236 | { |
| r244614 | r244615 | |
| 282 | 282 | } |
| 283 | 283 | } |
| 284 | 284 | } |
| 285 |
| r244614 | r244615 | |
|---|---|---|
| 35 | 35 | //------------------------------------------------- |
| 36 | 36 | |
| 37 | 37 | // This part is the hacky replacement for the real Barcode unit [shared with NES implementation]: |
| 38 | // code periodically checks whether a new code has been scanned and it moves it to the | |
| 38 | // code periodically checks whether a new code has been scanned and it moves it to the | |
| 39 | 39 | // m_current_barcode array |
| 40 | 40 | void snes_bcbattle_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 41 | 41 | { |
| r244614 | r244615 | |
| 140 | 140 | m_cur_bit++; |
| 141 | 141 | return bit; |
| 142 | 142 | } |
| 143 | if (m_cur_bit == 4) | |
| 143 | if (m_cur_bit == 4) // only the low nibble is transmitted (this is the main action of the BBII interface for SNES) | |
| 144 | 144 | { |
| 145 | 145 | m_cur_bit = 0; |
| 146 | 146 | //printf("%X ", m_current_barcode[m_cur_byte]); |
| r244614 | r244615 | |
| 175 | 175 | UINT8 snes_bcbattle_device::read_pin4() |
| 176 | 176 | { |
| 177 | 177 | UINT8 ret = 0; |
| 178 | ||
| 178 | ||
| 179 | 179 | if (m_idx >= 80) |
| 180 | 180 | ret |= 0x00; |
| 181 | else if (m_idx >= 28) | |
| 181 | else if (m_idx >= 28) // scan actual barcode | |
| 182 | 182 | { |
| 183 | ret |= read_current_bit(); | |
| 183 | ret |= read_current_bit(); // if no code is pending transmission, the function returns 0 | |
| 184 | 184 | m_idx++; |
| 185 | 185 | } |
| 186 | else if (m_idx >= 25) | |
| 186 | else if (m_idx >= 25) // unknown flags? | |
| 187 | 187 | m_idx++; |
| 188 | else if (m_idx == 24) | |
| 188 | else if (m_idx == 24) // barcode present | |
| 189 | 189 | { |
| 190 | 190 | ret |= m_pending_code; |
| 191 | 191 | m_idx++; |
| 192 | 192 | } |
| 193 | else if (m_idx >= 12) | |
| 193 | else if (m_idx >= 12) // controller ID | |
| 194 | 194 | ret |= BIT(0x7000, m_idx++); |
| 195 | else | |
| 195 | else // first 12 bytes are unknown and probably always 0 | |
| 196 | 196 | m_idx++; |
| 197 | ||
| 197 | ||
| 198 | 198 | return ret; |
| 199 | 199 | } |
| 200 | 200 | |
| r244614 | r244615 | |
| 207 | 207 | { |
| 208 | 208 | int old = m_strobe; |
| 209 | 209 | m_strobe = data & 0x01; |
| 210 | ||
| 211 | if (m_strobe < old) // 1 -> 0 transition | |
| 210 | ||
| 211 | if (m_strobe < old) // 1 -> 0 transition | |
| 212 | 212 | port_poll(); |
| 213 | 213 | } |
| r244614 | r244615 | |
|---|---|---|
| 45 | 45 | int read_current_bit(); |
| 46 | 46 | |
| 47 | 47 | private: |
| 48 | ||
| 48 | ||
| 49 | 49 | static const device_timer_id TIMER_BATTLER = 1; |
| 50 | 50 | required_device<barcode_reader_device> m_reader; |
| 51 | 51 | UINT8 m_current_barcode[20]; |
| r244614 | r244615 | |
|---|---|---|
| 29 | 29 | // construction/destruction |
| 30 | 30 | device_snes_control_port_interface(const machine_config &mconfig, device_t &device); |
| 31 | 31 | virtual ~device_snes_control_port_interface(); |
| 32 | ||
| 32 | ||
| 33 | 33 | virtual UINT8 read_pin4() { return 0; }; |
| 34 | 34 | virtual UINT8 read_pin5() { return 0; }; |
| 35 | 35 | virtual void write_pin6(UINT8 data) { }; |
| 36 | 36 | virtual void write_strobe(UINT8 data) { }; |
| 37 | 37 | virtual void port_poll() { }; |
| 38 | ||
| 38 | ||
| 39 | 39 | protected: |
| 40 | 40 | snes_control_port_device *m_port; |
| 41 | 41 | }; |
| r244614 | r244615 | |
|---|---|---|
| 97 | 97 | // if up, no down |
| 98 | 98 | if (temp & 0x10) |
| 99 | 99 | temp &= ~0x20; |
| 100 | ||
| 100 | ||
| 101 | 101 | m_latch = temp | 0xffff0000; |
| 102 | 102 | } |
| 103 | 103 | |
| r244614 | r244615 | |
| 121 | 121 | int old = m_strobe; |
| 122 | 122 | m_strobe = data & 0x01; |
| 123 | 123 | |
| 124 | if (m_strobe < old) | |
| 124 | if (m_strobe < old) // 1 -> 0 transition | |
| 125 | 125 | port_poll(); |
| 126 | 126 | } |
| 127 |
| r244614 | r244615 | |
|---|---|---|
| 41 | 41 | virtual UINT8 read_pin4(); |
| 42 | 42 | virtual void write_strobe(UINT8 data); |
| 43 | 43 | virtual void port_poll(); |
| 44 | ||
| 44 | ||
| 45 | 45 | private: |
| 46 | 46 | required_ioport m_joypad; |
| 47 | 47 | int m_strobe; |
| r244614 | r244615 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Copyright MESS Team. |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | ||
| 7 | ||
| 8 | 8 | recv at PC = 008a4a |
| 9 | 9 | xmit at PC = 008adb |
| 10 | ||
| 10 | ||
| 11 | 11 | **********************************************************************/ |
| 12 | 12 | |
| 13 | 13 | #include "miracle.h" |
| 14 | 14 | |
| 15 | 15 | #define MIRACLE_MIDI_WAITING 0 |
| 16 | #define MIRACLE_MIDI_RECEIVE 1 // receive byte from piano | |
| 17 | #define MIRACLE_MIDI_SEND 2 // send byte to piano | |
| 16 | #define MIRACLE_MIDI_RECEIVE 1 // receive byte from piano | |
| 17 | #define MIRACLE_MIDI_SEND 2 // send byte to piano | |
| 18 | 18 | |
| 19 | 19 | //************************************************************************** |
| 20 | 20 | // DEVICE DEFINITIONS |
| r244614 | r244615 | |
| 130 | 130 | |
| 131 | 131 | void snes_miracle_device::write_pin6(UINT8 data) |
| 132 | 132 | { |
| 133 | // | |
| 133 | // printf("%02x to pin6\n", data); | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | void snes_miracle_device::write_strobe(UINT8 data) |
| 137 | 137 | { |
| 138 | // | |
| 138 | // printf("%02x to strobe\n", data); | |
| 139 | 139 | |
| 140 | 140 | if (m_midi_mode == MIRACLE_MIDI_SEND) |
| 141 | 141 | { |
| r244614 | r244615 | |
| 148 | 148 | // then we go back to waiting |
| 149 | 149 | if (m_sent_bits == 8) |
| 150 | 150 | { |
| 151 | // | |
| 151 | // printf("xmit MIDI byte %02x\n", m_data_sent); | |
| 152 | 152 | xmit_char(m_data_sent); |
| 153 | 153 | m_midi_mode = MIRACLE_MIDI_WAITING; |
| 154 | 154 | m_sent_bits = 0; |
| r244614 | r244615 | |
| 169 | 169 | // was timer running? |
| 170 | 170 | if (m_strobe_clock > 0) |
| 171 | 171 | { |
| 172 | // | |
| 172 | // printf("got strobe at %d clocks\n", m_strobe_clock); | |
| 173 | 173 | |
| 174 | 174 | if (m_strobe_clock < 500 && data == 0) |
| 175 | 175 | { |
| r244614 | r244615 | |
| 182 | 182 | m_status_bit = true; |
| 183 | 183 | if (m_recv_read != m_recv_write) |
| 184 | 184 | { |
| 185 | // | |
| 185 | // printf("Getting %02x from Miracle[%d]\n", m_recvring[m_recv_read], m_recv_read); | |
| 186 | 186 | m_data_sent = m_recvring[m_recv_read++]; |
| 187 | 187 | if (m_recv_read >= RECV_RING_SIZE) |
| 188 | 188 | { |
| r244614 | r244615 | |
| 193 | 193 | else |
| 194 | 194 | { |
| 195 | 195 | m_read_status = false; |
| 196 | // | |
| 196 | // printf("Miracle has no data\n"); | |
| 197 | 197 | } |
| 198 | 198 | return; |
| 199 | 199 | } |
| r244614 | r244615 | |
| 225 | 225 | receive_register_extract(); |
| 226 | 226 | UINT8 rcv = get_received_char(); |
| 227 | 227 | |
| 228 | // | |
| 228 | // printf("Got %02x -> [%d]\n", rcv, m_recv_write); | |
| 229 | 229 | m_recvring[m_recv_write++] = rcv; |
| 230 | 230 | if (m_recv_write >= RECV_RING_SIZE) |
| 231 | 231 | { |
| r244614 | r244615 | |
| 277 | 277 | } |
| 278 | 278 | } |
| 279 | 279 | } |
| 280 |
| r244614 | r244615 | |
|---|---|---|
| 1 | 1 | /********************************************************************** |
| 2 | 2 | |
| 3 | 3 | Nintendo Super Famicom & SNES Mouse |
| 4 | ||
| 4 | ||
| 5 | 5 | Copyright MESS Team. |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| r244614 | r244615 | |
| 32 | 32 | // detect a sudden jump in the wrong direction, making the usage unfriendly... |
| 33 | 33 | PORT_START("MOUSE_X") |
| 34 | 34 | PORT_BIT( 0x1ff, 0x100, IPT_LIGHTGUN_X ) PORT_NAME("Superscope X Axis") PORT_SENSITIVITY(30) PORT_KEYDELTA(5) |
| 35 | // | |
| 35 | // PORT_BIT( 0xff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(30) PORT_KEYDELTA(5) | |
| 36 | 36 | |
| 37 | 37 | PORT_START("MOUSE_Y") |
| 38 | 38 | PORT_BIT( 0x1ff, 0x100, IPT_LIGHTGUN_Y) PORT_NAME("Superscope Y Axis") PORT_SENSITIVITY(30) PORT_KEYDELTA(5) |
| 39 | // | |
| 39 | // PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(30) PORT_KEYDELTA(5) | |
| 40 | 40 | INPUT_PORTS_END |
| 41 | 41 | |
| 42 | 42 | |
| r244614 | r244615 | |
| 155 | 155 | m_deltax = var; |
| 156 | 156 | m_oldx = m_x; |
| 157 | 157 | } |
| 158 | ||
| 158 | ||
| 159 | 159 | var = m_y - m_oldy; |
| 160 | 160 | if (var) |
| 161 | 161 | { |
| r244614 | r244615 | |
| 163 | 163 | if (m_diry != new_dir) |
| 164 | 164 | m_diry = new_dir; |
| 165 | 165 | } |
| 166 | ||
| 166 | ||
| 167 | 167 | if (var < -127) |
| 168 | 168 | { |
| 169 | 169 | m_deltay = 0x7f; |
| r244614 | r244615 | |
| 196 | 196 | UINT8 snes_mouse_device::read_pin4() |
| 197 | 197 | { |
| 198 | 198 | UINT8 res = 0; |
| 199 | ||
| 199 | ||
| 200 | 200 | if (m_strobe == 1) |
| 201 | 201 | { |
| 202 | 202 | // reading with strobe 1, changes mouse speed |
| 203 | 203 | m_speed = (m_speed + 1) % 3; |
| 204 | 204 | return res; |
| 205 | 205 | } |
| 206 | ||
| 206 | ||
| 207 | 207 | if (m_idx >= 32) |
| 208 | 208 | res |= 0x01; |
| 209 | 209 | else if (m_idx >= 24) |
| r244614 | r244615 | |
| 222 | 222 | } |
| 223 | 223 | else |
| 224 | 224 | res |= BIT(m_latch, m_idx++); |
| 225 | ||
| 225 | ||
| 226 | 226 | return res; |
| 227 | 227 | } |
| 228 | 228 | |
| r244614 | r244615 | |
| 235 | 235 | int old = m_strobe; |
| 236 | 236 | m_strobe = data & 0x01; |
| 237 | 237 | |
| 238 | if (m_strobe < old) | |
| 238 | if (m_strobe < old) // 1 -> 0 transition | |
| 239 | 239 | port_poll(); |
| 240 | 240 | } |
| 241 |
| r244614 | r244615 | |
|---|---|---|
| 41 | 41 | virtual UINT8 read_pin4(); |
| 42 | 42 | virtual void write_strobe(UINT8 data); |
| 43 | 43 | virtual void port_poll(); |
| 44 | ||
| 44 | ||
| 45 | 45 | private: |
| 46 | 46 | required_ioport m_buttons; |
| 47 | 47 | required_ioport m_xaxis; |
| r244614 | r244615 | |
|---|---|---|
| 121 | 121 | ret |= m_select ? m_port1->read_pin4() : m_port3->read_pin4(); |
| 122 | 122 | else // 1P |
| 123 | 123 | ret |= m_select ? m_port1->read_pin4() : 0; |
| 124 | ||
| 124 | ||
| 125 | 125 | return ret; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | UINT8 snes_multitap_device::read_pin5() |
| 129 | 129 | { |
| 130 | 130 | UINT8 ret = 0; |
| 131 | ||
| 131 | ||
| 132 | 132 | if (m_cfg->read() == 0) // 4P |
| 133 | 133 | ret |= m_select ? m_port2->read_pin4() : m_port4->read_pin4(); |
| 134 | 134 | return ret; |
| r244614 | r244615 | |
|---|---|---|
| 83 | 83 | void snes_pachinko_device::port_poll() |
| 84 | 84 | { |
| 85 | 85 | UINT8 dial = BITSWAP8(m_dial->read() ^ 0xff,7,6,5,4,3,2,1,0); |
| 86 | m_latch = m_button->read() | (dial << 25) | 0xee7000; | |
| 86 | m_latch = m_button->read() | (dial << 25) | 0xee7000; // add ID | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | //------------------------------------------------- |
| r244614 | r244615 | |
| 105 | 105 | { |
| 106 | 106 | int old = m_strobe; |
| 107 | 107 | m_strobe = data & 0x01; |
| 108 | ||
| 109 | if (m_strobe < old) // 1 -> 0 transition | |
| 108 | ||
| 109 | if (m_strobe < old) // 1 -> 0 transition | |
| 110 | 110 | port_poll(); |
| 111 | 111 | } |
| r244614 | r244615 | |
|---|---|---|
| 112 | 112 | // then start elaborating input bits |
| 113 | 113 | // 1. only keep old turbo value |
| 114 | 114 | m_latch &= 0x04; |
| 115 | ||
| 115 | ||
| 116 | 116 | // 2. set onscreen/offscreen |
| 117 | 117 | if (!m_port->m_onscreen_cb.isnull()) |
| 118 | 118 | m_latch |= (m_port->m_onscreen_cb(m_x, m_y) ? 0x00 : 0x40); |
| 119 | ||
| 119 | ||
| 120 | 120 | // 3. pause is a button that is always edge sensitive |
| 121 | 121 | if (BIT(input, 3) && !m_pause_lock) |
| 122 | 122 | { |
| r244614 | r244615 | |
| 134 | 134 | } |
| 135 | 135 | else if (!BIT(input, 2)) |
| 136 | 136 | m_turbo_lock = 0; |
| 137 | ||
| 137 | ||
| 138 | 138 | // 5. cursor is a button that is always level sensitive |
| 139 | 139 | m_latch |= BIT(input, 1); |
| 140 | ||
| 141 | // 6. fire is a button with two behaviors: if turbo is active, trigger is level sensitive; | |
| 140 | ||
| 141 | // 6. fire is a button with two behaviors: if turbo is active, trigger is level sensitive; | |
| 142 | 142 | // otherwise it is edge sensitive |
| 143 | 143 | if (BIT(input, 0) && (BIT(m_latch, 2) || !m_fire_lock)) |
| 144 | 144 | { |
| r244614 | r244615 | |
| 147 | 147 | } |
| 148 | 148 | else if (!BIT(input, 0)) |
| 149 | 149 | m_fire_lock = 0; |
| 150 | ||
| 150 | ||
| 151 | 151 | // If we have pressed fire or cursor and we are on-screen and SuperScope is in Port2, then latch video signal. |
| 152 | 152 | // Notice that this only works in Port2 because its IOBit pin is connected to bit7 of the IO Port, while Port1 |
| 153 | 153 | // has IOBit pin connected to bit6 of the IO Port, and the latter is not detected by the H/V Counters. In other |
| r244614 | r244615 | |
| 163 | 163 | UINT8 snes_sscope_device::read_pin4() |
| 164 | 164 | { |
| 165 | 165 | UINT8 res = 0; |
| 166 | ||
| 167 | if (m_idx >= 8) // bits 8-15 = ID = all 1s; bits >= 16 all 1s | |
| 166 | ||
| 167 | if (m_idx >= 8) // bits 8-15 = ID = all 1s; bits >= 16 all 1s | |
| 168 | 168 | res |= 0x01; |
| 169 | 169 | else |
| 170 | 170 | res |= BIT(m_latch, m_idx++); |
| 171 | ||
| 171 | ||
| 172 | 172 | return res; |
| 173 | 173 | } |
| 174 | 174 | |
| r244614 | r244615 | |
| 181 | 181 | int old = m_strobe; |
| 182 | 182 | m_strobe = data & 0x01; |
| 183 | 183 | |
| 184 | if (m_strobe < old) | |
| 184 | if (m_strobe < old) // 1 -> 0 transition | |
| 185 | 185 | port_poll(); |
| 186 | 186 | } |
| 187 |
| r244614 | r244615 | |
|---|---|---|
| 41 | 41 | virtual UINT8 read_pin4(); |
| 42 | 42 | virtual void write_strobe(UINT8 data); |
| 43 | 43 | virtual void port_poll(); |
| 44 | ||
| 44 | ||
| 45 | 45 | private: |
| 46 | 46 | required_ioport m_buttons; |
| 47 | 47 | required_ioport m_xaxis; |
| r244614 | r244615 | |
|---|---|---|
| 3 | 3 | Nintendo Super Famicom - Yonezawa / PartyRoom 21 Twin Tap Controller |
| 4 | 4 | |
| 5 | 5 | This controller consists of two 1-button small units attached to a |
| 6 | single 7pin connector. You plug the connector to Port2 and two | |
| 6 | single 7pin connector. You plug the connector to Port2 and two | |
| 7 | 7 | players can compete on the quiz game (Port1 should have a joypad |
| 8 | 8 | plugged in, to start the game and browse the menus). By plugging |
| 9 | 9 | a multitap adapter to Port2, up to 4 Twin Tap controllers can be |
| 10 | 10 | attached at the same time, allowing for 8 players quiz sessions. |
| 11 | ||
| 11 | ||
| 12 | 12 | Copyright MESS Team. |
| 13 | 13 | Visit http://mamedev.org for licensing and usage restrictions. |
| 14 | 14 | |
| r244614 | r244615 | |
| 28 | 28 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Button 2") |
| 29 | 29 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Button 1") |
| 30 | 30 | PORT_BIT( 0x8ffc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 31 | PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 31 | PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED ) // controller ID unknown | |
| 32 | 32 | INPUT_PORTS_END |
| 33 | 33 | |
| 34 | 34 | |
| r244614 | r244615 | |
| 108 | 108 | { |
| 109 | 109 | int old = m_strobe; |
| 110 | 110 | m_strobe = data & 0x01; |
| 111 | ||
| 112 | if (m_strobe < old) // 1 -> 0 transition | |
| 111 | ||
| 112 | if (m_strobe < old) // 1 -> 0 transition | |
| 113 | 113 | port_poll(); |
| 114 | 114 | } |
| r244614 | r244615 | |
|---|---|---|
| 184 | 184 | amis2000_base_device::device_start(); |
| 185 | 185 | |
| 186 | 186 | m_d2f_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(amis2152_cpu_device::d2f_timer_cb), this)); |
| 187 | ||
| 187 | ||
| 188 | 188 | // zerofill |
| 189 | 189 | m_d2f_latch = 0; |
| 190 | 190 | m_fout_state = 0; |
| r244614 | r244615 | |
| 205 | 205 | m_pc = 0; |
| 206 | 206 | m_op = 0; |
| 207 | 207 | m_skip = false; |
| 208 | ||
| 208 | ||
| 209 | 209 | // clear i/o |
| 210 | 210 | m_a = 0x1fff; |
| 211 | 211 | m_write_a(0, m_a, 0xffff); |
| r244614 | r244615 | |
| 235 | 235 | while (m_icount > 0) |
| 236 | 236 | { |
| 237 | 237 | m_icount--; |
| 238 | ||
| 238 | ||
| 239 | 239 | // remember previous opcode |
| 240 | 240 | m_prev_op = m_op; |
| 241 | 241 | |
| 242 | 242 | debugger_instruction_hook(this, m_pc); |
| 243 | 243 | m_op = m_program->read_byte(m_pc); |
| 244 | 244 | m_pc = (m_pc + 1) & 0x1fff; |
| 245 | ||
| 245 | ||
| 246 | 246 | if (m_skip) |
| 247 | 247 | { |
| 248 | 248 | // always skip over PP prefix |
| r244614 | r244615 | |
| 299 | 299 | case 0x2d: op_sf2(); break; |
| 300 | 300 | case 0x2e: op_tf1(); break; |
| 301 | 301 | case 0x2f: op_tf2(); break; |
| 302 | ||
| 302 | ||
| 303 | 303 | default: |
| 304 | 304 | switch (m_op & 0xfc) |
| 305 | 305 | { |
| r244614 | r244615 | |
|---|---|---|
| 95 | 95 | address_space_config m_data_config; |
| 96 | 96 | address_space *m_program; |
| 97 | 97 | address_space *m_data; |
| 98 | ||
| 98 | ||
| 99 | 99 | UINT8 m_bu_bits; |
| 100 | 100 | UINT16 m_bu_mask; |
| 101 | 101 | UINT8 m_callstack_bits; // number of program counter bits held in callstack |
| r244614 | r244615 | |
| 129 | 129 | devcb_write8 m_write_d; |
| 130 | 130 | devcb_write16 m_write_a; |
| 131 | 131 | devcb_write_line m_write_f; |
| 132 | ||
| 132 | ||
| 133 | 133 | // misc internal helpers |
| 134 | 134 | UINT8 ram_r(); |
| 135 | 135 | void ram_w(UINT8 data); |
| 136 | 136 | void pop_callstack(); |
| 137 | 137 | void push_callstack(); |
| 138 | 138 | void d_latch_out(bool active); |
| 139 | ||
| 139 | ||
| 140 | 140 | // opcode handlers |
| 141 | 141 | virtual void op_lai(); |
| 142 | 142 | virtual void op_lab(); |
| r244614 | r244615 | |
| 221 | 221 | // device-level overrides |
| 222 | 222 | virtual void device_start(); |
| 223 | 223 | virtual void device_reset(); |
| 224 | ||
| 224 | ||
| 225 | 225 | // digital-to-frequency converter |
| 226 | 226 | UINT8 m_d2f_latch; |
| 227 | 227 | emu_timer *m_d2f_timer; |
| r244614 | r244615 | |
| 229 | 229 | |
| 230 | 230 | void d2f_timer_clock(); |
| 231 | 231 | TIMER_CALLBACK_MEMBER(d2f_timer_cb); |
| 232 | ||
| 232 | ||
| 233 | 233 | // opcode handlers |
| 234 | 234 | virtual void op_szk(); |
| 235 | 235 | }; |
| r244614 | r244615 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | char *dst = buffer; |
| 110 | 110 | dst += sprintf(dst, "%-5s ", s_mnemonics[instr]); |
| 111 | ||
| 111 | ||
| 112 | 112 | // opcode parameter |
| 113 | 113 | int mask = s_bits[instr]; |
| 114 | 114 | bool complement = (mask < 0); |
| 115 | 115 | if (mask < 0) |
| 116 | 116 | mask = -mask; |
| 117 | 117 | mask = (1 << mask) - 1; |
| 118 | ||
| 118 | ||
| 119 | 119 | if (mask != 0) |
| 120 | 120 | { |
| 121 | 121 | UINT8 param = op; |
| 122 | 122 | if (complement) |
| 123 | 123 | param = ~param; |
| 124 | 124 | param &= mask; |
| 125 | ||
| 125 | ||
| 126 | 126 | if (mask < 0x10) |
| 127 | 127 | dst += sprintf(dst, "%d", param); |
| 128 | 128 | else |
| r244614 | r244615 | |
|---|---|---|
| 307 | 307 | // JMP X: jump to X(+PP) |
| 308 | 308 | UINT16 mask = 0x3f; |
| 309 | 309 | UINT16 param = m_op & mask; |
| 310 | ||
| 310 | ||
| 311 | 311 | // if previous opcode was PP, change PC high bits too |
| 312 | 312 | if ((m_prev_op & 0xf0) == 0x60) |
| 313 | 313 | { |
| r244614 | r244615 | |
| 507 | 507 | { |
| 508 | 508 | m_write_f(m_fout_state); |
| 509 | 509 | m_fout_state ^= 1; |
| 510 | ||
| 510 | ||
| 511 | 511 | d2f_timer_clock(); |
| 512 | 512 | } |
| 513 | 513 |
| r244614 | r244615 | |
|---|---|---|
| 329 | 329 | { 0x32, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_rdmsr, &i386_device::pentium_rdmsr, false}, |
| 330 | 330 | { 0x38, OP_2BYTE|OP_PENTIUM, &i386_device::i386_decode_three_byte38, &i386_device::i386_decode_three_byte38,false}, |
| 331 | 331 | { 0x3A, OP_2BYTE|OP_PENTIUM, &i386_device::i386_decode_three_byte3a, &i386_device::i386_decode_three_byte3a,false}, |
| 332 | { 0x40, | |
| 332 | { 0x40, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovo_r16_rm16, &i386_device::pentium_cmovo_r32_rm32, false}, | |
| 333 | 333 | { 0x41, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovno_r16_rm16, &i386_device::pentium_cmovno_r32_rm32, false}, |
| 334 | 334 | { 0x42, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovb_r16_rm16, &i386_device::pentium_cmovb_r32_rm32, false}, |
| 335 | 335 | { 0x43, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovae_r16_rm16, &i386_device::pentium_cmovae_r32_rm32, false}, |
| r244614 | r244615 | |
|---|---|---|
| 86 | 86 | { |
| 87 | 87 | address = map(address); |
| 88 | 88 | } |
| 89 | ||
| 89 | ||
| 90 | 90 | return true; |
| 91 | 91 | } |
| 92 | 92 |
| r244614 | r244615 | |
|---|---|---|
| 357 | 357 | |
| 358 | 358 | UINT32 ic_address[M68K_IC_SIZE]; /* instruction cache address data */ |
| 359 | 359 | UINT32 ic_data[M68K_IC_SIZE]; /* instruction cache content data */ |
| 360 | bool ic_valid[M68K_IC_SIZE]; | |
| 360 | bool ic_valid[M68K_IC_SIZE]; /* instruction cache valid flags */ | |
| 361 | 361 | |
| 362 | 362 | |
| 363 | 363 |
| r244614 | r244615 | |
|---|---|---|
| 689 | 689 | if (m68k->cpu_type & (CPU_TYPE_EC020 | CPU_TYPE_020)) |
| 690 | 690 | { |
| 691 | 691 | UINT32 tag = (address >> 8) | (m68k->s_flag ? 0x1000000 : 0); |
| 692 | int idx = (address >> 2) & 0x3f; | |
| 692 | int idx = (address >> 2) & 0x3f; // 1-of-64 select | |
| 693 | 693 | |
| 694 | 694 | // do a cache fill if the line is invalid or the tags don't match |
| 695 | 695 | if ((!m68k->ic_valid[idx]) || (m68k->ic_address[idx] != tag)) |
| 696 | 696 | { |
| 697 | 697 | m68k->ic_data[idx] = m68k->read32(address & ~3); |
| 698 | 698 | |
| 699 | // | |
| 699 | // printf("m68k: doing cache fill at %08x (tag %08x idx %d)\n", address, tag, idx); | |
| 700 | 700 | |
| 701 | 701 | // if no buserror occured, validate the tag |
| 702 | 702 | if (!m68k->mmu_tmp_buserror_occurred) |
| r244614 | r244615 | |
|---|---|---|
| 3 | 3 | /* |
| 4 | 4 | |
| 5 | 5 | NEC uCOM-4 MCU family cores |
| 6 | ||
| 6 | ||
| 7 | 7 | References: |
| 8 | 8 | - 1981 NEC Microcomputers Catalog (later editions may have errors!) |
| 9 | 9 | - Supplement to uCOM-43 Single Chip Microcomputer Users' Manual |
| r244614 | r244615 | |
| 20 | 20 | NEC_UCOM43 = 0, |
| 21 | 21 | NEC_UCOM44, |
| 22 | 22 | NEC_UCOM45 |
| 23 | }; | |
| 23 | }; | |
| 24 | 24 | |
| 25 | 25 | #include "ucom4.h" |
| 26 | 26 | #include "debugger.h" |
| r244614 | r244615 | |
| 115 | 115 | void ucom4_cpu_device::device_start() |
| 116 | 116 | { |
| 117 | 117 | assert(NEC_UCOM4_PORTA == 0); |
| 118 | ||
| 118 | ||
| 119 | 119 | m_program = &space(AS_PROGRAM); |
| 120 | 120 | m_data = &space(AS_DATA); |
| 121 | 121 | m_prgmask = (1 << m_prgwidth) - 1; |
| r244614 | r244615 | |
| 195 | 195 | m_skip = false; |
| 196 | 196 | |
| 197 | 197 | m_timer->adjust(attotime::never); |
| 198 | ||
| 198 | ||
| 199 | 199 | // clear interrupt |
| 200 | 200 | m_int_line = CLEAR_LINE; |
| 201 | 201 | m_int_f = 0; |
| 202 | 202 | m_inte_f = (m_family == NEC_UCOM43) ? 0 : 1; |
| 203 | ||
| 203 | ||
| 204 | 204 | // clear i/o |
| 205 | 205 | for (int i = NEC_UCOM4_PORTC; i <= NEC_UCOM4_PORTI; i++) |
| 206 | 206 | output_w(i, 0xf); |
| r244614 | r244615 | |
| 221 | 221 | if (m_int_line == CLEAR_LINE && state) |
| 222 | 222 | m_int_f = 1; |
| 223 | 223 | m_int_line = state; |
| 224 | ||
| 224 | ||
| 225 | 225 | break; |
| 226 | ||
| 226 | ||
| 227 | 227 | default: |
| 228 | 228 | break; |
| 229 | 229 | } |
| r244614 | r244615 | |
| 273 | 273 | m_bitmask = 1 << (m_op & 0x03); |
| 274 | 274 | increment_pc(); |
| 275 | 275 | fetch_arg(); |
| 276 | ||
| 276 | ||
| 277 | 277 | if (m_skip) |
| 278 | 278 | { |
| 279 | 279 | m_skip = false; |
| 280 | 280 | m_op = 0; // nop |
| 281 | 281 | } |
| 282 | ||
| 282 | ||
| 283 | 283 | // handle opcode |
| 284 | 284 | switch (m_op & 0xf0) |
| 285 | 285 | { |
| r244614 | r244615 | |
| 287 | 287 | case 0x90: op_li(); break; |
| 288 | 288 | case 0xa0: op_jmpcal(); break; |
| 289 | 289 | case 0xb0: op_czp(); break; |
| 290 | ||
| 290 | ||
| 291 | 291 | case 0xc0: case 0xd0: case 0xe0: case 0xf0: op_jcp(); break; |
| 292 | ||
| 292 | ||
| 293 | 293 | default: |
| 294 | 294 | switch (m_op) |
| 295 | 295 | { |
| r244614 | r244615 | |
| 374 | 374 | case 0x7c: op_sfb(); break; |
| 375 | 375 | } |
| 376 | 376 | break; // 0xfc |
| 377 | ||
| 377 | ||
| 378 | 378 | } |
| 379 | 379 | break; // 0xff |
| 380 | 380 |
| r244614 | r244615 | |
|---|---|---|
| 143 | 143 | bool m_skip; // skip next opcode |
| 144 | 144 | int m_icount; |
| 145 | 145 | emu_timer *m_timer; |
| 146 | ||
| 146 | ||
| 147 | 147 | UINT16 m_pc; // program counter |
| 148 | 148 | UINT8 m_acc; // 4-bit accumulator |
| 149 | 149 | UINT8 m_dpl; // 4-bit data pointer low (RAM x) |
| r244614 | r244615 | |
| 169 | 169 | devcb_write8 m_write_g; |
| 170 | 170 | devcb_write8 m_write_h; |
| 171 | 171 | devcb_write8 m_write_i; |
| 172 | ||
| 172 | ||
| 173 | 173 | // misc internal helpers |
| 174 | 174 | void increment_pc(); |
| 175 | 175 | void fetch_arg(); |
| r244614 | r244615 | |
|---|---|---|
| 121 | 121 | |
| 122 | 122 | char *dst = buffer; |
| 123 | 123 | dst += sprintf(dst, "%-4s ", s_mnemonics[instr]); |
| 124 | ||
| 124 | ||
| 125 | 125 | // opcode parameter |
| 126 | 126 | int bits = s_bits[instr]; |
| 127 | 127 | if (bits) |
| r244614 | r244615 | |
| 133 | 133 | param = (param << (bits / 10)) | (op2 & ((1 << (bits / 10)) - 1)); |
| 134 | 134 | bits = (bits % 10) + (bits / 10); |
| 135 | 135 | } |
| 136 | ||
| 136 | ||
| 137 | 137 | // special case for CZP |
| 138 | 138 | if (instr == mCZP) |
| 139 | 139 | { |
| r244614 | r244615 | |
|---|---|---|
| 32 | 32 | { |
| 33 | 33 | index &= 0xf; |
| 34 | 34 | UINT8 inp = 0xf; |
| 35 | ||
| 35 | ||
| 36 | 36 | switch (index) |
| 37 | 37 | { |
| 38 | 38 | case NEC_UCOM4_PORTA: inp = m_read_a(index, 0xff); break; |
| r244614 | r244615 | |
| 62 | 62 | case NEC_UCOM4_PORTG: m_write_g(index, data, 0xff); break; |
| 63 | 63 | case NEC_UCOM4_PORTH: m_write_h(index, data, 0xff); break; |
| 64 | 64 | case NEC_UCOM4_PORTI: m_write_i(index, data & 7, 0xff); break; |
| 65 | ||
| 65 | ||
| 66 | 66 | default: |
| 67 | 67 | logerror("%s write to unknown port %c = $%X at $%03X\n", tag(), 'A' + index, data & 0xf, m_pc); |
| 68 | 68 | break; |
| r244614 | r244615 | |
| 370 | 370 | { |
| 371 | 371 | // CI X: skip next on ACC equals X |
| 372 | 372 | m_skip = (m_acc == (m_arg & 0x0f)); |
| 373 | ||
| 373 | ||
| 374 | 374 | if ((m_arg & 0xf0) != 0xc0) |
| 375 | 375 | logerror("%s CI opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xf0, m_pc); |
| 376 | 376 | } |
| r244614 | r244615 | |
| 397 | 397 | { |
| 398 | 398 | // CLI X: skip next on DPl equals X |
| 399 | 399 | m_skip = (m_dpl == (m_arg & 0x0f)); |
| 400 | ||
| 400 | ||
| 401 | 401 | if ((m_arg & 0xf0) != 0xe0) |
| 402 | 402 | logerror("%s CLI opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xf0, m_pc); |
| 403 | 403 | } |
| r244614 | r244615 | |
| 530 | 530 | void ucom4_cpu_device::op_taz() |
| 531 | 531 | { |
| 532 | 532 | if (!check_op_43()) return; |
| 533 | ||
| 533 | ||
| 534 | 534 | // TAZ: Transfer ACC to Z |
| 535 | 535 | m_icount--; |
| 536 | 536 | ucom43_reg_w(UCOM43_Z, m_acc); |
| r244614 | r244615 | |
| 539 | 539 | void ucom4_cpu_device::op_thx() |
| 540 | 540 | { |
| 541 | 541 | if (!check_op_43()) return; |
| 542 | ||
| 542 | ||
| 543 | 543 | // THX: Transfer DPh to X |
| 544 | 544 | m_icount--; |
| 545 | 545 | ucom43_reg_w(UCOM43_X, m_dph); |
| r244614 | r244615 | |
| 548 | 548 | void ucom4_cpu_device::op_tly() |
| 549 | 549 | { |
| 550 | 550 | if (!check_op_43()) return; |
| 551 | ||
| 551 | ||
| 552 | 552 | // TLY: Transfer DPl to Y |
| 553 | 553 | m_icount--; |
| 554 | 554 | ucom43_reg_w(UCOM43_Y, m_dpl); |
| r244614 | r244615 | |
| 560 | 560 | void ucom4_cpu_device::op_xaw() |
| 561 | 561 | { |
| 562 | 562 | if (!check_op_43()) return; |
| 563 | ||
| 563 | ||
| 564 | 564 | // XAW: Exchange ACC with W |
| 565 | 565 | m_icount--; |
| 566 | 566 | UINT8 old_acc = m_acc; |
| r244614 | r244615 | |
| 571 | 571 | void ucom4_cpu_device::op_xaz() |
| 572 | 572 | { |
| 573 | 573 | if (!check_op_43()) return; |
| 574 | ||
| 574 | ||
| 575 | 575 | // XAZ: Exchange ACC with Z |
| 576 | 576 | m_icount--; |
| 577 | 577 | UINT8 old_acc = m_acc; |
| r244614 | r244615 | |
| 582 | 582 | void ucom4_cpu_device::op_xhr() |
| 583 | 583 | { |
| 584 | 584 | if (!check_op_43()) return; |
| 585 | ||
| 585 | ||
| 586 | 586 | // XHR: Exchange DPh with R |
| 587 | 587 | m_icount--; |
| 588 | 588 | UINT8 old_dph = m_dph; |
| r244614 | r244615 | |
| 593 | 593 | void ucom4_cpu_device::op_xhx() |
| 594 | 594 | { |
| 595 | 595 | if (!check_op_43()) return; |
| 596 | ||
| 596 | ||
| 597 | 597 | // XHX: Exchange DPh with X |
| 598 | 598 | m_icount--; |
| 599 | 599 | UINT8 old_dph = m_dph; |
| r244614 | r244615 | |
| 604 | 604 | void ucom4_cpu_device::op_xls() |
| 605 | 605 | { |
| 606 | 606 | if (!check_op_43()) return; |
| 607 | ||
| 607 | ||
| 608 | 608 | // XLS: Exchange DPl with S |
| 609 | 609 | m_icount--; |
| 610 | 610 | UINT8 old_dpl = m_dpl; |
| r244614 | r244615 | |
| 615 | 615 | void ucom4_cpu_device::op_xly() |
| 616 | 616 | { |
| 617 | 617 | if (!check_op_43()) return; |
| 618 | ||
| 618 | ||
| 619 | 619 | // XLY: Exchange DPl with Y |
| 620 | 620 | m_icount--; |
| 621 | 621 | UINT8 old_dpl = m_dpl; |
| r244614 | r244615 | |
| 626 | 626 | void ucom4_cpu_device::op_xc() |
| 627 | 627 | { |
| 628 | 628 | if (!check_op_43()) return; |
| 629 | ||
| 629 | ||
| 630 | 630 | // XC: Exchange Carry F/F with Carry Save F/F |
| 631 | 631 | UINT8 c = m_carry_f; |
| 632 | 632 | m_carry_f = m_carry_s_f; |
| r244614 | r244615 | |
| 639 | 639 | void ucom4_cpu_device::op_sfb() |
| 640 | 640 | { |
| 641 | 641 | if (!check_op_43()) return; |
| 642 | ||
| 642 | ||
| 643 | 643 | // SFB B: Set a single bit of FLAG |
| 644 | 644 | m_icount--; |
| 645 | 645 | ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) | m_bitmask); |
| r244614 | r244615 | |
| 648 | 648 | void ucom4_cpu_device::op_rfb() |
| 649 | 649 | { |
| 650 | 650 | if (!check_op_43()) return; |
| 651 | ||
| 651 | ||
| 652 | 652 | // RFB B: Reset a single bit of FLAG |
| 653 | 653 | m_icount--; |
| 654 | 654 | ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) & ~m_bitmask); |
| r244614 | r244615 | |
| 657 | 657 | void ucom4_cpu_device::op_fbt() |
| 658 | 658 | { |
| 659 | 659 | if (!check_op_43()) return; |
| 660 | ||
| 660 | ||
| 661 | 661 | // FBT B: skip next on bit(FLAG) |
| 662 | 662 | m_icount--; |
| 663 | 663 | m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) != 0); |
| r244614 | r244615 | |
| 666 | 666 | void ucom4_cpu_device::op_fbf() |
| 667 | 667 | { |
| 668 | 668 | if (!check_op_43()) return; |
| 669 | ||
| 669 | ||
| 670 | 670 | // FBF B: skip next on not bit(FLAG) |
| 671 | 671 | m_icount--; |
| 672 | 672 | m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) == 0); |
| r244614 | r244615 | |
| 678 | 678 | void ucom4_cpu_device::op_rar() |
| 679 | 679 | { |
| 680 | 680 | if (!check_op_43()) return; |
| 681 | ||
| 681 | ||
| 682 | 682 | // RAR: Rotate ACC Right through Carry F/F |
| 683 | 683 | UINT8 c = m_acc & 1; |
| 684 | 684 | m_acc = m_acc >> 1 | m_carry_f << 3; |
| r244614 | r244615 | |
| 691 | 691 | void ucom4_cpu_device::op_inm() |
| 692 | 692 | { |
| 693 | 693 | if (!check_op_43()) return; |
| 694 | ||
| 694 | ||
| 695 | 695 | // INM: Increment RAM, skip next on carry |
| 696 | 696 | UINT8 val = (ram_r() + 1) & 0xf; |
| 697 | 697 | ram_w(val); |
| r244614 | r244615 | |
| 701 | 701 | void ucom4_cpu_device::op_dem() |
| 702 | 702 | { |
| 703 | 703 | if (!check_op_43()) return; |
| 704 | ||
| 704 | ||
| 705 | 705 | // DEM: Decrement RAM, skip next on carry |
| 706 | 706 | UINT8 val = (ram_r() - 1) & 0xf; |
| 707 | 707 | ram_w(val); |
| r244614 | r244615 | |
| 714 | 714 | void ucom4_cpu_device::op_stm() |
| 715 | 715 | { |
| 716 | 716 | if (!check_op_43()) return; |
| 717 | ||
| 717 | ||
| 718 | 718 | // STM X: Reset Timer F/F, Start Timer with X |
| 719 | 719 | m_timer_f = 0; |
| 720 | 720 | |
| r244614 | r244615 | |
| 730 | 730 | void ucom4_cpu_device::op_ttm() |
| 731 | 731 | { |
| 732 | 732 | if (!check_op_43()) return; |
| 733 | ||
| 733 | ||
| 734 | 734 | // TTM: skip next on Timer F/F |
| 735 | 735 | m_skip = (m_timer_f != 0); |
| 736 | 736 | } |
| r244614 | r244615 | |
| 741 | 741 | void ucom4_cpu_device::op_ei() |
| 742 | 742 | { |
| 743 | 743 | if (!check_op_43()) return; |
| 744 | ||
| 744 | ||
| 745 | 745 | // EI: Set Interrupt Enable F/F |
| 746 | 746 | m_inte_f = 1; |
| 747 | 747 | } |
| r244614 | r244615 | |
| 749 | 749 | void ucom4_cpu_device::op_di() |
| 750 | 750 | { |
| 751 | 751 | if (!check_op_43()) return; |
| 752 | ||
| 752 | ||
| 753 | 753 | // DI: Reset Interrupt Enable F/F |
| 754 | 754 | m_inte_f = 0; |
| 755 | 755 | } |
| r244614 | r244615 | |
|---|---|---|
| 234 | 234 | m_total.y = 10; |
| 235 | 235 | |
| 236 | 236 | // Draw |
| 237 | debug_view_char *dest = m_viewdata; | |
| 238 | astring linebuf; | |
| 237 | debug_view_char *dest = m_viewdata; | |
| 238 | astring linebuf; | |
| 239 | 239 | |
| 240 | 240 | // Header |
| 241 | 241 | if (m_visible.y > 0) |
| r244614 | r244615 | |
|---|---|---|
| 261 | 261 | m_total.y = 10; |
| 262 | 262 | |
| 263 | 263 | // Draw |
| 264 | debug_view_char *dest = m_viewdata; | |
| 265 | astring linebuf; | |
| 264 | debug_view_char *dest = m_viewdata; | |
| 265 | astring linebuf; | |
| 266 | 266 | |
| 267 | 267 | // Header |
| 268 | 268 | if (m_visible.y > 0) |
| r244614 | r244615 | |
|---|---|---|
| 57 | 57 | XTAL_2_5MHz = 2500000, /* Janken Man units */ |
| 58 | 58 | XTAL_3MHz = 3000000, /* Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs */ |
| 59 | 59 | XTAL_3_12MHz = 3120000, /* SP0250 clock on Gottlieb games */ |
| 60 | XTAL_3_5MHz | |
| 60 | XTAL_3_5MHz = 3500000, /* Reported by Commodore 65 document, true xtal unchecked on PCB */ | |
| 61 | 61 | XTAL_3_52128MHz = 3521280, /* RCA COSMAC VIP */ |
| 62 | 62 | XTAL_3_579545MHz = 3579545, /* NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) */ |
| 63 | 63 | XTAL_3_6864MHz = 3686400, /* CPS3 */ |
| r244614 | r244615 | |
|---|---|---|
| 154 | 154 | astring m_fullpath; // full filename |
| 155 | 155 | core_file * m_file; // core file pointer |
| 156 | 156 | path_iterator m_iterator; // iterator for paths |
| 157 | path_iterator m_mediapaths; | |
| 157 | path_iterator m_mediapaths; // media-path iterator | |
| 158 | 158 | UINT32 m_crc; // file's CRC |
| 159 | 159 | UINT32 m_openflags; // flags we used for the open |
| 160 | 160 | hash_collection m_hashes; // collection of hashes |
| r244614 | r244615 | |
| 168 | 168 | UINT64 m__7zlength; // 7Z file length |
| 169 | 169 | |
| 170 | 170 | bool m_remove_on_close; // flag: remove the file when closing |
| 171 | bool | |
| 171 | bool m_restrict_to_mediapath; // flag: restrict to paths inside the media-path | |
| 172 | 172 | }; |
| 173 | 173 | |
| 174 | 174 |
| r244614 | r244615 | |
|---|---|---|
| 48 | 48 | // - have the message length without the two header bytes but with the checksum byte in the second byte |
| 49 | 49 | // - have at least one command byte |
| 50 | 50 | if(send_size < 3 || send_buffer[0] == 0x00 || send_buffer[1] != send_size-1) { |
| 51 | logerror("JVS checksum error\n"); | |
| 52 | // "This message is crap" doesn't exist so call it checksum error | |
| 53 | recv_buffer[0] = 0x00; | |
| 54 | recv_buffer[1] = 0x02; | |
| 55 | recv_buffer[2] = 0x03; | |
| 56 | recv_size = 3; | |
| 57 | } else { | |
| 51 | logerror("JVS checksum error\n"); | |
| 52 | // "This message is crap" doesn't exist so call it checksum error | |
| 53 | recv_buffer[0] = 0x00; | |
| 54 | recv_buffer[1] = 0x02; | |
| 55 | recv_buffer[2] = 0x03; | |
| 56 | recv_size = 3; | |
| 57 | } else { | |
| 58 | 58 | if(first_device) { |
| 59 | 59 | first_device->message(send_buffer[0], send_buffer+2, send_size-2, recv_buffer+2, recv_size); |
| 60 | 60 | recv_is_encoded = false; |
| r244614 | r244615 | |
|---|---|---|
| 338 | 338 | float width; // width (for line primitives) |
| 339 | 339 | render_texinfo texture; // texture info (for quad primitives) |
| 340 | 340 | render_quad_texuv texcoords; // texture coordinates (for quad primitives) |
| 341 | render_container * | |
| 341 | render_container * container; // the render container we belong to | |
| 342 | 342 | |
| 343 | 343 | private: |
| 344 | 344 | // internal state |
| r244614 | r244615 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | /* for each chip allocate one stream */ |
| 163 | 163 | m_stream = stream_alloc(0, 2, m_sample_rate); |
| 164 | ||
| 164 | ||
| 165 | 165 | save_item(NAME(m_noise_params)); |
| 166 | 166 | save_item(NAME(m_env_enable)); |
| 167 | 167 | save_item(NAME(m_env_reverse_right)); |
| r244614 | r244615 | |
| 172 | 172 | save_item(NAME(m_all_ch_enable)); |
| 173 | 173 | save_item(NAME(m_sync_state)); |
| 174 | 174 | save_item(NAME(m_selected_reg)); |
| 175 | ||
| 175 | ||
| 176 | 176 | for (int i = 0; i < 6; i++) |
| 177 | 177 | { |
| 178 | 178 | save_item(NAME(m_channels[i].frequency), i); |
| r244614 | r244615 | |
| 185 | 185 | save_item(NAME(m_channels[i].freq), i); |
| 186 | 186 | save_item(NAME(m_channels[i].level), i); |
| 187 | 187 | } |
| 188 | ||
| 188 | ||
| 189 | 189 | for (int i = 0; i < 2; i++) |
| 190 | 190 | { |
| 191 | 191 | save_item(NAME(m_noise[i].counter), i); |
| r244614 | r244615 | |
|---|---|---|
| 1048 | 1048 | if (filerr == FILERR_NONE) |
| 1049 | 1049 | save_snapshot(machine().first_screen(), file); |
| 1050 | 1050 | } |
| 1051 | ||
| 1051 | //printf("Scheduled exit at %f\n", emutime.as_double()); | |
| 1052 | 1052 | // schedule our demise |
| 1053 | 1053 | machine().schedule_exit(); |
| 1054 | 1054 | } |
| r244614 | r244615 | |
|---|---|---|
| 699 | 699 | |
| 700 | 700 | if (!m_display_cb.isnull()) |
| 701 | 701 | m_display_cb(m_bitmap, |
| 702 | i * m_hpixels_per_column, | |
| 703 | m_linecounter, | |
| 704 | tilerow, | |
| 705 | space().read_byte(address), | |
| 706 | address, | |
| 707 | (charrow >= m_IR6_cursor_first_scanline) && m_cursor_on, | |
| 708 | dw != 0, | |
| 709 | m_gfx_enabled != 0, | |
| 710 | charrow == m_IR7_cursor_underline_position, | |
| 711 | m_IR7_cursor_blink && (m_screen->frame_number() & (m_IR7_cursor_rate_divisor ? 0x40 : 0x20))); | |
| 702 | i * m_hpixels_per_column, | |
| 703 | m_linecounter, | |
| 704 | tilerow, | |
| 705 | space().read_byte(address), | |
| 706 | address, | |
| 707 | (charrow >= m_IR6_cursor_first_scanline) && m_cursor_on, | |
| 708 | dw != 0, | |
| 709 | m_gfx_enabled != 0, | |
| 710 | charrow == m_IR7_cursor_underline_position, | |
| 711 | m_IR7_cursor_blink && (m_screen->frame_number() & (m_IR7_cursor_rate_divisor ? 0x40 : 0x20))); | |
| 712 | 712 | address = (address + 1) & 0xffff; |
| 713 | 713 | |
| 714 | 714 | if(address > ((m_IR9_display_buffer_last_address << 10) | 0x3ff)) |
| r244614 | r244615 | |
|---|---|---|
| 19 | 19 | #define SCN2674_DRAW_CHARACTER_MEMBER(_name) void _name(bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT16 address, UINT8 cursor, UINT8 dw, UINT8 lg, UINT8 ul, UINT8 blink) |
| 20 | 20 | |
| 21 | 21 | class scn2674_device : public device_t, |
| 22 | public device_video_interface, | |
| 23 | public device_memory_interface | |
| 22 | public device_video_interface, | |
| 23 | public device_memory_interface | |
| 24 | 24 | { |
| 25 | 25 | public: |
| 26 | 26 | scn2674_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| r244614 | r244615 | |
|---|---|---|
| 659 | 659 | else if (!memcmp(pascal2_block1, §or_data[0x100], 4)) |
| 660 | 660 | { |
| 661 | 661 | m_prodos_order = true; |
| 662 | } | |
| 662 | } // check for CP/M disks in ProDOS order | |
| 663 | 663 | else if (!memcmp(cpm22_block1, §or_data[0x100], 8)) |
| 664 | 664 | { |
| 665 | 665 | m_prodos_order = true; |
| r244614 | r244615 | |
|---|---|---|
| 629 | 629 | $(LIBOBJ)/bgfx/common/imgui/imgui.o \ |
| 630 | 630 | $(LIBOBJ)/bgfx/common/nanovg/nanovg.o \ |
| 631 | 631 | $(LIBOBJ)/bgfx/common/nanovg/nanovg_bgfx.o \ |
| 632 | # $(LIBOBJ)/bgfx/common/entry/cmd.o \ | |
| 633 | # $(LIBOBJ)/bgfx/common/entry/dbg.o \ | |
| 634 | # $(LIBOBJ)/bgfx/common/entry/entry.o \ | |
| 635 | # $(LIBOBJ)/bgfx/common/entry/entry_android.o \ | |
| 636 | # $(LIBOBJ)/bgfx/common/entry/entry_asmjs.o \ | |
| 637 | # $(LIBOBJ)/bgfx/common/entry/entry_linux.o \ | |
| 638 | # $(LIBOBJ)/bgfx/common/entry/entry_nacl.o \ | |
| 639 | # $(LIBOBJ)/bgfx/common/entry/entry_qnx.o \ | |
| 640 | # $(LIBOBJ)/bgfx/common/entry/entry_sdl.o \ | |
| 641 | # $(LIBOBJ)/bgfx/common/entry/entry_windows.o \ | |
| 642 | # $(LIBOBJ)/bgfx/common/entry/input.o \ | |
| 632 | # $(LIBOBJ)/bgfx/common/entry/cmd.o \ | |
| 633 | # $(LIBOBJ)/bgfx/common/entry/dbg.o \ | |
| 634 | # $(LIBOBJ)/bgfx/common/entry/entry.o \ | |
| 635 | # $(LIBOBJ)/bgfx/common/entry/entry_android.o \ | |
| 636 | # $(LIBOBJ)/bgfx/common/entry/entry_asmjs.o \ | |
| 637 | # $(LIBOBJ)/bgfx/common/entry/entry_linux.o \ | |
| 638 | # $(LIBOBJ)/bgfx/common/entry/entry_nacl.o \ | |
| 639 | # $(LIBOBJ)/bgfx/common/entry/entry_qnx.o \ | |
| 640 | # $(LIBOBJ)/bgfx/common/entry/entry_sdl.o \ | |
| 641 | # $(LIBOBJ)/bgfx/common/entry/entry_windows.o \ | |
| 642 | # $(LIBOBJ)/bgfx/common/entry/input.o \ | |
| 643 | 643 | |
| 644 | 644 | ifeq ($(TARGETOS),macosx) |
| 645 | 645 | BGFXOBJS += $(LIBOBJ)/bgfx/glcontext_eagl.o |
| r244614 | r244615 | |
|---|---|---|
| 489 | 489 | m_stream = machine().sound().stream_alloc(*this, 0, 1, clock()); |
| 490 | 490 | m_base = machine().root_device().memregion(m_rom_tag)->base(); |
| 491 | 491 | m_adpcm.reset(); |
| 492 | ||
| 492 | ||
| 493 | 493 | save_item(NAME(m_current)); |
| 494 | 494 | save_item(NAME(m_end)); |
| 495 | 495 | save_item(NAME(m_nibble)); |
| r244614 | r244615 | |
|---|---|---|
| 169 | 169 | void t5182_device::device_start() |
| 170 | 170 | { |
| 171 | 171 | m_setirq_cb = timer_alloc(SETIRQ_CB); |
| 172 | ||
| 172 | ||
| 173 | 173 | save_item(NAME(m_irqstate)); |
| 174 | 174 | save_item(NAME(m_semaphore_main)); |
| 175 | 175 | save_item(NAME(m_semaphore_snd)); |
| r244614 | r244615 | |
| 314 | 314 | { |
| 315 | 315 | return INPUT_PORTS_NAME(t5182); |
| 316 | 316 | } |
| 317 | ||
| 318 | 317 | |
| 318 | ||
| 319 | 319 | // 4000-407F RAM shared with main CPU |
| 320 | 320 | // 4000 output queue length |
| 321 | 321 | // 4001-4020 output queue |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | { |
| 23 | 23 | SETIRQ_CB |
| 24 | 24 | }; |
| 25 | ||
| 25 | ||
| 26 | 26 | DECLARE_WRITE8_MEMBER(sound_irq_w ); |
| 27 | 27 | DECLARE_READ8_MEMBER(sharedram_semaphore_snd_r); |
| 28 | 28 | DECLARE_WRITE8_MEMBER(sharedram_semaphore_main_acquire_w); |
| r244614 | r244615 | |
|---|---|---|
| 49 | 49 | 01016E: btst #$7, $60621.l ;check dsw2 ram copy bit 15 (debug feature?) |
| 50 | 50 | 010176: bne $1017e |
| 51 | 51 | 010178: bra $f9f0 ;timer over event occurs |
| 52 | btanb perhaps? Currently patched to work, might also be that DSW2 bit 7 is actually a MCU bit ready flag, so it | |
| 52 | btanb perhaps? Currently patched to work, might also be that DSW2 bit 7 is actually a MCU bit ready flag, so it | |
| 53 | 53 | definitely needs PCB tests. |
| 54 | 54 | |
| 55 | 55 | |
| r244614 | r244615 | |
| 1178 | 1178 | |
| 1179 | 1179 | MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) |
| 1180 | 1180 | MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) |
| 1181 | ||
| 1181 | ||
| 1182 | 1182 | MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0) |
| 1183 | 1183 | |
| 1184 | 1184 | /* video hardware */ |
| r244614 | r244615 | |
| 1277 | 1277 | |
| 1278 | 1278 | MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) |
| 1279 | 1279 | MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) |
| 1280 | ||
| 1280 | ||
| 1281 | 1281 | MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0) |
| 1282 | 1282 | |
| 1283 | 1283 | /* video hardware */ |
| r244614 | r244615 | |
| 1371 | 1371 | |
| 1372 | 1372 | MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) |
| 1373 | 1373 | MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) |
| 1374 | ||
| 1374 | ||
| 1375 | 1375 | MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0) |
| 1376 | 1376 | |
| 1377 | 1377 | /* video hardware */ |
| r244614 | r244615 | |
| 1419 | 1419 | |
| 1420 | 1420 | MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf) |
| 1421 | 1421 | MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf) |
| 1422 | ||
| 1422 | ||
| 1423 | 1423 | MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0) |
| 1424 | 1424 | |
| 1425 | 1425 | /* video hardware */ |
| r244614 | r244615 | |
| 2128 | 2128 | m_maincpu->space(AS_PROGRAM).install_write_handler(0x07c000, 0x07c001, write16_delegate(FUNC(armedf_state::bootleg_io_w),this)); |
| 2129 | 2129 | |
| 2130 | 2130 | m_scroll_type = 2; |
| 2131 | ||
| 2131 | ||
| 2132 | 2132 | save_item(NAME(m_legion_cmd)); |
| 2133 | 2133 | } |
| 2134 | 2134 |
| r244614 | r244615 | |
|---|---|---|
| 707 | 707 | CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r) |
| 708 | 708 | { |
| 709 | 709 | required_ioport_array<4> &keys = (param == 0) ? m_p1_keys : m_p2_keys; |
| 710 | ||
| 710 | ||
| 711 | 711 | switch (m_bnstars1_mahjong_select & 0x2080) |
| 712 | 712 | { |
| 713 | 713 | default: |
| r244614 | r244615 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | There also appears to be a sequel which may be running on the same hardware, but which does not seem to have been released. |
| 8 | 8 | Come On Baby - Ballympic Heroes! (c) 2001 |
| 9 | ||
| 9 | ||
| 10 | 10 | Other games in this series include: |
| 11 | 11 | Come On Baby 2 (c) 2002 |
| 12 | 12 | Come On Baby Jr (c) 2003 (which seems to be otherwise identical to Come On Baby but in a smaller cabinet) |
| r244614 | r244615 | |
| 20 | 20 | BIOS String: 07/03/2000-440BX-ITE8671-2A69KV3IC-00 |
| 21 | 21 | aka. BIOS-I-2M |
| 22 | 22 | Award BIOS |
| 23 | B1120IAG.BIN For Super IO = ITE 8671 | |
| 24 | Clock Gen IC : Winbond-39A | |
| 25 | (Nov/2000 built) | |
| 26 | ||
| 23 | B1120IAG.BIN For Super IO = ITE 8671 | |
| 24 | Clock Gen IC : Winbond-39A | |
| 25 | (Nov/2000 built) | |
| 26 | ||
| 27 | 27 | CPU - Slot 1 Celeron 633MHz (66x9.5) |
| 28 | 28 | Memory - 65536k SDRAM PC100 |
| 29 | 29 | |
| 30 | 30 | Brief motherboard overview (from PC Partner BXAS1-928 motherboard manual) |
| 31 | 31 | -- |
| 32 | ||
| 32 | ||
| 33 | 33 | HARDWARE CONFIGURATION |
| 34 | This motherboard is based on Intel 82440BX chipset. The chipset is a | |
| 35 | highly integrated solution for a cost-effective and compact motherboard. | |
| 36 | The motherboard supports standard DIMM module, PC-100 DIMM module or | |
| 37 | Registered DIMM Module. | |
| 38 | ||
| 34 | This motherboard is based on Intel 82440BX chipset. The chipset is a | |
| 35 | highly integrated solution for a cost-effective and compact motherboard. | |
| 36 | The motherboard supports standard DIMM module, PC-100 DIMM module or | |
| 37 | Registered DIMM Module. | |
| 38 | ||
| 39 | 39 | Features on-board include.... |
| 40 | 40 | super-I/O, Ultra DMA33 (Ultra DMA66 optional for VIA chipset), PCI bus master IDE, AGP Ver 1.0, PCI Ver 2.1 compliance, |
| 41 | 41 | USB, VRM 8.4 compliance, ECC, ATX specification 2.01 compliance, hardware monitoring (optional), On-board PCI Sound |
| 42 | 42 | Sub-system(optional, not populated). Supports PC-100 DIMM Module. |
| 43 | 43 | |
| 44 | 44 | Key Features: |
| 45 | ||
| 45 | ||
| 46 | 46 | Processor |
| 47 | 47 | - Full support for the Intel Pentium II & Intel Pentium III, Intel Celeron and Deschutes processors using Slot 1 connector. |
| 48 | 48 | - Slot 1 connector for Intel Pentium II & Intel Pentium III microprocessors. |
| r244614 | r244615 | |
| 50 | 50 | |
| 51 | 51 | CPU Speed Setting |
| 52 | 52 | - Jumper setting or no jumper is needed to set for various speed of CPU (Factory optional). |
| 53 | ||
| 53 | ||
| 54 | 54 | VRM (Voltage Regulator Modules) on Board |
| 55 | 55 | - Flexible motherboard design with on-board VRM 8.4, easy to upgrade with |
| 56 | 56 | Future Intel Pentium II & Pentium III processors. |
| 57 | ||
| 57 | ||
| 58 | 58 | Cache |
| 59 | 59 | - Pentium II & Pentium III Processor built-in L2 cache. |
| 60 | ||
| 60 | ||
| 61 | 61 | System Memory |
| 62 | 62 | - Up to 384MB (SDRAM) or 768MB (Registered SDRAM) - for 440BX. |
| 63 | 63 | - A total of three 168-pin DIMM sockets for 440BX. |
| 64 | 64 | - Supports SDRAM (only for 66MHz bus speed). |
| 65 | 65 | - Supports PC-100. |
| 66 | ||
| 66 | ||
| 67 | 67 | Memory Organization |
| 68 | 68 | - Supports single-density DIMMs of 1MB, 2MB, 4MB, 8MB and 16MB depth (x64 or 72). |
| 69 | 69 | - Supports double-density DIMMs of 2MB, 4MB, 8MB, 16MB and 32MB depth |
| 70 | 70 | (x64 or 72). |
| 71 | 71 | - Supports error checking correction (ECC) using parity DRAM modules (for 440BX). |
| 72 | 72 | - Banks of different DRAM types depths can be mixed. |
| 73 | ||
| 73 | ||
| 74 | 74 | Expansion Slots |
| 75 | 75 | - Supports SB-LINK Port for Creative Sound PCI Card. |
| 76 | 76 | - 1 AGP slot (ver. 1.0, 1x/2x mode supported). |
| 77 | 77 | - 5 PCI bus master slots (rev. 2.1 compliant, with 1 PCI slot sharing with 1 ISA slot) |
| 78 | 78 | - 2 ISA slots (1 ISA slot sharing with 1 PCI slot). |
| 79 | ||
| 79 | ||
| 80 | 80 | On-Board I/O |
| 81 | 81 | - Two PCI fast IDE ports supporting up to 4 ATA2, Ultra DMA33 IDE HDDs, Ultra DMA66 (optional only for VIA Chipset) |
| 82 | 82 | IDE HDDs, CD-Roms, ZIP devices and LS-120 drives as boot drive. |
| r244614 | r244615 | |
| 91 | 91 | - PS/2 mouse port. |
| 92 | 92 | - Infrared (IrDA) support (via a header). |
| 93 | 93 | - One Line / Speaker out, one Mic in, one Line in and MIDI / Gameport |
| 94 | ||
| 94 | ||
| 95 | 95 | System BIOS |
| 96 | 96 | - 2MB flash BIOS supporting PnP, APM, ATAPI, ACPI and DMI; |
| 97 | 97 | - Jumper selection for 5V or 12V flash memory voltage. |
| 98 | 98 | - Auto detects and supports LBA hard disks with formatted capacities over |
| 99 | 99 | 8.4GB. |
| 100 | 100 | - Easily upgradable by end-user. |
| 101 | ||
| 101 | ||
| 102 | 102 | Plug-and-Play |
| 103 | 103 | - Supports Plug-and-Play Specification 1.1. |
| 104 | 104 | - Plug-and-play for DOS, Windows 3.X, Windows 95 as well as Windows 98. |
| 105 | 105 | - Fully steerable PCI interrupts. |
| 106 | ||
| 106 | ||
| 107 | 107 | Power Management |
| 108 | 108 | - Supports SMM, APM and ACPI. |
| 109 | 109 | - Break switch for instant suspend/resume on system operation. |
| r244614 | r244615 | |
| 111 | 111 | - Supports WAKE-ON-LAN (WOL). |
| 112 | 112 | - Supports Wake on Ring for External Modem. |
| 113 | 113 | - Supports ATX specification 2.01. |
| 114 | ||
| 114 | ||
| 115 | 115 | Creative PCI Sound (optional, not populated) |
| 116 | 116 | - Full DOS game support (DDMA, PC/PCI, CLS). |
| 117 | 117 | - PCI 2.1 Bus Master, hardware sound acceleration. |
| r244614 | r244615 | |
| 119 | 119 | - Full Duplex, 3D Enhancement, Software wavetable. |
| 120 | 120 | - PNP and APM 1.2 support. |
| 121 | 121 | - Win95/98, NT drivers ready. |
| 122 | ||
| 122 | ||
| 123 | 123 | Keyboard Password Turn ON |
| 124 | 124 | - Special feature for system security. |
| 125 | ||
| 125 | ||
| 126 | 126 | System monitoring (optional) |
| 127 | 127 | - Hardware monitoring circuitry is supported, provides voltages, temperature, fan speeds etc. monitoring. |
| 128 | ||
| 128 | ||
| 129 | 129 | -- |
| 130 | 130 | |
| 131 | 131 | The donor PC looks like a standard Windows 98 setup. |
| r244614 | r244615 | |
| 140 | 140 | It uses DirectSound and the Microsoft MCI interfaces and 3dfx Glide for video. |
| 141 | 141 | The PC that the game was dumped from has Sound Blaster and Ensoniq drivers, |
| 142 | 142 | but it works fine with some other sound configurations. |
| 143 | The sound chip on the motherboard is not populated. There is a cheap Korean | |
| 144 | sound card "CS-6500P Made In Korea OJU CTN CO LTD." plugged into one of the | |
| 143 | The sound chip on the motherboard is not populated. There is a cheap Korean | |
| 144 | sound card "CS-6500P Made In Korea OJU CTN CO LTD." plugged into one of the | |
| 145 | 145 | slots containing a CRYSTAL CS4281-CM chip. |
| 146 | 146 | The donor PC has a "3dfxvoodoo3" driver installation directory, but it works |
| 147 | 147 | fine with a Voodoo4 4500. |
| r244614 | r244615 | |
|---|---|---|
| 889 | 889 | |
| 890 | 890 | ROM_REGION( 0x8000, "system", 0 ) |
| 891 | 891 | ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) ) |
| 892 | ||
| 892 | ||
| 893 | 893 | DISK_REGION( "audiocd" ) |
| 894 | ||
| 894 | DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP ) | |
| 895 | 895 | |
| 896 | 896 | DISK_REGION( "laserdisc" ) |
| 897 | ||
| 897 | DISK_IMAGE_READONLY( "cops", 0, NO_DUMP ) | |
| 898 | 898 | ROM_END |
| 899 | 899 | |
| 900 | 900 | ROM_START( copsuk ) |
| r244614 | r244615 | |
| 905 | 905 | ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) ) |
| 906 | 906 | |
| 907 | 907 | DISK_REGION( "audiocd" ) |
| 908 | ||
| 908 | DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP ) | |
| 909 | 909 | |
| 910 | 910 | DISK_REGION( "laserdisc" ) |
| 911 | ||
| 911 | DISK_IMAGE_READONLY( "cops", 0, NO_DUMP ) | |
| 912 | 912 | ROM_END |
| 913 | 913 | |
| 914 | 914 | ROM_START( revlatns ) |
| r244614 | r244615 | |
| 919 | 919 | ROM_LOAD( "revelations_sys.bin", 0x0000, 0x8000, CRC(43e5e3ec) SHA1(fa44b102b5aa7ad2421c575abdc67f1c29f23bc1) ) |
| 920 | 920 | |
| 921 | 921 | DISK_REGION( "laserdisc" ) |
| 922 | ||
| 922 | DISK_IMAGE_READONLY( "revlatns", 0, NO_DUMP ) | |
| 923 | 923 | ROM_END |
| 924 | 924 | |
| 925 | 925 |
| r244614 | r244615 | |
|---|---|---|
| 494 | 494 | 2 RCA cables from A-board CN L/R go in at the top. The audio goes through |
| 495 | 495 | Mitsumi MM1326 series "Q Expander" ICs responsible for creating the 3D stereo |
| 496 | 496 | effect. The 4-pin connector at the bottom goes to the cabinet speakers. |
| 497 | ||
| 497 | ||
| 498 | 498 | IC1 - don't know yet which chip is which |
| 499 | 499 | IC2 - " |
| 500 | 500 | IC3 - " |
| r244614 | r244615 | |
|---|---|---|
| 97 | 97 | required_device<cpu_device> m_audiocpu; |
| 98 | 98 | required_device<gfxdecode_device> m_gfxdecode; |
| 99 | 99 | required_device<palette_device> m_palette; |
| 100 | ||
| 100 | ||
| 101 | 101 | required_shared_ptr<UINT8> m_vram; |
| 102 | 102 | required_shared_ptr<UINT8> m_cram; |
| 103 | 103 | required_shared_ptr<UINT8> m_obj1_ram; |
| r244614 | r244615 | |
| 121 | 121 | DECLARE_WRITE8_MEMBER(cyclemb_flip_w); |
| 122 | 122 | DECLARE_READ8_MEMBER(skydest_i8741_0_r); |
| 123 | 123 | DECLARE_WRITE8_MEMBER(skydest_i8741_0_w); |
| 124 | ||
| 124 | ||
| 125 | 125 | DECLARE_DRIVER_INIT(skydest); |
| 126 | 126 | DECLARE_DRIVER_INIT(cyclemb); |
| 127 | 127 | virtual void machine_start(); |
| 128 | 128 | virtual void machine_reset(); |
| 129 | 129 | DECLARE_PALETTE_INIT(cyclemb); |
| 130 | ||
| 130 | ||
| 131 | 131 | UINT32 screen_update_cyclemb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 132 | 132 | UINT32 screen_update_skydest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 133 | 133 | void cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| r244614 | r244615 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | required_device<cpu_device> m_maincpu; |
| 41 | 41 | required_device<gfxdecode_device> m_gfxdecode; |
| 42 | ||
| 42 | ||
| 43 | 43 | required_shared_ptr<UINT8> m_lo_vram; |
| 44 | 44 | required_shared_ptr<UINT8> m_hi_vram; |
| 45 | 45 | required_shared_ptr<UINT8> m_cram; |
| 46 | ||
| 46 | ||
| 47 | 47 | tilemap_t *m_sc0_tilemap; |
| 48 | ||
| 48 | ||
| 49 | 49 | DECLARE_WRITE8_MEMBER(sc0_lovram); |
| 50 | 50 | DECLARE_WRITE8_MEMBER(sc0_hivram); |
| 51 | 51 | DECLARE_WRITE8_MEMBER(sc0_cram); |
| 52 | 52 | DECLARE_WRITE8_MEMBER(bank_w); |
| 53 | 53 | DECLARE_READ8_MEMBER(prot_latch_r); |
| 54 | ||
| 54 | ||
| 55 | 55 | TILE_GET_INFO_MEMBER(get_sc0_tile_info); |
| 56 | ||
| 56 | ||
| 57 | 57 | virtual void machine_start(); |
| 58 | 58 | virtual void video_start(); |
| 59 | ||
| 59 | ||
| 60 | 60 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 61 | 61 | }; |
| 62 | 62 |
| r244614 | r244615 | |
|---|---|---|
| 229 | 229 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", darkmist_state, scanline, "screen", 0, 1) |
| 230 | 230 | |
| 231 | 231 | MCFG_DEVICE_ADD("t5182", T5182, 0) |
| 232 | ||
| 233 | 232 | |
| 233 | ||
| 234 | 234 | /* video hardware */ |
| 235 | 235 | MCFG_SCREEN_ADD("screen", RASTER) |
| 236 | 236 | MCFG_SCREEN_REFRESH_RATE(60) |
| r244614 | r244615 | |
|---|---|---|
| 205 | 205 | ROM_START( dlair2 ) |
| 206 | 206 | ROM_REGION( 0x10000, "ipl", 0 ) |
| 207 | 207 | ROM_LOAD( "dl2_319.bin", 0x00000, 0x10000, CRC(e9453a1b) SHA1(eb1201abd0124f6edbabd49bec81af827369cb2c) ) |
| 208 | ||
| 208 | ||
| 209 | 209 | DISK_REGION( "laserdisc" ) |
| 210 | 210 | DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP ) |
| 211 | 211 | ROM_END |
| r244614 | r244615 | |
| 213 | 213 | ROM_START( dlair2_319e ) |
| 214 | 214 | ROM_REGION( 0x10000, "ipl", 0 ) |
| 215 | 215 | ROM_LOAD( "dl2euro3.19.bin", 0x00000, 0x10000, CRC(cc23ad9f) SHA1(24add8f03749dcc27b1b166dc2e5d346534a0088) ) |
| 216 | ||
| 216 | ||
| 217 | 217 | DISK_REGION( "laserdisc" ) |
| 218 | 218 | DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP ) |
| 219 | 219 | ROM_END |
| r244614 | r244615 | |
|---|---|---|
| 48 | 48 | DECLARE_DRIVER_INIT(dreambal); |
| 49 | 49 | virtual void machine_start(); |
| 50 | 50 | virtual void machine_reset(); |
| 51 | ||
| 51 | ||
| 52 | 52 | UINT32 screen_update_dreambal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 53 | 53 | DECO16IC_BANK_CB_MEMBER(bank_callback); |
| 54 | 54 |
| r244614 | r244615 | |
|---|---|---|
| 141 | 141 | ROM_LOAD( "attack.k6", 0x0000, 0x0100, CRC(e120839f) SHA1(74dc19a732238d35e467d814ead581a60463aaa2) ) |
| 142 | 142 | ROM_END |
| 143 | 143 | |
| 144 | ROM_START( attckexd2 ) | |
| 144 | ROM_START( attckexd2 ) // These are likely an overdump, but we are waiting for confirmation before removing the files | |
| 145 | 145 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) |
| 146 | 146 | |
| 147 | 147 | ROM_REGION( 0x0400, "roms", ROMREGION_ERASE00 ) |
| r244614 | r244615 | |
|---|---|---|
| 5 | 5 | Used by the newer (or possibly older/original) revisions of Gals Panic |
| 6 | 6 | also the basis of the various Comad clones |
| 7 | 7 | |
| 8 | Fantasia 1994 Comad | |
| 9 | Super Model 1994 Comad | |
| 10 | New Fantasia 1994 Comad | |
| 11 | New Fantasia 1995 Comad (set 2) | |
| 12 | Fantasy '95 1995 Hi-max Technology Inc. (Running on a Comad PCB) | |
| 13 | Miss World '96 1996 Comad | |
| 14 | Ms/Mr World '96 1996 Comad | |
| 15 | Fantasia II 1997 Comad | |
| 16 | ||
| 8 | Fantasia 1994 Comad | |
| 9 | Super Model 1994 Comad | |
| 10 | New Fantasia 1994 Comad | |
| 11 | New Fantasia 1995 Comad (set 2) | |
| 12 | Fantasy '95 1995 Hi-max Technology Inc. (Running on a Comad PCB) | |
| 13 | Miss World '96 1996 Comad | |
| 14 | Ms/Mr World '96 1996 Comad | |
| 15 | Fantasia II 1997 Comad | |
| 16 | ||
| 17 | 17 | The following seem similar but could have other changes |
| 18 | 18 | |
| 19 | Pocket Gal VIP / | |
| 20 | Gals Hustler 1997 Ace International | |
| 21 | Zip & Zap 1995 Barko Corp | |
| 22 | ||
| 19 | Pocket Gal VIP / | |
| 20 | Gals Hustler 1997 Ace International | |
| 21 | Zip & Zap 1995 Barko Corp | |
| 22 | ||
| 23 | 23 | Notes: |
| 24 | 24 | - In gfx data banking function, some strange gfx are shown. Timing issue? |
| 25 | 25 | |
| r244614 | r244615 | |
| 294 | 294 | /* |
| 295 | 295 | else |
| 296 | 296 | { |
| 297 | | |
| 297 | dest[x] = 0x0000; | |
| 298 | 298 | } |
| 299 | 299 | */ |
| 300 | 300 | |
| r244614 | r244615 | |
| 967 | 967 | |
| 968 | 968 | static MACHINE_CONFIG_DERIVED( comad_noview2, comad ) |
| 969 | 969 | MCFG_DEVICE_REMOVE("view2_0") |
| 970 | ||
| 970 | ||
| 971 | 971 | MCFG_GFXDECODE_MODIFY("gfxdecode", expro02_noview2) |
| 972 | 972 | MACHINE_CONFIG_END |
| 973 | 973 | |
| r244614 | r244615 | |
| 1001 | 1001 | MCFG_OKIM6295_REPLACE("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified |
| 1002 | 1002 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1003 | 1003 | |
| 1004 | MCFG_SCREEN_MODIFY("screen") | |
| 1005 | MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap) | |
| 1004 | MCFG_SCREEN_MODIFY("screen") | |
| 1005 | MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap) | |
| 1006 | 1006 | MACHINE_CONFIG_END |
| 1007 | 1007 | |
| 1008 | 1008 | static MACHINE_CONFIG_DERIVED( zipzap, comad_noview2 ) |
| r244614 | r244615 | |
| 1012 | 1012 | MCFG_OKIM6295_REPLACE("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified |
| 1013 | 1013 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1014 | 1014 | |
| 1015 | MCFG_SCREEN_MODIFY("screen") // doesn't work with original kaneko_spr implementation | |
| 1016 | MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap) | |
| 1015 | MCFG_SCREEN_MODIFY("screen") // doesn't work with original kaneko_spr implementation | |
| 1016 | MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap) | |
| 1017 | 1017 | MACHINE_CONFIG_END |
| 1018 | 1018 | |
| 1019 | 1019 | /************************************* |
| r244614 | r244615 | |
| 1764 | 1764 | *************************************/ |
| 1765 | 1765 | |
| 1766 | 1766 | DRIVER_INIT_MEMBER(expro02_state,expro02) |
| 1767 | { | |
| 1767 | { | |
| 1768 | 1768 | UINT32 *src = (UINT32 *)memregion("gfx3" )->base(); |
| 1769 | 1769 | UINT32 *dst = (UINT32 *)memregion("gfx2" )->base(); |
| 1770 | 1770 | int x, offset; |
| r244614 | r244615 | |
|---|---|---|
| 432 | 432 | |
| 433 | 433 | static INPUT_PORTS_START( asurabusa ) |
| 434 | 434 | PORT_INCLUDE(asurabld) |
| 435 | ||
| 435 | ||
| 436 | 436 | PORT_MODIFY("INPUTS") |
| 437 | 437 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 438 | 438 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r244614 | r244615 | |
|---|---|---|
| 471 | 471 | |
| 472 | 472 | MCFG_MACHINE_START_OVERRIDE(galivan_state,ninjemak) |
| 473 | 473 | MCFG_MACHINE_RESET_OVERRIDE(galivan_state,ninjemak) |
| 474 | ||
| 474 | ||
| 475 | 475 | MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0) |
| 476 | 476 | |
| 477 | 477 | /* video hardware */ |
| r244614 | r244615 | |
| 507 | 507 | |
| 508 | 508 | |
| 509 | 509 | MACHINE_CONFIG_DERIVED(youmab, ninjemak) |
| 510 | ||
| 510 | ||
| 511 | 511 | MCFG_DEVICE_REMOVE("nb1414m4") |
| 512 | 512 | MACHINE_CONFIG_END |
| 513 | 513 | /*************************************************************************** |
| r244614 | r244615 | |
|---|---|---|
| 125 | 125 | UINT8 *ROM = memregion("subdata")->base(); |
| 126 | 126 | membank("subdatabank")->configure_entries(0, 0x2000000/0x0800000, ROM, 0x0800000); |
| 127 | 127 | membank("subdatabank")->set_entry(0); |
| 128 | ||
| 128 | ||
| 129 | 129 | save_item(NAME(m_eeprom_word)); |
| 130 | 130 | save_item(NAME(m_old_mcu_nmi1)); |
| 131 | 131 | save_item(NAME(m_old_mcu_nmi2)); |
| r244614 | r244615 | |
|---|---|---|
| 113 | 113 | |
| 114 | 114 | |
| 115 | 115 | virtual void video_start(); |
| 116 | ||
| 116 | ||
| 117 | 117 | UINT32 screen_update_galpani3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 118 | 118 | TIMER_DEVICE_CALLBACK_MEMBER(galpani3_vblank); |
| 119 | 119 | int gp3_is_alpha_pen(int pen); |
| r244614 | r244615 | |
| 147 | 147 | { |
| 148 | 148 | /* so we can use video/sknsspr.c */ |
| 149 | 149 | m_spritegen->skns_sprite_kludge(0,0); |
| 150 | ||
| 150 | ||
| 151 | 151 | save_item(NAME(m_priority_buffer_scrollx)); |
| 152 | 152 | save_item(NAME(m_priority_buffer_scrolly)); |
| 153 | 153 | save_item(NAME(m_spriteram32)); |
| r244614 | r244615 | |
|---|---|---|
| 314 | 314 | |
| 315 | 315 | GAME( 1990, galpanic, 0, galpanic, galpanic, driver_device, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", GAME_NO_COCKTAIL ) |
| 316 | 316 | GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", GAME_NO_COCKTAIL ) |
| 317 |
| r244614 | r244615 | |
|---|---|---|
| 1032 | 1032 | } |
| 1033 | 1033 | } |
| 1034 | 1034 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xf6a3,0xf6a3,read8_delegate(FUNC(gladiatr_state::ppking_f6a3_r),this)); |
| 1035 | ||
| 1035 | ||
| 1036 | 1036 | save_item(NAME(m_data1)); |
| 1037 | 1037 | save_item(NAME(m_data2)); |
| 1038 | 1038 | } |
| r244614 | r244615 | |
|---|---|---|
| 211 | 211 | |
| 212 | 212 | required_device<cpu_device> m_maincpu; |
| 213 | 213 | required_device<gfxdecode_device> m_gfxdecode; |
| 214 | ||
| 214 | ||
| 215 | 215 | required_shared_ptr<UINT8> m_videoram; |
| 216 | 216 | required_shared_ptr<UINT8> m_colorram; |
| 217 | ||
| 217 | ||
| 218 | 218 | tilemap_t *m_bg_tilemap; |
| 219 | ||
| 219 | ||
| 220 | 220 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 221 | 221 | DECLARE_WRITE8_MEMBER(colorram_w); |
| 222 | 222 | DECLARE_WRITE8_MEMBER(counters_w); |
| 223 | 223 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 224 | ||
| 224 | ||
| 225 | 225 | virtual void video_start(); |
| 226 | 226 | DECLARE_PALETTE_INIT(gluck2); |
| 227 | ||
| 227 | ||
| 228 | 228 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 229 | 229 | }; |
| 230 | 230 |
| r244614 | r244615 | |
|---|---|---|
| 101 | 101 | tilemap_t *m_sc1_tilemap; |
| 102 | 102 | tilemap_t *m_sc2_tilemap; |
| 103 | 103 | tilemap_t *m_sc3_tilemap; |
| 104 | ||
| 104 | ||
| 105 | 105 | UINT16 m_mux_data; |
| 106 | 106 | UINT16 m_seibucrtc_sc0bank; |
| 107 | 107 | UINT16 m_layer_en; |
| 108 | 108 | UINT16 m_scrollram[6]; |
| 109 | ||
| 109 | ||
| 110 | 110 | DECLARE_WRITE16_MEMBER(gfxbank_w); |
| 111 | 111 | DECLARE_READ16_MEMBER(mahjong_panel_r); |
| 112 | 112 | DECLARE_WRITE16_MEMBER(mahjong_panel_w); |
| r244614 | r244615 | |
| 116 | 116 | DECLARE_WRITE16_MEMBER(seibucrtc_sc3vram_w); |
| 117 | 117 | DECLARE_WRITE16_MEMBER(layer_en_w); |
| 118 | 118 | DECLARE_WRITE16_MEMBER(layer_scroll_w); |
| 119 | ||
| 119 | ||
| 120 | 120 | TILE_GET_INFO_MEMBER(seibucrtc_sc0_tile_info); |
| 121 | 121 | TILE_GET_INFO_MEMBER(seibucrtc_sc1_tile_info); |
| 122 | 122 | TILE_GET_INFO_MEMBER(seibucrtc_sc2_tile_info); |
| 123 | 123 | TILE_GET_INFO_MEMBER(seibucrtc_sc3_tile_info); |
| 124 | ||
| 124 | ||
| 125 | 125 | INTERRUPT_GEN_MEMBER(irq); |
| 126 | ||
| 126 | ||
| 127 | 127 | void seibucrtc_sc0bank_w(UINT16 data); |
| 128 | 128 | void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri); |
| 129 | 129 | virtual void video_start(); |
| r244614 | r244615 | |
| 355 | 355 | m_sc3_tilemap->set_transparent_pen(15); |
| 356 | 356 | |
| 357 | 357 | m_seibucrtc_sc0bank = 0; |
| 358 | ||
| 358 | ||
| 359 | 359 | save_item(NAME(m_mux_data)); |
| 360 | 360 | save_item(NAME(m_seibucrtc_sc0bank)); |
| 361 | 361 | save_item(NAME(m_layer_en)); |
| r244614 | r244615 | |
|---|---|---|
| 587 | 587 | GAME( 1985, gunsmoke, 0, gunsmoke, gunsmoke, driver_device, 0, ROT270, "Capcom", "Gun.Smoke (World, 851115)", GAME_SUPPORTS_SAVE ) // GSE_03 |
| 588 | 588 | GAME( 1985, gunsmokeb, gunsmoke, gunsmoke, gunsmoke, driver_device, 0, ROT270, "bootleg", "Gun.Smoke (World, 851115) (bootleg)", GAME_SUPPORTS_SAVE ) // based on above version, warning message patched out |
| 589 | 589 | GAME( 1985, gunsmokej, gunsmoke, gunsmoke, gunsmoke, driver_device, 0, ROT270, "Capcom", "Gun.Smoke (Japan, 851115)", GAME_SUPPORTS_SAVE ) // GSJ_03 |
| 590 | GAME( 1985, gunsmokeu, gunsmoke, gunsmoke, gunsmoke, driver_device, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US, 851115)", GAME_SUPPORTS_SAVE ) // GSR_03 | |
| 590 | GAME( 1985, gunsmokeu, gunsmoke, gunsmoke, gunsmoke, driver_device, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US, 851115)", GAME_SUPPORTS_SAVE ) // GSR_03 | |
| 591 | 591 | GAME( 1986, gunsmokeua, gunsmoke, gunsmoke, gunsmokeua, driver_device, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US, 860408)", GAME_SUPPORTS_SAVE ) // GSA_03 |
| r244614 | r244615 | |
|---|---|---|
| 535 | 535 | 0x02 = ADDOR (ADC DOR) |
| 536 | 536 | 0x01 = ADDO (ADC DO) |
| 537 | 537 | */ |
| 538 | r = 0xf0; | |
| 538 | r = 0xf0; | |
| 539 | 539 | if (m_lan_eeprom) |
| 540 | 540 | r |= m_lan_eeprom->do_read() << 3; |
| 541 | 541 | r |= m_adc12138->do_r(space, 0) | (m_adc12138->eoc_r(space, 0) << 2); |
| r244614 | r244615 | |
| 987 | 987 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 988 | 988 | |
| 989 | 989 | // PCB description at top doesn't mention any EEPROM on the base board... |
| 990 | // | |
| 990 | // MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") | |
| 991 | 991 | |
| 992 | 992 | MCFG_DEVICE_ADD("voodoo0", VOODOO_1, STD_VOODOO_1_CLOCK) |
| 993 | 993 | MCFG_VOODOO_FBMEM(2) |
| r244614 | r244615 | |
|---|---|---|
| 1103 | 1103 | sp.install_rom(m_prot1_addr + 0, m_prot1_addr + 9, rom + m_prot1_addr); |
| 1104 | 1104 | |
| 1105 | 1105 | m_prot1_addr = (data << 4) ^ 0x8340; |
| 1106 | ||
| 1106 | ||
| 1107 | 1107 | prot_mem_range_set(); |
| 1108 | 1108 | } |
| 1109 | 1109 | |
| 1110 | 1110 | void igs011_state::prot_mem_range_set() |
| 1111 | { | |
| 1111 | { | |
| 1112 | 1112 | address_space &sp = m_maincpu->space(AS_PROGRAM); |
| 1113 | ||
| 1113 | ||
| 1114 | 1114 | // Add protection memory range |
| 1115 | 1115 | sp.install_write_handler(m_prot1_addr + 0, m_prot1_addr + 7, write16_delegate(FUNC(igs011_state::igs011_prot1_w), this)); |
| 1116 | 1116 | sp.install_read_handler (m_prot1_addr + 8, m_prot1_addr + 9, read16_delegate(FUNC(igs011_state::igs011_prot1_r), this)); |
| r244614 | r244615 | |
|---|---|---|
| 52 | 52 | optional_device<qs1000_device> m_qs1000; |
| 53 | 53 | required_device<gfxdecode_device> m_gfxdecode; |
| 54 | 54 | required_device<palette_device> m_palette; |
| 55 | ||
| 55 | ||
| 56 | 56 | required_shared_ptr<UINT32> m_mainram; |
| 57 | 57 | required_shared_ptr<UINT32> m_fg_videoram; |
| 58 | 58 | required_shared_ptr<UINT32> m_md_videoram; |
| r244614 | r244615 | |
| 60 | 60 | required_shared_ptr<UINT32> m_spriteram; |
| 61 | 61 | required_shared_ptr<UINT32> m_spriteram2; |
| 62 | 62 | required_shared_ptr<UINT32> m_videoreg; |
| 63 | ||
| 63 | ||
| 64 | 64 | tilemap_t *m_bg_tilemap; |
| 65 | 65 | tilemap_t *m_md_tilemap; |
| 66 | 66 | tilemap_t *m_fg_tilemap; |
| 67 | ||
| 67 | ||
| 68 | 68 | int m_spriteram_bit; |
| 69 | 69 | bitmap_ind16 m_sprites_bitmap; |
| 70 | 70 | bitmap_ind8 m_sprites_bitmap_pri; |
| 71 | 71 | int m_prev_sprites_count; |
| 72 | 72 | UINT8 m_spotty_sound_cmd; |
| 73 | ||
| 73 | ||
| 74 | 74 | DECLARE_WRITE32_MEMBER(limenko_coincounter_w); |
| 75 | 75 | DECLARE_WRITE32_MEMBER(bg_videoram_w); |
| 76 | 76 | DECLARE_WRITE32_MEMBER(md_videoram_w); |
| r244614 | r244615 | |
| 89 | 89 | DECLARE_WRITE8_MEMBER(qs1000_p1_w); |
| 90 | 90 | DECLARE_WRITE8_MEMBER(qs1000_p2_w); |
| 91 | 91 | DECLARE_WRITE8_MEMBER(qs1000_p3_w); |
| 92 | ||
| 92 | ||
| 93 | 93 | DECLARE_CUSTOM_INPUT_MEMBER(spriteram_bit_r); |
| 94 | 94 | |
| 95 | 95 | DECLARE_DRIVER_INIT(common); |
| r244614 | r244615 | |
| 97 | 97 | DECLARE_DRIVER_INIT(dynabomb); |
| 98 | 98 | DECLARE_DRIVER_INIT(legendoh); |
| 99 | 99 | DECLARE_DRIVER_INIT(spotty); |
| 100 | ||
| 100 | ||
| 101 | 101 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 102 | 102 | TILE_GET_INFO_MEMBER(get_md_tile_info); |
| 103 | 103 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 104 | ||
| 104 | ||
| 105 | 105 | virtual void video_start(); |
| 106 | 106 | UINT32 screen_update_limenko(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 107 | 107 | void draw_single_sprite(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx,UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,int priority); |
| r244614 | r244615 | |
| 505 | 505 | |
| 506 | 506 | m_sprites_bitmap.allocate(384,240); |
| 507 | 507 | m_sprites_bitmap_pri.allocate(384,240); |
| 508 | ||
| 508 | ||
| 509 | 509 | save_item(NAME(m_spriteram_bit)); |
| 510 | 510 | save_item(NAME(m_prev_sprites_count)); |
| 511 | 511 | } |
| r244614 | r244615 | |
| 1146 | 1146 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x6626c, 0x6626f, read32_delegate(FUNC(limenko_state::spotty_speedup_r), this)); |
| 1147 | 1147 | |
| 1148 | 1148 | m_spriteram_bit = 1; |
| 1149 | ||
| 1149 | ||
| 1150 | 1150 | save_item(NAME(m_spotty_sound_cmd)); |
| 1151 | 1151 | } |
| 1152 | 1152 |
| r244614 | r244615 | |
|---|---|---|
| 1049 | 1049 | |
| 1050 | 1050 | rom[i] = x; |
| 1051 | 1051 | } |
| 1052 | ||
| 1052 | ||
| 1053 | 1053 | save_item(NAME(m_old)); |
| 1054 | ||
| 1054 | ||
| 1055 | 1055 | for (int i = 0; i < 2; i++) |
| 1056 | 1056 | { |
| 1057 | 1057 | save_item(NAME(m_gun[i].scr_x), i); |
| r244614 | r244615 | |
|---|---|---|
| 458 | 458 | required_device<msm5205_device> m_msm; |
| 459 | 459 | required_device<gfxdecode_device> m_gfxdecode; |
| 460 | 460 | required_device<palette_device> m_palette; |
| 461 | ||
| 461 | ||
| 462 | 462 | required_shared_ptr<UINT8> m_nvram; |
| 463 | 463 | required_shared_ptr<UINT8> m_workram; |
| 464 | 464 | required_shared_ptr<UINT8> m_tileram; |
| 465 | 465 | required_shared_ptr<UINT8> m_colram; |
| 466 | ||
| 466 | ||
| 467 | 467 | UINT8* m_vram; |
| 468 | 468 | UINT8 m_bank; |
| 469 | 469 | int m_irq0_ack; |
| r244614 | r244615 | |
| 503 | 503 | void mastboy_state::video_start() |
| 504 | 504 | { |
| 505 | 505 | m_gfxdecode->gfx(0)->set_source(m_vram); |
| 506 | ||
| 506 | ||
| 507 | 507 | save_pointer(NAME(m_vram), 0x10000); |
| 508 | 508 | } |
| 509 | 509 | |
| r244614 | r244615 | |
| 877 | 877 | void mastboy_state::machine_start() |
| 878 | 878 | { |
| 879 | 879 | m_vram = memregion( "gfx1" )->base(); // makes decoding the RAM based tiles easier this way |
| 880 | ||
| 880 | ||
| 881 | 881 | save_item(NAME(m_bank)); |
| 882 | 882 | save_item(NAME(m_irq0_ack)); |
| 883 | 883 | save_item(NAME(m_backupram_enabled)); |
| r244614 | r244615 | |
|---|---|---|
| 2699 | 2699 | ROM_LOAD( "nflvidfg.cp7", 0x0a000, 0x2000, CRC(73f62392) SHA1(18f28be7264f8edff38f8a6aa067eeb1970f544c) ) |
| 2700 | 2700 | ROM_LOAD( "nflvidfg.c10", 0x0c000, 0x2000, CRC(1766dcc7) SHA1(df499e3c66ae702d2d56e6cd095a754665569fcd) ) |
| 2701 | 2701 | ROM_LOAD( "nflvidfg.cp9", 0x0e000, 0x2000, CRC(46558146) SHA1(4bedfae8cf0fcb9d837706ee13fbe3944ab47216) ) |
| 2702 | ||
| 2702 | ||
| 2703 | 2703 | DISK_REGION( "ced_videodisc" ) |
| 2704 | ||
| 2704 | DISK_IMAGE_READONLY( "nflfoot", 0, NO_DUMP ) | |
| 2705 | 2705 | ROM_END |
| 2706 | 2706 | |
| 2707 | 2707 |
| r244614 | r244615 | |
|---|---|---|
| 571 | 571 | ROM_LOAD( "vpn3verb.ic002", 0x000000, 0x800000, CRC(d0011dc6) SHA1(d01a418b4b83057708e8f0ac4b271112b4a24d15) ) |
| 572 | 572 | ROM_LOAD( "vpn3verb_spr.ic002", 0x800000, 0x040000, CRC(41169c24) SHA1(40bffbe93da65fe5512be9f80254b034a071c38b) ) |
| 573 | 573 | |
| 574 | DISK_REGION("dvd") | |
| 574 | DISK_REGION("dvd") // actually single-track CD-ROM | |
| 575 | 575 | DISK_IMAGE_READONLY( "vpn1cd0", 0, SHA1(714bd19eee3b31a060223003e4567e405ce04cd7) ) |
| 576 | 576 | ROM_END |
| 577 | 577 |
| r244614 | r244615 | |
|---|---|---|
| 2670 | 2670 | */ |
| 2671 | 2671 | /* |
| 2672 | 2672 | static MACHINE_CONFIG_DERIVED( naomi2, naomi ) |
| 2673 | MCFG_CPU_MODIFY("maincpu") | |
| 2674 | MCFG_CPU_PROGRAM_MAP(naomi2_map) | |
| 2673 | MCFG_CPU_MODIFY("maincpu") | |
| 2674 | MCFG_CPU_PROGRAM_MAP(naomi2_map) | |
| 2675 | 2675 | MACHINE_CONFIG_END |
| 2676 | 2676 | */ |
| 2677 | 2677 | /* |
| r244614 | r244615 | |
| 3467 | 3467 | // 840-0016 1999 317-0262-JPN Naomi |
| 3468 | 3468 | ROM_PARAMETER( ":rom_board:segam2crypt:key", "280fee35" ) |
| 3469 | 3469 | /* |
| 3470 | 838-13661 RS422/RS232C BD DOC | |
| 3471 | IC1 - Toshiba TMPZ84C015BF-10 Z80-based MCU | |
| 3472 | IC6 - Toshiba TC551001CF-70L 128k x8 SRAM | |
| 3473 | IC8 - Sega 315-5338A | |
| 3474 | OSC1 - 19.680MHz OSC2 - 32.000MHz | |
| 3470 | 838-13661 RS422/RS232C BD DOC | |
| 3471 | IC1 - Toshiba TMPZ84C015BF-10 Z80-based MCU | |
| 3472 | IC6 - Toshiba TC551001CF-70L 128k x8 SRAM | |
| 3473 | IC8 - Sega 315-5338A | |
| 3474 | OSC1 - 19.680MHz OSC2 - 32.000MHz | |
| 3475 | 3475 | |
| 3476 | ||
| 3476 | connected between Naomi motherboard and card reader/printer, accessed via MIE MCU ports 0x09-0x0d | |
| 3477 | 3477 | */ |
| 3478 | 3478 | ROM_REGION( 0x10000, "rs422_io", 0 ) |
| 3479 | 3479 | ROM_LOAD( "epr-22083.ic7", 0x0000, 0x10000, CRC(c70b0de9) SHA1(329c924b4d29017482b1ecca839fb610ca20b2af) ) |
| r244614 | r244615 | |
|---|---|---|
| 3720 | 3720 | ROM_LOAD( "6.bin", 0x020000, 0x010000, CRC(0fece809) SHA1(1fe8436af8ead02a3b517b6306f9824cd64b2d26) ) |
| 3721 | 3721 | ROM_LOAD( "5.bin", 0x010000, 0x010000, CRC(0706386a) SHA1(29eee363775869dcc9c46285632e8bf745c9110b) ) |
| 3722 | 3722 | ROM_LOAD( "4.bin", 0x000000, 0x010000, CRC(199e2127) SHA1(2514d51cb06438b312d1f328c72baa739280416a) ) |
| 3723 | ||
| 3723 | ||
| 3724 | 3724 | DISK_REGION( "laserdisc" ) |
| 3725 | ||
| 3725 | DISK_IMAGE_READONLY( "shabdama", 0, NO_DUMP ) | |
| 3726 | 3726 | ROM_END |
| 3727 | 3727 | |
| 3728 | 3728 | // YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME, FLAGS |
| r244614 | r244615 | |
|---|---|---|
| 48 | 48 | SOIC8 chip (a secured PIC?) is not populated (the solder pads are there though). |
| 49 | 49 | There's an extra sound IC AN7395S (it's not populated on Hornet). |
| 50 | 50 | The PALs/PLDs are the same on NWK-TR and Hornet. |
| 51 | Both Racing JAM/Chapter 2 and Thrill Drive use two video boards. | |
| 51 | Both Racing JAM/Chapter 2 and Thrill Drive use two video boards. | |
| 52 | 52 | The top video board is set to MASTER/TWIN, lower video board is set to SLAVE |
| 53 | 53 | They are otherwise identical. |
| 54 | 54 | |
| r244614 | r244615 | |
| 91 | 91 | DRM1M4SJ8 - Fujitsu 81C4256 256kx4 DRAM (SOJ24) |
| 92 | 92 | SRAM256K - Cypress CY7C199 32kx8 SRAM (SOJ28) |
| 93 | 93 | DRAM16X16 - Fujitsu 8118160A-60 16megx16 DRAM (SOJ42) |
| 94 | ||
| 94 | M48T58Y-70PC1 - ST Timekeeper RAM | |
| 95 | 95 | RF5C400 - Ricoh RF5C400 PCM 32Ch, 44.1 kHz Stereo, 3D Effect Spatializer, clock input 16.9344MHz |
| 96 | 96 | 056800 - Konami Custom (QFP80) |
| 97 | 97 | 058232 - Konami Custom Ceramic Package (SIL14) |
| r244614 | r244615 | |
| 130 | 130 | CN6 - DIN96 joining connector to lower PCB |
| 131 | 131 | CN7 - Multi-pin connector (pads only, not used) |
| 132 | 132 | CN9 to CN13 - Power Connectors |
| 133 | ||
| 133 | CN14 to CN17 - RCA Stereo Audio OUT | |
| 134 | 134 | CN18 - RCA Mono Audio OUT |
| 135 | 135 | CN19 - USB Connector |
| 136 | 136 | |
| r244614 | r244615 | |
| 161 | 161 | | CN1 | |
| 162 | 162 | |------------------------| |
| 163 | 163 | Notes: |
| 164 | CN1 - Connector joining to CPU board CN4 | |
| 165 | CN2/3 - RCA jacks for network cable | |
| 166 | 2G - Small SOIC8 chip with number 0038323 at location 2G. An identical chip is present on | |
| 167 | *some* Hornet games on the GN715 CPU board at location 30C. It may be a PIC or EEPROM. | |
| 168 | On Hornet, the chip seems to refresh the data in the Timekeeper RAM when the battery | |
| 169 | dies and keeps the game working. It's purpose on the network board is unknown but it may | |
| 170 | 'upgrade' the data in the NVRAM to the network version of the game for a twin cabinet set-up. | |
| 171 | HYC2485S - Hybrid ceramic module for RS485 | |
| 172 | CY7C199 - 32k x8 SRAM | |
| 173 | XC5204 - Xilinx XC5204 FPGA | |
| 174 | XC5210 - Xilink XC5210 FPGA | |
| 175 | N676H1 - PALCE16V8Q-15 stamped 'N676H1' | |
| 164 | CN1 - Connector joining to CPU board CN4 | |
| 165 | CN2/3 - RCA jacks for network cable | |
| 166 | 2G - Small SOIC8 chip with number 0038323 at location 2G. An identical chip is present on | |
| 167 | *some* Hornet games on the GN715 CPU board at location 30C. It may be a PIC or EEPROM. | |
| 168 | On Hornet, the chip seems to refresh the data in the Timekeeper RAM when the battery | |
| 169 | dies and keeps the game working. It's purpose on the network board is unknown but it may | |
| 170 | 'upgrade' the data in the NVRAM to the network version of the game for a twin cabinet set-up. | |
| 171 | HYC2485S - Hybrid ceramic module for RS485 | |
| 172 | CY7C199 - 32k x8 SRAM | |
| 173 | XC5204 - Xilinx XC5204 FPGA | |
| 174 | XC5210 - Xilink XC5210 FPGA | |
| 175 | N676H1 - PALCE16V8Q-15 stamped 'N676H1' | |
| 176 | 176 | |
| 177 | ||
| 177 | ||
| 178 | 178 | Bottom Board (VIDEO PCB) |
| 179 | 179 | GN676 PWB(B)B |
| 180 | 180 | |-------------------------------------------------------------------------------------------| |
| r244614 | r244615 | |
| 215 | 215 | TEXELFX - 3DFX 500-0004-02 BD0665.1 TMU (QFP208) |
| 216 | 216 | PIXELFX - 3DFX 500-0003-03 F001701.1 FBI (QFP240) |
| 217 | 217 | 001604 - Konami Custom (QFP208) |
| 218 | ||
| 218 | MC44200FT - Motorola MC44200FT 3 Channel Video D/A Converter (QFP44) | |
| 219 | 219 | MACH111 - AMD MACH111 CPLD (Stamped '03161A', PLCC44) |
| 220 | ||
| 220 | PLCC44_SOCKET - empty PLCC44 socket | |
| 221 | 221 | AV9170 - Integrated Circuit Systems Inc. Clock Multiplier (SOIC8) |
| 222 | 222 | AM7201 - AMD AM7201 FIFO (PLCC32) |
| 223 | 223 | PAL1 - AMD PALCE16V8 (stamped 'N676B4', DIP20) |
| r244614 | r244615 | |
|---|---|---|
| 84 | 84 | required_device<gfxdecode_device> m_gfxdecode; |
| 85 | 85 | required_device<screen_device> m_screen; |
| 86 | 86 | required_device<palette_device> m_palette; |
| 87 | ||
| 87 | ||
| 88 | 88 | required_shared_ptr<UINT8> m_mainram; |
| 89 | 89 | required_shared_ptr<UINT8> m_spriteram; |
| 90 | 90 | required_shared_ptr<UINT8> m_textram; |
| r244614 | r244615 | |
| 112 | 112 | TILE_GET_INFO_MEMBER(get_infotile_info_3); |
| 113 | 113 | TILE_GET_INFO_MEMBER(get_infotile_info_4); |
| 114 | 114 | TILE_GET_INFO_MEMBER(get_txttile_info); |
| 115 | ||
| 115 | ||
| 116 | 116 | DECLARE_DRIVER_INIT(panicr); |
| 117 | 117 | virtual void video_start(); |
| 118 | 118 | DECLARE_PALETTE_INIT(panicr); |
| 119 | ||
| 119 | ||
| 120 | 120 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 121 | 121 | void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect ); |
| 122 | ||
| 122 | ||
| 123 | 123 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 124 | 124 | }; |
| 125 | 125 | |
| r244614 | r244615 | |
| 243 | 243 | |
| 244 | 244 | m_txttilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(panicr_state::get_txttile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32 ); |
| 245 | 245 | m_txttilemap->configure_groups(*m_gfxdecode->gfx(0), 0); |
| 246 | ||
| 246 | ||
| 247 | 247 | save_item(NAME(m_scrollx)); |
| 248 | 248 | } |
| 249 | 249 | |
| r244614 | r244615 | |
| 609 | 609 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", panicr_state, scanline, "screen", 0, 1) |
| 610 | 610 | |
| 611 | 611 | MCFG_DEVICE_ADD("t5182", T5182, 0) |
| 612 | ||
| 613 | 612 | |
| 613 | ||
| 614 | 614 | MCFG_SCREEN_ADD("screen", RASTER) |
| 615 | 615 | MCFG_SCREEN_REFRESH_RATE(60) |
| 616 | 616 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| r244614 | r244615 | |
|---|---|---|
| 5017 | 5017 | ROM_START( peps0090 ) /* Normal board : Gold, Silver & Bronze (PS0090) - Payout 90.19% */ |
| 5018 | 5018 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 5019 | 5019 | ROM_LOAD( "ps0090_569-a2c.u68", 0x00000, 0x10000, CRC(5a727ff0) SHA1(6eed9d85620eff751c598d56807470f8753e8dd5) ) /* 3 Coins Max / 1 Line */ |
| 5020 | ||
| 5020 | ||
| 5021 | 5021 | ROM_REGION( 0x020000, "gfx1", 0 ) |
| 5022 | 5022 | ROM_LOAD( "mro-cg1059.u72", 0x00000, 0x8000, CRC(96210de3) SHA1(10daa358f1fc507e9f4c788265c0acc57678fa40) ) /* Also contains graphics for Double Diamonds, use CAP1003 */ |
| 5023 | 5023 | ROM_LOAD( "mgo-cg1059.u73", 0x08000, 0x8000, CRC(cfb9a357) SHA1(a390bed240960efd8da6e7815a0b0d272133f20f) ) |
| r244614 | r244615 | |
|---|---|---|
| 98 | 98 | UINT8 m_toMCU; |
| 99 | 99 | UINT8 m_fromMCU; |
| 100 | 100 | UINT8 m_ddrA; |
| 101 | ||
| 101 | ||
| 102 | 102 | DECLARE_WRITE8_MEMBER(vram2_w); |
| 103 | 103 | DECLARE_WRITE8_MEMBER(vram1_w); |
| 104 | 104 | DECLARE_WRITE8_MEMBER(mcu_portA_w); |
| r244614 | r244615 | |
| 107 | 107 | DECLARE_WRITE8_MEMBER(vidctrl_w); |
| 108 | 108 | DECLARE_READ8_MEMBER(protection_r); |
| 109 | 109 | DECLARE_WRITE8_MEMBER(protection_w); |
| 110 | ||
| 110 | ||
| 111 | 111 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 112 | 112 | TILE_GET_INFO_MEMBER(get_tile_info2); |
| 113 | ||
| 113 | ||
| 114 | 114 | virtual void machine_start(); |
| 115 | 115 | virtual void video_start(); |
| 116 | 116 | DECLARE_PALETTE_INIT(pipeline); |
| 117 | ||
| 117 | ||
| 118 | 118 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 119 | ||
| 119 | ||
| 120 | 120 | TIMER_CALLBACK_MEMBER(protection_deferred_w); |
| 121 | 121 | }; |
| 122 | 122 | |
| r244614 | r244615 | |
| 153 | 153 | m_tilemap1 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32 ); |
| 154 | 154 | m_tilemap2 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info2),this),TILEMAP_SCAN_ROWS,8,8,64,32 ); |
| 155 | 155 | m_tilemap2->set_transparent_pen(0); |
| 156 | ||
| 156 | ||
| 157 | 157 | save_item(NAME(m_vidctrl)); |
| 158 | 158 | save_pointer(NAME(m_palram), 0x1000); |
| 159 | 159 | } |
| r244614 | r244615 | |
|---|---|---|
| 78 | 78 | |
| 79 | 79 | required_shared_ptr<UINT8> m_videoram; |
| 80 | 80 | required_shared_ptr<UINT8> m_fbram; |
| 81 | ||
| 81 | ||
| 82 | 82 | UINT8 m_char_pen; |
| 83 | 83 | UINT8 m_char_pen_vreg; |
| 84 | 84 | UINT8 *m_fg_fb; |
| r244614 | r244615 | |
| 86 | 86 | UINT8 m_scrollx_lo; |
| 87 | 87 | UINT8 m_gfx_switch; |
| 88 | 88 | UINT8 m_sound_cmd; |
| 89 | ||
| 89 | ||
| 90 | 90 | DECLARE_WRITE8_MEMBER(charram_w); |
| 91 | 91 | DECLARE_WRITE8_MEMBER(char_vregs_w); |
| 92 | 92 | DECLARE_WRITE8_MEMBER(scrollx_lo_w); |
| r244614 | r244615 | |
| 96 | 96 | DECLARE_READ8_MEMBER(audio_command_r); |
| 97 | 97 | DECLARE_READ8_MEMBER(videoram_r); |
| 98 | 98 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 99 | ||
| 99 | ||
| 100 | 100 | DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); |
| 101 | ||
| 101 | ||
| 102 | 102 | virtual void machine_start(); |
| 103 | 103 | virtual void video_start(); |
| 104 | 104 | DECLARE_PALETTE_INIT(progolf); |
| 105 | ||
| 105 | ||
| 106 | 106 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 107 | 107 | }; |
| 108 | 108 | |
| r244614 | r244615 | |
| 118 | 118 | m_scrollx_lo = 0; |
| 119 | 119 | |
| 120 | 120 | m_fg_fb = auto_alloc_array(machine(), UINT8, 0x2000*8); |
| 121 | ||
| 121 | ||
| 122 | 122 | save_item(NAME(m_char_pen)); |
| 123 | 123 | save_item(NAME(m_char_pen_vreg)); |
| 124 | 124 | save_pointer(NAME(m_fg_fb), 0x2000*8); |
| r244614 | r244615 | |
|---|---|---|
| 268 | 268 | { |
| 269 | 269 | m_videoram=auto_alloc_array(machine(), UINT8, 0x4000*2); |
| 270 | 270 | membank("bank1")->configure_entries(0, 6, memregion("user1")->base(), 0x4000); |
| 271 | ||
| 271 | ||
| 272 | 272 | save_pointer(NAME(m_videoram), 0x4000*2); |
| 273 | 273 | //save_item(NAME(m_port60)); |
| 274 | 274 | save_item(NAME(m_port70)); |
| r244614 | r244615 | |
|---|---|---|
| 114 | 114 | required_device<eeprom_serial_93cxx_device> m_eeprom; |
| 115 | 115 | required_device<gfxdecode_device> m_gfxdecode; |
| 116 | 116 | required_device<palette_device> m_palette; |
| 117 | ||
| 117 | ||
| 118 | 118 | required_shared_ptr<UINT32> m_viewregs0; |
| 119 | 119 | required_shared_ptr<UINT32> m_viewregs6; |
| 120 | 120 | required_shared_ptr<UINT32> m_viewregs7; |
| r244614 | r244615 | |
| 124 | 124 | required_shared_ptr<UINT32> m_spriteregs; |
| 125 | 125 | required_shared_ptr<UINT32> m_blitterregs; |
| 126 | 126 | required_shared_ptr<UINT32> m_spriteram; |
| 127 | ||
| 127 | ||
| 128 | 128 | bitmap_ind16 *m_sprite_bitmap; |
| 129 | 129 | rectangle m_sprite_clip; |
| 130 | 130 | int m_vblirqlevel; |
| r244614 | r244615 | |
| 132 | 132 | int m_banking; |
| 133 | 133 | UINT32 *m_tilemap_ram[4]; |
| 134 | 134 | tilemap_t *m_tilemap[4]; |
| 135 | ||
| 135 | ||
| 136 | 136 | DECLARE_WRITE32_MEMBER(tilemap0_w); |
| 137 | 137 | DECLARE_WRITE32_MEMBER(tilemap1_w); |
| 138 | 138 | DECLARE_WRITE32_MEMBER(tilemap2_w); |
| r244614 | r244615 | |
| 145 | 145 | DECLARE_WRITE32_MEMBER(rombank_w); |
| 146 | 146 | DECLARE_WRITE32_MEMBER(blitter_w); |
| 147 | 147 | DECLARE_WRITE32_MEMBER(eeprom_write); |
| 148 | ||
| 148 | ||
| 149 | 149 | DECLARE_DRIVER_INIT(rabbit); |
| 150 | ||
| 150 | ||
| 151 | 151 | TILE_GET_INFO_MEMBER(get_tilemap0_tile_info); |
| 152 | 152 | TILE_GET_INFO_MEMBER(get_tilemap1_tile_info); |
| 153 | 153 | TILE_GET_INFO_MEMBER(get_tilemap2_tile_info); |
| 154 | 154 | TILE_GET_INFO_MEMBER(get_tilemap3_tile_info); |
| 155 | ||
| 155 | ||
| 156 | 156 | INTERRUPT_GEN_MEMBER(vblank_interrupt); |
| 157 | ||
| 157 | ||
| 158 | 158 | virtual void video_start(); |
| 159 | ||
| 159 | ||
| 160 | 160 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 161 | 161 | inline void get_tilemap_info(tile_data &tileinfo, int tile_index, int whichtilemap, int tilesize); |
| 162 | 162 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| r244614 | r244615 | |
| 437 | 437 | |
| 438 | 438 | m_sprite_bitmap = auto_bitmap_ind16_alloc(machine(),0x1000,0x1000); |
| 439 | 439 | m_sprite_clip.set(0, 0x1000-1, 0, 0x1000-1); |
| 440 | ||
| 440 | ||
| 441 | 441 | save_pointer(NAME(m_tilemap_ram[0]), 0x20000/4); |
| 442 | 442 | save_pointer(NAME(m_tilemap_ram[1]), 0x20000/4); |
| 443 | 443 | save_pointer(NAME(m_tilemap_ram[2]), 0x20000/4); |
| r244614 | r244615 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Seibu Protected 1993-94 era hardware, V30 based (sequel to the 68k based hardware) |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | * zeroteam - sort-DMA doesn't seem to work too well, sprite-sprite priorities are broken as per now | |
| 7 | TODO: | |
| 8 | * zeroteam - sort-DMA doesn't seem to work too well, sprite-sprite priorities are broken as per now | |
| 9 | 9 | |
| 10 | ||
| 10 | * xsedae - it does an "8-liner"-style scroll during attract, doesn't work too well. | |
| 11 | 11 | |
| 12 | ||
| 12 | * sprite chip is the same as seibuspi.c and feversoc.c, needs device-ification and merging. | |
| 13 | 13 | |
| 14 | * sprite chip also uses first entry for "something" that isn't sprite, some of them looks clipping | |
| 15 | regions (150 - ff in zeroteam, 150 - 0 and 150 - 80 in raiden2). Latter probably do double buffering | |
| 16 | on odd/even frames, by updating only top or bottom part of screen. | |
| 14 | * sprite chip also uses first entry for "something" that isn't sprite, some of them looks clipping | |
| 15 | regions (150 - ff in zeroteam, 150 - 0 and 150 - 80 in raiden2). Latter probably do double buffering | |
| 16 | on odd/even frames, by updating only top or bottom part of screen. | |
| 17 | 17 | |
| 18 | 18 | =========================================================================================================== |
| 19 | 19 |
| r244614 | r244615 | |
|---|---|---|
| 16 | 16 | Trivia (1975/11) YES |
| 17 | 17 | Volly (1973/03?) YES 500378A 500322A |
| 18 | 18 | Wipe Out (1974/01) YES 500986B/C 500963B/? |
| 19 | ||
| 19 | ||
| 20 | 20 | Volly Industries Discrete Games List |
| 21 | 21 | (Volly was Ramtek's Canada-based affiliate and distributor.) |
| 22 | 22 | |
| 23 | Game Name Clone Of | |
| 23 | Game Name Clone Of | |
| 24 | 24 | --------------------------------------------------------------------------------- |
| 25 | 25 | Batter Up (1974/??) Deluxe Baseball (Ramtek, 1975/06) |
| 26 | 26 | Crossfire (1974/01) (registered trademark?) Knock Out (Ramtek, 1974/09)? |
| r244614 | r244615 | |
| 31 | 31 | Hockey (Cocktail) (1973/??) Soccer (Ramtek, 1973/11) |
| 32 | 32 | Scoring (1973/11?) Soccer (Ramtek, 1973/11)? |
| 33 | 33 | Tennis (1973/??) Volly (Ramtek, 1973/03?) |
| 34 | ||
| 34 | ||
| 35 | 35 | *********************************************************************************/ |
| 36 | 36 | |
| 37 | 37 |
| r244614 | r244615 | |
|---|---|---|
| 40 | 40 | save_item(NAME(m_main_irq_mask)); |
| 41 | 41 | save_item(NAME(m_sub_irq_mask)); |
| 42 | 42 | save_item(NAME(m_cpu2_m6000)); |
| 43 | ||
| 43 | ||
| 44 | 44 | if (m_68705 != NULL) // only for the parent (with MCU) |
| 45 | 45 | { |
| 46 | 46 | save_item(NAME(m_from_main)); |
| r244614 | r244615 | |
|---|---|---|
| 2373 | 2373 | // VIDEO BD 837-6906 |
| 2374 | 2374 | // |
| 2375 | 2375 | // NOTE: This PCB set used EPROMs instead of the OPR (One time PRogram) used by other sets. |
| 2376 | // Same data so the rom numbers are the same, just labeled EPR-xxxxx versus OPR-xxxxx | |
| 2376 | // Same data so the rom numbers are the same, just labeled EPR-xxxxx versus OPR-xxxxx | |
| 2377 | 2377 | // |
| 2378 | 2378 | ROM_START( toutrunj1 ) |
| 2379 | 2379 | ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code |
| r244614 | r244615 | |
|---|---|---|
| 89 | 89 | tilemap_t *m_sc1_tilemap; |
| 90 | 90 | tilemap_t *m_sc2_tilemap; |
| 91 | 91 | tilemap_t *m_sc3_tilemap; |
| 92 | ||
| 92 | ||
| 93 | 93 | UINT16 m_mux_data; |
| 94 | 94 | UINT8 m_hopper_io; |
| 95 | 95 | UINT16 m_layer_en; |
| 96 | 96 | UINT16 m_scrollram[6]; |
| 97 | ||
| 97 | ||
| 98 | 98 | DECLARE_READ16_MEMBER(mahjong_panel_r); |
| 99 | 99 | DECLARE_WRITE16_MEMBER(mahjong_panel_w); |
| 100 | 100 | DECLARE_WRITE16_MEMBER(out_w); |
| r244614 | r244615 | |
| 105 | 105 | DECLARE_WRITE16_MEMBER(seibucrtc_sc3vram_w); |
| 106 | 106 | DECLARE_WRITE16_MEMBER(layer_en_w); |
| 107 | 107 | DECLARE_WRITE16_MEMBER(layer_scroll_w); |
| 108 | ||
| 108 | ||
| 109 | 109 | TILE_GET_INFO_MEMBER(seibucrtc_sc0_tile_info); |
| 110 | 110 | TILE_GET_INFO_MEMBER(seibucrtc_sc1_tile_info); |
| 111 | 111 | TILE_GET_INFO_MEMBER(seibucrtc_sc2_tile_info); |
| 112 | 112 | TILE_GET_INFO_MEMBER(seibucrtc_sc3_tile_info); |
| 113 | ||
| 113 | ||
| 114 | 114 | INTERRUPT_GEN_MEMBER(interrupt); |
| 115 | 115 | |
| 116 | 116 | virtual void machine_start(); |
| r244614 | r244615 | |
|---|---|---|
| 488 | 488 | m_prot_table[0] = sidepckt_prot_table_1; |
| 489 | 489 | m_prot_table[1] = sidepckt_prot_table_2; |
| 490 | 490 | m_prot_table[2] = sidepckt_prot_table_3; |
| 491 | ||
| 491 | ||
| 492 | 492 | save_item(NAME(m_i8751_return)); |
| 493 | 493 | save_item(NAME(m_current_ptr)); |
| 494 | 494 | save_item(NAME(m_current_table)); |
| r244614 | r244615 | |
| 501 | 501 | m_prot_table[0] = sidepcktj_prot_table_1; |
| 502 | 502 | m_prot_table[1] = sidepcktj_prot_table_2; |
| 503 | 503 | m_prot_table[2] = sidepcktj_prot_table_3; |
| 504 | ||
| 504 | ||
| 505 | 505 | save_item(NAME(m_i8751_return)); |
| 506 | 506 | save_item(NAME(m_current_ptr)); |
| 507 | 507 | save_item(NAME(m_current_table)); |
| r244614 | r244615 | |
|---|---|---|
| 296 | 296 | PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6" ) /* Listed as "Unused" */ |
| 297 | 297 | PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7" ) /* Listed as "Unused" */ |
| 298 | 298 | PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW1:8" ) /* Listed as "Unused" */ |
| 299 | PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) ) | |
| 299 | PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") | |
| 300 | 300 | PORT_DIPSETTING( 0x0300, DEF_STR( Very_Easy ) ) /* Initial start time 40 secs */ |
| 301 | 301 | PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) /* Initial start time 30 secs - Other in game effects?? */ |
| 302 | 302 | PORT_DIPSETTING( 0x0100, DEF_STR( Hard ) ) /* Initial start time 30 secs - Other in game effects?? */ |
| 303 | 303 | PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) ) /* Initial start time 30 secs - Other in game effects?? */ |
| 304 | PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coinage ) ) | |
| 304 | PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:3,4,5") | |
| 305 | 305 | PORT_DIPSETTING( 0x1000, DEF_STR( 4C_1C ) ) |
| 306 | 306 | PORT_DIPSETTING( 0x1400, DEF_STR( 3C_1C ) ) |
| 307 | 307 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_2C ) ) /* Works the same as 2C/1C */ |
| r244614 | r244615 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Notes: |
| 6 | 6 | Pop Shot is a prototype sequel (or upgrade) to Skeet Shot |
| 7 | ||
| 7 | ||
| 8 | 8 | Supposedly Skeet Shot used a laserdisc to supply video for eight |
| 9 | 9 | different background "scenes". Pop Shot probably did too, in that case. |
| 10 | 10 | |
| r244614 | r244615 | |
| 266 | 266 | ROM_REGION16_LE( 0x200000, "tms", 0 ) |
| 267 | 267 | ROM_LOAD16_BYTE( "even_v1.2.u14", 0x000000, 0x40000, CRC(c7c9515e) SHA1(ce3e813c15085790d5335d9fc751b3cc5b617b20) ) |
| 268 | 268 | ROM_LOAD16_BYTE( "odd_v1.2.u13", 0x000001, 0x40000, CRC(ea4402fb) SHA1(b0b6b191a8b48bead660a385c638363943a6ffe2) ) |
| 269 | ||
| 269 | ||
| 270 | 270 | DISK_REGION( "laserdisc" ) |
| 271 | ||
| 271 | DISK_IMAGE_READONLY( "skeetsht", 0, NO_DUMP ) // unknown disc label? | |
| 272 | 272 | ROM_END |
| 273 | 273 | |
| 274 | 274 | ROM_START( popshot ) |
| r244614 | r244615 | |
| 281 | 281 | ROM_LOAD16_BYTE( "popshot_tms34_odd.u13", 0x000001, 0x80000, CRC(82d616d8) SHA1(83ab33727ebab882b79c9ebd3557e2c319b3387a) ) |
| 282 | 282 | |
| 283 | 283 | DISK_REGION( "laserdisc" ) |
| 284 | ||
| 284 | DISK_IMAGE_READONLY( "popshot", 0, NO_DUMP ) // unknown disc label? | |
| 285 | 285 | ROM_END |
| 286 | 286 | |
| 287 | 287 |
| r244614 | r244615 | |
|---|---|---|
| 50 | 50 | required_shared_ptr<UINT8> m_colorram; |
| 51 | 51 | required_shared_ptr<UINT8> m_spriteram; |
| 52 | 52 | required_shared_ptr<UINT8> m_scrollram; |
| 53 | ||
| 53 | ||
| 54 | 54 | tilemap_t* m_tilemap; |
| 55 | 55 | int m_nmi; |
| 56 | ||
| 56 | ||
| 57 | 57 | DECLARE_WRITE8_MEMBER(flip_screen_x_w); |
| 58 | 58 | DECLARE_WRITE8_MEMBER(flip_screen_y_w); |
| 59 | 59 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 60 | 60 | DECLARE_WRITE8_MEMBER(colorram_w); |
| 61 | 61 | DECLARE_WRITE8_MEMBER(nmi_enable_w); |
| 62 | ||
| 62 | ||
| 63 | 63 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 64 | ||
| 64 | ||
| 65 | 65 | virtual void machine_start(); |
| 66 | 66 | virtual void video_start(); |
| 67 | 67 | DECLARE_PALETTE_INIT(skyarmy); |
| 68 | ||
| 68 | ||
| 69 | 69 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 70 | ||
| 70 | ||
| 71 | 71 | INTERRUPT_GEN_MEMBER(nmi_source); |
| 72 | 72 | }; |
| 73 | 73 |
| r244614 | r244615 | |
|---|---|---|
| 2853 | 2853 | buffer[i] = src[BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,3,4,1,2,0)]; |
| 2854 | 2854 | memcpy(src,buffer,len); |
| 2855 | 2855 | } |
| 2856 | ||
| 2856 | ||
| 2857 | 2857 | save_item(NAME(m_sb3_music_is_playing)); |
| 2858 | 2858 | save_item(NAME(m_sb3_music)); |
| 2859 | 2859 | } |
| r244614 | r244615 | |
|---|---|---|
| 977 | 977 | ROM_LOAD( "prom.u17", 0x0000, 0x0020, NO_DUMP ) /* Socketted */ |
| 978 | 978 | ROM_LOAD( "prom.u21", 0x0020, 0x0020, NO_DUMP ) /* Soldered in (Color?) */ |
| 979 | 979 | ROM_LOAD( "prom.u22", 0x0040, 0x0100, NO_DUMP ) /* Soldered in */ |
| 980 | ||
| 980 | ||
| 981 | 981 | DISK_REGION( "laserdisc") |
| 982 | 982 | DISK_IMAGE_READONLY("cstripxi", 0, NO_DUMP ) |
| 983 | 983 | ROM_END |
| r244614 | r244615 | |
|---|---|---|
| 156 | 156 | /* |
| 157 | 157 | |
| 158 | 158 | Gunman |
| 159 | ||
| 159 | ||
| 160 | 160 | label loc. Part # |
| 161 | 161 | ========================================================== |
| 162 | 162 | CR11 N5 74s287 yes, it says CRxx not GNxx |
| r244614 | r244615 | |
|---|---|---|
| 441 | 441 | void tecmosys_state::machine_start() |
| 442 | 442 | { |
| 443 | 443 | membank("bank1")->configure_entries(0, 16, memregion("audiocpu")->base(), 0x4000); |
| 444 | ||
| 444 | ||
| 445 | 445 | save_item(NAME(m_device_read_ptr)); |
| 446 | 446 | save_item(NAME(m_device_status)); |
| 447 | 447 | save_item(NAME(m_device_value)); |
| r244614 | r244615 | |
|---|---|---|
| 366 | 366 | m_tilemap_ram[1] = auto_alloc_array_clear(machine(), UINT32, 0x8000); |
| 367 | 367 | m_tilemap_ram[2] = auto_alloc_array_clear(machine(), UINT32, 0x8000); |
| 368 | 368 | m_tilemap_ram[3] = auto_alloc_array_clear(machine(), UINT32, 0x8000); |
| 369 | ||
| 370 | ||
| 369 | ||
| 370 | ||
| 371 | 371 | save_pointer(NAME(m_tilemap_ram[0]), 0x8000); |
| 372 | 372 | save_pointer(NAME(m_tilemap_ram[1]), 0x8000); |
| 373 | 373 | save_pointer(NAME(m_tilemap_ram[2]), 0x8000); |
| 374 | 374 | save_pointer(NAME(m_tilemap_ram[3]), 0x8000); |
| 375 | ||
| 375 | ||
| 376 | 376 | save_item(NAME(m_old_brt1)); |
| 377 | 377 | save_item(NAME(m_old_brt2)); |
| 378 | 378 | } |
| r244614 | r244615 | |
|---|---|---|
| 689 | 689 | void welltris_state::machine_start() |
| 690 | 690 | { |
| 691 | 691 | membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x8000); |
| 692 | ||
| 692 | ||
| 693 | 693 | save_item(NAME(m_pending_command)); |
| 694 | 694 | } |
| 695 | 695 |
| r244614 | r244615 | |
|---|---|---|
| 30 | 30 | required_device<cpu_device> m_maincpu; |
| 31 | 31 | required_device<cpu_device> m_audiocpu; |
| 32 | 32 | required_device<gfxdecode_device> m_gfxdecode; |
| 33 | ||
| 33 | ||
| 34 | 34 | required_shared_ptr<UINT8> m_videoram; |
| 35 | ||
| 35 | ||
| 36 | 36 | tilemap_t *m_bg_tilemap; |
| 37 | 37 | UINT8 m_sound_flag; |
| 38 | 38 | UINT8 m_tile_bank; |
| 39 | ||
| 39 | ||
| 40 | 40 | DECLARE_WRITE8_MEMBER(bgram_w); |
| 41 | 41 | DECLARE_WRITE8_MEMBER(player_mux_w); |
| 42 | 42 | DECLARE_WRITE8_MEMBER(tile_banking_w); |
| r244614 | r244615 | |
| 47 | 47 | DECLARE_READ8_MEMBER(prot_r); |
| 48 | 48 | DECLARE_WRITE8_MEMBER(prot_w); |
| 49 | 49 | DECLARE_READ8_MEMBER(sound_r); |
| 50 | ||
| 50 | ||
| 51 | 51 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 52 | ||
| 52 | ||
| 53 | 53 | DECLARE_DRIVER_INIT(wink); |
| 54 | 54 | virtual void machine_start(); |
| 55 | 55 | virtual void machine_reset(); |
| 56 | 56 | virtual void video_start(); |
| 57 | ||
| 57 | ||
| 58 | 58 | UINT32 screen_update_wink(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 59 | ||
| 59 | ||
| 60 | 60 | INTERRUPT_GEN_MEMBER(wink_sound); |
| 61 | 61 | }; |
| 62 | 62 |
| r244614 | r244615 | |
|---|---|---|
| 79 | 79 | { |
| 80 | 80 | membank("bank1")->configure_entries(0, 8, memregion("user1")->base(), 0x4000); |
| 81 | 81 | membank("bank1")->set_entry(0); |
| 82 | ||
| 82 | ||
| 83 | 83 | save_item(NAME(m_status)); |
| 84 | 84 | } |
| 85 | 85 |
| r244614 | r244615 | |
|---|---|---|
| 14 | 14 | required_device<cpu_device> m_maincpu; |
| 15 | 15 | required_device<gfxdecode_device> m_gfxdecode; |
| 16 | 16 | required_device<palette_device> m_palette; |
| 17 | ||
| 17 | ||
| 18 | 18 | required_shared_ptr<UINT16> m_spriteram; |
| 19 | 19 | required_shared_ptr<UINT16> m_bgvideoram; |
| 20 | 20 | required_shared_ptr<UINT16> m_fgvideoram; |
| r244614 | r244615 | |
| 22 | 22 | |
| 23 | 23 | UINT16 m_scrollram[6]; |
| 24 | 24 | UINT16 m_layer_en; |
| 25 | ||
| 25 | ||
| 26 | 26 | tilemap_t *m_bg_tilemap; |
| 27 | 27 | tilemap_t *m_fg_tilemap; |
| 28 | 28 | tilemap_t *m_tx_tilemap; |
| r244614 | r244615 | |
| 32 | 32 | DECLARE_WRITE16_MEMBER(txvideoram_w); |
| 33 | 33 | DECLARE_WRITE16_MEMBER(layer_en_w); |
| 34 | 34 | DECLARE_WRITE16_MEMBER(layer_scroll_w); |
| 35 | ||
| 35 | ||
| 36 | 36 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 37 | 37 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 38 | 38 | TILE_GET_INFO_MEMBER(get_tx_tile_info); |
| 39 | ||
| 39 | ||
| 40 | 40 | virtual void video_start(); |
| 41 | ||
| 41 | ||
| 42 | 42 | UINT32 screen_update_bloodbro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 43 | 43 | UINT32 screen_update_weststry(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 44 | 44 | UINT32 screen_update_skysmash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| r244614 | r244615 | |
|---|---|---|
| 42 | 42 | UINT8 m_gfxmode; |
| 43 | 43 | UINT8 m_flip_x; |
| 44 | 44 | UINT8 m_flip_y; |
| 45 | ||
| 45 | ||
| 46 | 46 | DECLARE_WRITE8_MEMBER(coinlock_w); |
| 47 | 47 | DECLARE_READ8_MEMBER(mcu_port_a_r); |
| 48 | 48 | DECLARE_READ8_MEMBER(mcu_port_b_r); |
| r244614 | r244615 | |
| 57 | 57 | DECLARE_WRITE8_MEMBER(unknown_port_1_w); |
| 58 | 58 | DECLARE_WRITE8_MEMBER(unknown_port_2_w); |
| 59 | 59 | TILE_GET_INFO_MEMBER(get_tx_tile_info); |
| 60 | ||
| 60 | ||
| 61 | 61 | virtual void machine_start(); |
| 62 | 62 | virtual void machine_reset(); |
| 63 | 63 | virtual void video_start(); |
| 64 | 64 | DECLARE_PALETTE_INIT(chaknpop); |
| 65 | ||
| 65 | ||
| 66 | 66 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 67 | 67 | void tx_tilemap_mark_all_dirty(); |
| 68 | 68 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 69 | 69 | void draw_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 70 | ||
| 70 | ||
| 71 | 71 | void mcu_update_seed(UINT8 data); |
| 72 | 72 | }; |
| r244614 | r244615 | |
|---|---|---|
| 44 | 44 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 45 | 45 | void decrypt_gfx(); |
| 46 | 46 | void decrypt_snd(); |
| 47 | ||
| 47 | ||
| 48 | 48 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 49 | 49 | }; |
| r244614 | r244615 | |
|---|---|---|
| 44 | 44 | TILE_GET_INFO_MEMBER(get_fore_tile_info); |
| 45 | 45 | TILE_GET_INFO_MEMBER(get_mid_tile_info); |
| 46 | 46 | TILE_GET_INFO_MEMBER(get_text_tile_info); |
| 47 | ||
| 47 | ||
| 48 | 48 | DECLARE_DRIVER_INIT(sdgndmps); |
| 49 | 49 | virtual void video_start(); |
| 50 | ||
| 50 | ||
| 51 | 51 | UINT32 screen_update_dcon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | 52 | UINT32 screen_update_sdgndmps(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 53 | 53 | void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); |
| r244614 | r244615 | |
|---|---|---|
| 16 | 16 | required_device<cpu_device> m_cpuc; |
| 17 | 17 | required_device<gfxdecode_device> m_gfxdecode; |
| 18 | 18 | required_device<palette_device> m_palette; |
| 19 | ||
| 19 | ||
| 20 | 20 | required_shared_ptr<UINT8> m_objectram1; |
| 21 | 21 | required_shared_ptr<UINT8> m_videoram1; |
| 22 | 22 | required_shared_ptr<UINT8> m_sharedram_ac; |
| r244614 | r244615 | |
| 28 | 28 | DECLARE_WRITE8_MEMBER(cpub_bankswitch_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(coincounter_w); |
| 30 | 30 | DECLARE_WRITE8_MEMBER(cpub_reset_w); |
| 31 | ||
| 31 | ||
| 32 | 32 | virtual void machine_start(); |
| 33 | ||
| 33 | ||
| 34 | 34 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 35 | 35 | }; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | required_device<gfxdecode_device> m_gfxdecode; |
| 24 | 24 | required_device<palette_device> m_palette; |
| 25 | ||
| 25 | ||
| 26 | 26 | required_shared_ptr<UINT8> m_videoram; |
| 27 | 27 | required_shared_ptr<UINT8> m_spriteram; |
| 28 | 28 | required_shared_ptr<UINT8> m_attributesram; |
| r244614 | r244615 | |
| 37 | 37 | UINT8 m_imago_sprites[0x800*3]; |
| 38 | 38 | UINT16 m_imago_sprites_address; |
| 39 | 39 | UINT8 m_imago_sprites_bank; |
| 40 | ||
| 40 | ||
| 41 | 41 | tilemap_t *m_bg_tilemap; |
| 42 | 42 | tilemap_t *m_fg_tilemap; |
| 43 | 43 | tilemap_t *m_web_tilemap; |
| r244614 | r244615 | |
| 76 | 76 | TILE_GET_INFO_MEMBER(imago_get_tile_info_bg); |
| 77 | 77 | TILE_GET_INFO_MEMBER(imago_get_tile_info_fg); |
| 78 | 78 | TILE_GET_INFO_MEMBER(imago_get_tile_info_web); |
| 79 | ||
| 79 | ||
| 80 | 80 | INTERRUPT_GEN_MEMBER(vblank_irq); |
| 81 | 81 | INTERRUPT_GEN_MEMBER(sound_timer_irq); |
| 82 | 82 |
| r244614 | r244615 | |
|---|---|---|
| 34 | 34 | required_device<screen_device> m_screen; |
| 35 | 35 | required_device<palette_device> m_palette; |
| 36 | 36 | required_device<fuukivid_device> m_fuukivid; |
| 37 | ||
| 37 | ||
| 38 | 38 | /* memory pointers */ |
| 39 | 39 | required_shared_ptr_array<UINT16,4> m_vram; |
| 40 | 40 | required_shared_ptr<UINT16> m_vregs; |
| r244614 | r244615 | |
| 57 | 57 | DECLARE_WRITE16_MEMBER(vram_2_w); |
| 58 | 58 | DECLARE_WRITE16_MEMBER(vram_3_w); |
| 59 | 59 | DECLARE_WRITE8_MEMBER(oki_banking_w); |
| 60 | ||
| 60 | ||
| 61 | 61 | TILE_GET_INFO_MEMBER(get_tile_info_0); |
| 62 | 62 | TILE_GET_INFO_MEMBER(get_tile_info_1); |
| 63 | 63 | TILE_GET_INFO_MEMBER(get_tile_info_2); |
| 64 | 64 | TILE_GET_INFO_MEMBER(get_tile_info_3); |
| 65 | ||
| 65 | ||
| 66 | 66 | virtual void machine_start(); |
| 67 | 67 | virtual void machine_reset(); |
| 68 | 68 | virtual void video_start(); |
| 69 | ||
| 69 | ||
| 70 | 70 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 71 | 71 | inline void get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_); |
| 72 | 72 | inline void vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _N_); |
| r244614 | r244615 | |
|---|---|---|
| 38 | 38 | required_device<screen_device> m_screen; |
| 39 | 39 | required_device<palette_device> m_palette; |
| 40 | 40 | required_device<fuukivid_device> m_fuukivid; |
| 41 | ||
| 41 | ||
| 42 | 42 | /* memory pointers */ |
| 43 | 43 | required_shared_ptr_array<UINT32,4> m_vram; |
| 44 | 44 | required_shared_ptr<UINT32> m_vregs; |
| r244614 | r244615 | |
| 68 | 68 | DECLARE_WRITE32_MEMBER(vram_1_w); |
| 69 | 69 | DECLARE_WRITE32_MEMBER(vram_2_w); |
| 70 | 70 | DECLARE_WRITE32_MEMBER(vram_3_w); |
| 71 | ||
| 71 | ||
| 72 | 72 | TILE_GET_INFO_MEMBER(get_tile_info_0); |
| 73 | 73 | TILE_GET_INFO_MEMBER(get_tile_info_1); |
| 74 | 74 | TILE_GET_INFO_MEMBER(get_tile_info_2); |
| 75 | 75 | TILE_GET_INFO_MEMBER(get_tile_info_3); |
| 76 | ||
| 76 | ||
| 77 | 77 | virtual void machine_start(); |
| 78 | 78 | virtual void machine_reset(); |
| 79 | 79 | virtual void video_start(); |
| 80 | ||
| 80 | ||
| 81 | 81 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 82 | 82 | void screen_eof(screen_device &screen, bool state); |
| 83 | 83 | inline void get_tile_info8bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_); |
| r244614 | r244615 | |
|---|---|---|
| 24 | 24 | m_ram2(*this, "ram2"), |
| 25 | 25 | m_spriteram(*this, "spriteram") |
| 26 | 26 | { } |
| 27 | ||
| 27 | ||
| 28 | 28 | required_device<cpu_device> m_maincpu; |
| 29 | 29 | required_device<cpu_device> m_subcpu; |
| 30 | 30 | optional_device<kaneko16_sprite_device> m_kaneko_spr; |
| r244614 | r244615 | |
| 42 | 42 | required_shared_ptr<UINT16> m_ram; |
| 43 | 43 | required_shared_ptr<UINT16> m_ram2; |
| 44 | 44 | optional_shared_ptr<UINT16> m_spriteram; |
| 45 | ||
| 45 | ||
| 46 | 46 | UINT16 m_eeprom_word; |
| 47 | 47 | UINT16 m_old_mcu_nmi1; |
| 48 | 48 | UINT16 m_old_mcu_nmi2; |
| r244614 | r244615 | |
|---|---|---|
| 16 | 16 | m_videoram(*this, "videoram"), |
| 17 | 17 | m_colorram(*this, "colorram"), |
| 18 | 18 | m_textram(*this, "textram"), |
| 19 | m_generic_paletteram_8(*this, "paletteram") { } | |
| 20 | ||
| 19 | m_generic_paletteram_8(*this, "paletteram") { } | |
| 20 | ||
| 21 | 21 | required_device<cpu_device> m_maincpu; |
| 22 | 22 | required_device<cpu_device> m_audiocpu; |
| 23 | 23 | required_device<cpu_device> m_subcpu; |
| r244614 | r244615 | |
| 70 | 70 | DECLARE_WRITE8_MEMBER(gladiator_int_control_w); |
| 71 | 71 | DECLARE_WRITE8_MEMBER(gladiator_adpcm_w); |
| 72 | 72 | DECLARE_WRITE_LINE_MEMBER(gladiator_ym_irq); |
| 73 | ||
| 73 | ||
| 74 | 74 | // ppking specific |
| 75 | 75 | DECLARE_READ8_MEMBER(ppking_f1_r); |
| 76 | 76 | DECLARE_READ8_MEMBER(ppking_f6a3_r); |
| r244614 | r244615 | |
| 83 | 83 | DECLARE_READ8_MEMBER(ppking_qx0_r); |
| 84 | 84 | DECLARE_READ8_MEMBER(ppking_qx1_r); |
| 85 | 85 | DECLARE_WRITE8_MEMBER(ppking_video_registers_w); |
| 86 | ||
| 86 | ||
| 87 | 87 | DECLARE_DRIVER_INIT(gladiatr); |
| 88 | 88 | DECLARE_DRIVER_INIT(ppking); |
| 89 | ||
| 89 | ||
| 90 | 90 | TILE_GET_INFO_MEMBER(bg_get_tile_info); |
| 91 | 91 | TILE_GET_INFO_MEMBER(fg_get_tile_info); |
| 92 | 92 | |
| r244614 | r244615 | |
| 94 | 94 | DECLARE_VIDEO_START(ppking); |
| 95 | 95 | DECLARE_MACHINE_RESET(gladiator); |
| 96 | 96 | DECLARE_VIDEO_START(gladiatr); |
| 97 | ||
| 97 | ||
| 98 | 98 | UINT32 screen_update_ppking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 99 | 99 | UINT32 screen_update_gladiatr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 100 | 100 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| r244614 | r244615 | |
|---|---|---|
| 56 | 56 | DECLARE_WRITE8_MEMBER(ay8910_control_port_1_w); |
| 57 | 57 | DECLARE_READ8_MEMBER(fake_0_r); |
| 58 | 58 | DECLARE_READ8_MEMBER(fake_1_r); |
| 59 | ||
| 59 | ||
| 60 | 60 | // gsword specific |
| 61 | 61 | DECLARE_READ8_MEMBER(gsword_hack_r); |
| 62 | 62 | DECLARE_WRITE8_MEMBER(gsword_adpcm_data_w); |
| r244614 | r244615 | |
| 76 | 76 | UINT32 screen_update_gsword(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 77 | 77 | INTERRUPT_GEN_MEMBER(gsword_snd_interrupt); |
| 78 | 78 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 79 | int coins_in(void); //if 0'd | |
| 79 | int coins_in(void); //if 0'd | |
| 80 | 80 | }; |
| r244614 | r244615 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 39 | 39 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 40 | ||
| 40 | ||
| 41 | 41 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 42 | 42 | }; |
| r244614 | r244615 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | optional_shared_ptr<UINT16> m_spriteram; |
| 58 | 58 | optional_shared_ptr<UINT16> m_mainram; |
| 59 | ||
| 59 | ||
| 60 | 60 | UINT16 m_disp_enable; |
| 61 | 61 | |
| 62 | 62 | int m_VIEW2_2_pri; |
| r244614 | r244615 | |
|---|---|---|
| 20 | 20 | required_shared_ptr<UINT8> m_videoram; |
| 21 | 21 | required_shared_ptr<UINT8> m_spriteram; |
| 22 | 22 | optional_shared_ptr<UINT8> m_scratchram; |
| 23 | ||
| 23 | ||
| 24 | 24 | UINT8 *m_fg_gfx; /* prosoccr */ |
| 25 | 25 | UINT8 *m_charram; /* prosoccr */ |
| 26 | 26 | UINT8 m_io_ram[16]; |
| r244614 | r244615 | |
|---|---|---|
| 39 | 39 | required_device<gfxdecode_device> m_gfxdecode; |
| 40 | 40 | required_device<screen_device> m_screen; |
| 41 | 41 | required_device<palette_device> m_palette; |
| 42 | ||
| 42 | ||
| 43 | 43 | required_shared_ptr<UINT16> m_generic_paletteram_16; |
| 44 | 44 | required_shared_ptr<UINT16> m_priority_ram; |
| 45 | 45 | required_shared_ptr<UINT16> m_scrollram; |
| r244614 | r244615 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | tilemap_t *m_bg_tilemap; |
| 26 | 26 | int m_control_byte; |
| 27 | ||
| 27 | ||
| 28 | 28 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(video_control_w); |
| 30 | 30 | DECLARE_WRITE8_MEMBER(scroll_w); |
| 31 | ||
| 31 | ||
| 32 | 32 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 33 | ||
| 33 | ||
| 34 | 34 | DECLARE_DRIVER_INIT(mustache); |
| 35 | 35 | virtual void video_start(); |
| 36 | 36 | DECLARE_PALETTE_INIT(mustache); |
| 37 | ||
| 37 | ||
| 38 | 38 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 39 | 39 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 40 | ||
| 40 | ||
| 41 | 41 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 42 | 42 | }; |
| r244614 | r244615 | |
|---|---|---|
| 4 | 4 | public: |
| 5 | 5 | nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 6 | 6 | ~nb1414m4_device() {} |
| 7 | ||
| 7 | ||
| 8 | 8 | void exec(UINT16 mcu_cmd, UINT8 *vram, UINT16 &scrollx, UINT16 &scrolly, tilemap_t *tilemap); |
| 9 | 9 | |
| 10 | 10 | protected: |
| r244614 | r244615 | |
| 21 | 21 | void _0200(UINT16 mcu_cmd, UINT8 *vram); |
| 22 | 22 | void _0600(UINT8 is2p, UINT8 *vram); |
| 23 | 23 | void _0e00(UINT16 mcu_cmd, UINT8 *vram); |
| 24 | ||
| 24 | ||
| 25 | 25 | UINT8 *m_data; |
| 26 | 26 | |
| 27 | 27 | }; |
| r244614 | r244615 | |
|---|---|---|
| 38 | 38 | DECLARE_WRITE16_MEMBER(fg_tileram_w); |
| 39 | 39 | DECLARE_WRITE16_MEMBER(bg_tileram_w); |
| 40 | 40 | DECLARE_READ16_MEMBER(genix_prot_r); |
| 41 | ||
| 41 | ||
| 42 | 42 | DECLARE_CUSTOM_INPUT_MEMBER(prot_r); |
| 43 | 43 | |
| 44 | 44 | DECLARE_DRIVER_INIT(pirates); |
| r244614 | r244615 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | required_device<cpu_device> m_maincpu; |
| 15 | 15 | required_device<gfxdecode_device> m_gfxdecode; |
| 16 | ||
| 16 | ||
| 17 | 17 | required_shared_ptr<UINT16> m_scrollreg; |
| 18 | 18 | required_shared_ptr<UINT16> m_bg_videoram; |
| 19 | 19 | required_shared_ptr<UINT16> m_txt_videoram; |
| 20 | ||
| 20 | ||
| 21 | 21 | tilemap_t *m_bg_tilemap; |
| 22 | 22 | tilemap_t *m_txt_tilemap; |
| 23 | 23 | int m_bgbank; |
| 24 | 24 | int m_txtbank; |
| 25 | ||
| 25 | ||
| 26 | 26 | DECLARE_WRITE16_MEMBER(bg_videoram_w); |
| 27 | 27 | DECLARE_WRITE16_MEMBER(txt_videoram_w); |
| 28 | 28 | DECLARE_WRITE16_MEMBER(tilesbank_w); |
| 29 | ||
| 29 | ||
| 30 | 30 | TILEMAP_MAPPER_MEMBER(bg_scan); |
| 31 | 31 | TILE_GET_INFO_MEMBER(bg_tile_info); |
| 32 | 32 | TILE_GET_INFO_MEMBER(txt_tile_info); |
| 33 | ||
| 33 | ||
| 34 | 34 | virtual void video_start(); |
| 35 | ||
| 35 | ||
| 36 | 36 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 37 | 37 | }; |
| r244614 | r244615 | |
|---|---|---|
| 29 | 29 | required_device<gfxdecode_device> m_gfxdecode; |
| 30 | 30 | required_device<palette_device> m_palette; |
| 31 | 31 | required_device<buffered_spriteram16_device> m_spriteram; |
| 32 | ||
| 32 | ||
| 33 | 33 | required_shared_ptr<UINT16> m_shared_ram; |
| 34 | 34 | required_shared_ptr<UINT16> m_videoram; |
| 35 | 35 | optional_shared_ptr<UINT16> m_scroll_ram; |
| r244614 | r244615 | |
| 56 | 56 | DECLARE_DRIVER_INIT(raidenu); |
| 57 | 57 | DECLARE_DRIVER_INIT(raidenk); |
| 58 | 58 | DECLARE_DRIVER_INIT(raiden); |
| 59 | ||
| 59 | ||
| 60 | 60 | TILE_GET_INFO_MEMBER(get_back_tile_info); |
| 61 | 61 | TILE_GET_INFO_MEMBER(get_fore_tile_info); |
| 62 | 62 | TILE_GET_INFO_MEMBER(get_text_tile_info); |
| 63 | ||
| 63 | ||
| 64 | 64 | virtual void video_start(); |
| 65 | 65 | DECLARE_VIDEO_START(raidenb); |
| 66 | ||
| 66 | ||
| 67 | 67 | UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 *scrollregs); |
| 68 | 68 | UINT32 screen_update_raiden(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 69 | 69 | UINT32 screen_update_raidenb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 70 | ||
| 70 | ||
| 71 | 71 | INTERRUPT_GEN_MEMBER(raiden_interrupt); |
| 72 | ||
| 72 | ||
| 73 | 73 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_mask); |
| 74 | 74 | void common_decrypt(); |
| 75 | 75 | }; |
| r244614 | r244615 | |
|---|---|---|
| 19 | 19 | optional_device<cpu_device> m_68705; |
| 20 | 20 | required_device<gfxdecode_device> m_gfxdecode; |
| 21 | 21 | required_device<palette_device> m_palette; |
| 22 | ||
| 22 | ||
| 23 | 23 | required_shared_ptr<UINT8> m_fg_videoram; |
| 24 | 24 | required_shared_ptr<UINT8> m_sharedram; |
| 25 | 25 | required_shared_ptr<UINT8> m_bg_videoram; |
| 26 | ||
| 26 | ||
| 27 | 27 | UINT8 m_main_irq_mask; |
| 28 | 28 | UINT8 m_sub_irq_mask; |
| 29 | 29 | UINT8 m_cpu2_m6000; |
| r244614 | r244615 | |
| 78 | 78 | virtual void machine_start(); |
| 79 | 79 | virtual void video_start(); |
| 80 | 80 | DECLARE_PALETTE_INIT(retofinv); |
| 81 | ||
| 81 | ||
| 82 | 82 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 83 | 83 | void draw_sprites(bitmap_ind16 &bitmap); |
| 84 | ||
| 84 | ||
| 85 | 85 | INTERRUPT_GEN_MEMBER(main_vblank_irq); |
| 86 | 86 | INTERRUPT_GEN_MEMBER(sub_vblank_irq); |
| 87 | 87 | }; |
| r244614 | r244615 | |
|---|---|---|
| 16 | 16 | required_shared_ptr<UINT8> m_videoram; |
| 17 | 17 | required_shared_ptr<UINT8> m_colorram; |
| 18 | 18 | required_shared_ptr<UINT8> m_spriteram; |
| 19 | ||
| 19 | ||
| 20 | 20 | int m_charbank[2]; |
| 21 | 21 | int m_bkgpage; |
| 22 | 22 | int m_bkgflip; |
| r244614 | r244615 | |
| 29 | 29 | |
| 30 | 30 | UINT8 m_nmi_mask; |
| 31 | 31 | UINT8 m_sound_nmi_mask; |
| 32 | ||
| 32 | ||
| 33 | 33 | DECLARE_READ8_MEMBER(fake_d800_r); |
| 34 | 34 | DECLARE_WRITE8_MEMBER(fake_d800_w); |
| 35 | 35 | DECLARE_WRITE8_MEMBER(nmi_mask_w); |
| r244614 | r244615 | |
| 41 | 41 | DECLARE_WRITE8_MEMBER(backgroundcolor_w); |
| 42 | 42 | DECLARE_WRITE8_MEMBER(flipy_w); |
| 43 | 43 | DECLARE_WRITE8_MEMBER(flipx_w); |
| 44 | ||
| 44 | ||
| 45 | 45 | DECLARE_PALETTE_INIT(rollrace); |
| 46 | 46 | virtual void machine_start(); |
| 47 | ||
| 47 | ||
| 48 | 48 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 49 | ||
| 49 | ||
| 50 | 50 | INTERRUPT_GEN_MEMBER(vblank_irq); |
| 51 | 51 | INTERRUPT_GEN_MEMBER(sound_timer_irq); |
| 52 | 52 | }; |
| r244614 | r244615 | |
|---|---|---|
| 36 | 36 | DECLARE_WRITE8_MEMBER(palettebank_w); |
| 37 | 37 | |
| 38 | 38 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 39 | ||
| 39 | ||
| 40 | 40 | INTERRUPT_GEN_MEMBER(interrupt); |
| 41 | 41 | |
| 42 | 42 | virtual void video_start(); |
| r244614 | r244615 | |
|---|---|---|
| 38 | 38 | DECLARE_WRITE8_MEMBER(portB_w); |
| 39 | 39 | |
| 40 | 40 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 41 | ||
| 41 | ||
| 42 | 42 | INTERRUPT_GEN_MEMBER(vblank_irq); |
| 43 | 43 | |
| 44 | 44 | virtual void machine_start(); |
| r244614 | r244615 | |
| 46 | 46 | virtual void video_start(); |
| 47 | 47 | DECLARE_PALETTE_INIT(seicross); |
| 48 | 48 | DECLARE_DRIVER_INIT(friskytb); |
| 49 | ||
| 49 | ||
| 50 | 50 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 51 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 52 | ||
| 52 | ||
| 53 | 53 | void nvram_init(nvram_device &nvram, void *data, size_t size); |
| 54 | 54 | }; |
| r244614 | r244615 | |
|---|---|---|
| 59 | 59 | TILE_GET_INFO_MEMBER(get_bg1tile_info); |
| 60 | 60 | |
| 61 | 61 | virtual void video_start(); |
| 62 | ||
| 62 | ||
| 63 | 63 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 64 | 64 | |
| 65 | 65 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| r244614 | r244615 | |
|---|---|---|
| 23 | 23 | tilemap_t *m_background; |
| 24 | 24 | tilemap_t *m_foreground; |
| 25 | 25 | int m_bFlicker; |
| 26 | ||
| 26 | ||
| 27 | 27 | DECLARE_WRITE8_MEMBER(bankswitch_w); |
| 28 | 28 | DECLARE_WRITE8_MEMBER(sound_cpu_command_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(flipscreen_w); |
| r244614 | r244615 | |
| 32 | 32 | DECLARE_WRITE8_MEMBER(textram_w); |
| 33 | 33 | |
| 34 | 34 | DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); |
| 35 | ||
| 35 | ||
| 36 | 36 | DECLARE_DRIVER_INIT(shootout); |
| 37 | 37 | virtual void video_start(); |
| 38 | 38 | DECLARE_PALETTE_INIT(shootout); |
| 39 | ||
| 39 | ||
| 40 | 40 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 41 | 41 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 42 | ||
| 42 | ||
| 43 | 43 | UINT32 screen_update_shootout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 44 | 44 | UINT32 screen_update_shootouj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 45 | 45 | void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_bits ); |
| r244614 | r244615 | |
|---|---|---|
| 26 | 26 | required_shared_ptr<UINT8> m_videoram; |
| 27 | 27 | required_shared_ptr<UINT8> m_colorram; |
| 28 | 28 | required_shared_ptr<UINT8> m_spriteram; |
| 29 | ||
| 29 | ||
| 30 | 30 | tilemap_t *m_bg_tilemap; |
| 31 | 31 | const UINT8* m_prot_table[3]; |
| 32 | 32 | UINT8 m_i8751_return; |
| r244614 | r244615 | |
| 41 | 41 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 42 | 42 | DECLARE_WRITE8_MEMBER(colorram_w); |
| 43 | 43 | DECLARE_WRITE8_MEMBER(flipscreen_w); |
| 44 | ||
| 44 | ||
| 45 | 45 | DECLARE_DRIVER_INIT(sidepckt); |
| 46 | 46 | DECLARE_DRIVER_INIT(sidepcktj); |
| 47 | ||
| 47 | ||
| 48 | 48 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 49 | ||
| 49 | ||
| 50 | 50 | virtual void machine_reset(); |
| 51 | 51 | virtual void video_start(); |
| 52 | 52 | DECLARE_PALETTE_INIT(sidepckt); |
| 53 | ||
| 53 | ||
| 54 | 54 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 55 | 55 | void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); |
| 56 | 56 | }; |
| r244614 | r244615 | |
|---|---|---|
| 20 | 20 | required_device<okim6295_device> m_oki1; |
| 21 | 21 | required_device<gfxdecode_device> m_gfxdecode; |
| 22 | 22 | required_device<palette_device> m_palette; |
| 23 | ||
| 23 | ||
| 24 | 24 | required_shared_ptr<UINT32> m_generic_paletteram_32; |
| 25 | 25 | required_shared_ptr<UINT32> m_vidram; |
| 26 | 26 | required_shared_ptr<UINT32> m_vidram2; |
| 27 | 27 | required_shared_ptr<UINT32> m_vidram3; |
| 28 | 28 | required_shared_ptr<UINT32> m_sprram; |
| 29 | 29 | required_shared_ptr<UINT32> m_regs; |
| 30 | ||
| 30 | ||
| 31 | 31 | tilemap_t *m_fg_tilemap; |
| 32 | 32 | tilemap_t *m_fg2_tilemap; |
| 33 | 33 | tilemap_t *m_fg3_tilemap; |
| 34 | ||
| 34 | ||
| 35 | 35 | DECLARE_WRITE32_MEMBER(paletteram32_xRRRRRGGGGGBBBBB_dword_w); |
| 36 | 36 | DECLARE_WRITE32_MEMBER(silk_coin_counter_w); |
| 37 | 37 | DECLARE_WRITE32_MEMBER(silkroad_fgram_w); |
| 38 | 38 | DECLARE_WRITE32_MEMBER(silkroad_fgram2_w); |
| 39 | 39 | DECLARE_WRITE32_MEMBER(silkroad_fgram3_w); |
| 40 | 40 | DECLARE_WRITE32_MEMBER(silk_6295_bank_w); |
| 41 | ||
| 41 | ||
| 42 | 42 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 43 | 43 | TILE_GET_INFO_MEMBER(get_fg2_tile_info); |
| 44 | 44 | TILE_GET_INFO_MEMBER(get_fg3_tile_info); |
| 45 | ||
| 45 | ||
| 46 | 46 | virtual void video_start(); |
| 47 | ||
| 47 | ||
| 48 | 48 | UINT32 screen_update_silkroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 49 | 49 | void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 50 | 50 | }; |
| r244614 | r244615 | |
|---|---|---|
| 36 | 36 | required_device<palette_device> m_palette; |
| 37 | 37 | |
| 38 | 38 | required_shared_ptr<UINT8> m_videoram; |
| 39 | ||
| 39 | ||
| 40 | 40 | int m_nmion; |
| 41 | 41 | tilemap_t *m_bg_tilemap; |
| 42 | 42 | int m_width; |
| r244614 | r244615 | |
| 56 | 56 | DECLARE_WRITE8_MEMBER(_2000_201F_w); |
| 57 | 57 | DECLARE_WRITE8_MEMBER(sound_enable_w); |
| 58 | 58 | DECLARE_WRITE8_MEMBER(whistle_w); |
| 59 | ||
| 59 | ||
| 60 | 60 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 61 | ||
| 61 | ||
| 62 | 62 | virtual void machine_reset(); |
| 63 | 63 | virtual void video_start(); |
| 64 | 64 | DECLARE_PALETTE_INIT(skydiver); |
| 65 | ||
| 65 | ||
| 66 | 66 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 67 | 67 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 68 | ||
| 68 | ||
| 69 | 69 | INTERRUPT_GEN_MEMBER(interrupt); |
| 70 | 70 | }; |
| 71 | 71 |
| r244614 | r244615 | |
|---|---|---|
| 26 | 26 | optional_device<kaneko_pandora_device> m_pandora; |
| 27 | 27 | optional_shared_ptr<UINT16> m_hyperpac_ram; |
| 28 | 28 | optional_shared_ptr<UINT16> m_bootleg_spriteram16; |
| 29 | ||
| 29 | ||
| 30 | 30 | int m_sb3_music_is_playing; |
| 31 | 31 | int m_sb3_music; |
| 32 | 32 | UINT8 m_semicom_prot_offset; |
| r244614 | r244615 | |
| 49 | 49 | DECLARE_WRITE8_MEMBER(twinadv_oki_bank_w); |
| 50 | 50 | DECLARE_WRITE16_MEMBER(sb3_sound_w); |
| 51 | 51 | DECLARE_READ16_MEMBER(toto_read); |
| 52 | ||
| 52 | ||
| 53 | 53 | DECLARE_DRIVER_INIT(pzlbreak); |
| 54 | 54 | DECLARE_DRIVER_INIT(moremorp); |
| 55 | 55 | DECLARE_DRIVER_INIT(snowbro3); |
| r244614 | r244615 | |
| 61 | 61 | DECLARE_DRIVER_INIT(hyperpac); |
| 62 | 62 | DECLARE_MACHINE_RESET(semiprot); |
| 63 | 63 | DECLARE_MACHINE_RESET(finalttr); |
| 64 | ||
| 64 | ||
| 65 | 65 | UINT32 screen_update_snowbros(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 66 | 66 | UINT32 screen_update_honeydol(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 67 | 67 | UINT32 screen_update_twinadv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 68 | 68 | UINT32 screen_update_snowbro3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 69 | 69 | UINT32 screen_update_wintbob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 70 | 70 | void screen_eof_snowbros(screen_device &screen, bool state); |
| 71 | ||
| 71 | ||
| 72 | 72 | TIMER_DEVICE_CALLBACK_MEMBER(snowbros_irq); |
| 73 | 73 | TIMER_DEVICE_CALLBACK_MEMBER(snowbros3_irq); |
| 74 | ||
| 74 | ||
| 75 | 75 | void sb3_play_music(int data); |
| 76 | 76 | void sb3_play_sound(int data); |
| 77 | 77 | }; |
| r244614 | r244615 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | required_shared_ptr<UINT8> m_videoram; |
| 21 | 21 | required_shared_ptr<UINT8> m_colorram; |
| 22 | ||
| 22 | ||
| 23 | 23 | UINT8 m_crtc_vreg[0x100]; |
| 24 | 24 | UINT8 m_crtc_index; |
| 25 | 25 | UINT8 m_flip_scr; |
| r244614 | r244615 | |
| 27 | 27 | UINT8 m_km_status; |
| 28 | 28 | UINT8 m_coin_settings; |
| 29 | 29 | UINT8 m_coin_impulse; |
| 30 | ||
| 30 | ||
| 31 | 31 | DECLARE_READ8_MEMBER(key_matrix_r); |
| 32 | 32 | DECLARE_WRITE8_MEMBER(key_matrix_w); |
| 33 | 33 | DECLARE_READ8_MEMBER(key_matrix_status_r); |
| r244614 | r244615 | |
| 40 | 40 | virtual void machine_start(); |
| 41 | 41 | virtual void video_start(); |
| 42 | 42 | DECLARE_PALETTE_INIT(speedatk); |
| 43 | ||
| 43 | ||
| 44 | 44 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 45 | ||
| 45 | ||
| 46 | 46 | UINT8 iox_key_matrix_calc(UINT8 p_side); |
| 47 | 47 | }; |
| r244614 | r244615 | |
|---|---|---|
| 15 | 15 | m_txvideoram(*this, "txvideoram"), |
| 16 | 16 | m_fgvideoram(*this, "fgvideoram"), |
| 17 | 17 | m_bgvideoram(*this, "bgvideoram"), |
| 18 | m_spriteram(*this, "spriteram") | |
| 18 | m_spriteram(*this, "spriteram") { } | |
| 19 | 19 | |
| 20 | 20 | required_device<cpu_device> m_maincpu; |
| 21 | 21 | required_device<cpu_device> m_soundcpu; |
| r244614 | r244615 | |
| 56 | 56 | DECLARE_WRITE8_MEMBER(adpcm_start_w); |
| 57 | 57 | DECLARE_WRITE8_MEMBER(adpcm_vol_w); |
| 58 | 58 | DECLARE_WRITE_LINE_MEMBER(adpcm_int); |
| 59 | ||
| 59 | ||
| 60 | 60 | DECLARE_DRIVER_INIT(silkworm); |
| 61 | 61 | DECLARE_DRIVER_INIT(rygar); |
| 62 | 62 | DECLARE_DRIVER_INIT(backfirt); |
| 63 | 63 | DECLARE_DRIVER_INIT(gemini); |
| 64 | ||
| 64 | ||
| 65 | 65 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 66 | 66 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 67 | 67 | TILE_GET_INFO_MEMBER(gemini_get_bg_tile_info); |
| 68 | 68 | TILE_GET_INFO_MEMBER(gemini_get_fg_tile_info); |
| 69 | 69 | TILE_GET_INFO_MEMBER(get_tx_tile_info); |
| 70 | ||
| 70 | ||
| 71 | 71 | virtual void machine_start(); |
| 72 | 72 | virtual void machine_reset(); |
| 73 | 73 | virtual void video_start(); |
| 74 | ||
| 74 | ||
| 75 | 75 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 76 | 76 | void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); |
| 77 | 77 | }; |
| r244614 | r244615 | |
|---|---|---|
| 74 | 74 | DECLARE_VIDEO_START(riot); |
| 75 | 75 | |
| 76 | 76 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 77 | ||
| 77 | ||
| 78 | 78 | void save_state(); |
| 79 | 79 | }; |
| r244614 | r244615 | |
|---|---|---|
| 52 | 52 | required_shared_ptr<UINT16> m_c00000regs; |
| 53 | 53 | required_shared_ptr<UINT16> m_c80000regs; |
| 54 | 54 | required_shared_ptr<UINT16> m_880000regs; |
| 55 | ||
| 55 | ||
| 56 | 56 | int m_spritelist; |
| 57 | 57 | bitmap_ind16 m_sprite_bitmap; |
| 58 | 58 | bitmap_ind16 m_tmp_tilemap_composebitmap; |
| r244614 | r244615 | |
| 65 | 65 | UINT8 m_device_status; |
| 66 | 66 | const struct prot_data* m_device_data; |
| 67 | 67 | UINT8 m_device_value; |
| 68 | ||
| 68 | ||
| 69 | 69 | DECLARE_READ16_MEMBER(sound_r); |
| 70 | 70 | DECLARE_WRITE16_MEMBER(sound_w); |
| 71 | 71 | DECLARE_WRITE16_MEMBER(unk880000_w); |
| r244614 | r244615 | |
| 87 | 87 | DECLARE_READ16_MEMBER(eeprom_r); |
| 88 | 88 | DECLARE_WRITE16_MEMBER(eeprom_w); |
| 89 | 89 | DECLARE_WRITE_LINE_MEMBER(sound_irq); |
| 90 | ||
| 90 | ||
| 91 | 91 | DECLARE_DRIVER_INIT(tkdensha); |
| 92 | 92 | DECLARE_DRIVER_INIT(deroon); |
| 93 | 93 | DECLARE_DRIVER_INIT(tkdensho); |
| 94 | 94 | virtual void machine_start(); |
| 95 | 95 | virtual void video_start(); |
| 96 | ||
| 96 | ||
| 97 | 97 | TILE_GET_INFO_MEMBER(get_bg0tile_info); |
| 98 | 98 | TILE_GET_INFO_MEMBER(get_bg1tile_info); |
| 99 | 99 | TILE_GET_INFO_MEMBER(get_bg2tile_info); |
| r244614 | r244615 | |
|---|---|---|
| 32 | 32 | required_shared_ptr<UINT8> m_colorram; |
| 33 | 33 | required_shared_ptr<UINT8> m_videoram2; |
| 34 | 34 | required_shared_ptr<UINT8> m_spriteram; |
| 35 | ||
| 35 | ||
| 36 | 36 | int m_track0[2]; |
| 37 | 37 | int m_track1[2]; |
| 38 | 38 | int m_msm_data_offs; |
| r244614 | r244615 | |
| 42 | 42 | UINT8 m_led1; |
| 43 | 43 | tilemap_t *m_bg_tilemap; |
| 44 | 44 | tilemap_t *m_fg_tilemap; |
| 45 | ||
| 45 | ||
| 46 | 46 | DECLARE_WRITE8_MEMBER(sub_cpu_halt_w); |
| 47 | 47 | DECLARE_READ8_MEMBER(track_0_r); |
| 48 | 48 | DECLARE_READ8_MEMBER(track_1_r); |
| r244614 | r244615 | |
| 72 | 72 | DECLARE_DRIVER_INIT(teedoff); |
| 73 | 73 | virtual void machine_start(); |
| 74 | 74 | virtual void video_start(); |
| 75 | ||
| 75 | ||
| 76 | 76 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 77 | 77 | void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 led,int player); |
| 78 | 78 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| r244614 | r244615 | |
|---|---|---|
| 25 | 25 | required_shared_ptr<UINT8> m_vram_1; |
| 26 | 26 | required_shared_ptr<UINT8> m_scroll; |
| 27 | 27 | required_shared_ptr<UINT8> m_scroll2; |
| 28 | ||
| 28 | ||
| 29 | 29 | int m_nmi_enable; |
| 30 | 30 | UINT8 m_protection_command; |
| 31 | 31 | UINT8 m_protection_data; |
| r244614 | r244615 | |
| 48 | 48 | DECLARE_READ8_MEMBER(p0_r); |
| 49 | 49 | DECLARE_WRITE8_MEMBER(vram_0_w); |
| 50 | 50 | DECLARE_WRITE8_MEMBER(vram_1_w); |
| 51 | ||
| 51 | ||
| 52 | 52 | TILEMAP_MAPPER_MEMBER(tilemap_scan_rows_back); |
| 53 | 53 | TILE_GET_INFO_MEMBER(get_tile_info_0); |
| 54 | 54 | TILE_GET_INFO_MEMBER(get_tile_info_1); |
| r244614 | r244615 | |
| 60 | 60 | |
| 61 | 61 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 62 | 62 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 63 | ||
| 63 | ||
| 64 | 64 | INTERRUPT_GEN_MEMBER(mcu_irq); |
| 65 | 65 | TIMER_DEVICE_CALLBACK_MEMBER(interrupt); |
| 66 | 66 | }; |
| r244614 | r244615 | |
|---|---|---|
| 35 | 35 | m_palette(*this, "palette"), |
| 36 | 36 | m_mainbank(*this, "mainbank") |
| 37 | 37 | { } |
| 38 | ||
| 38 | ||
| 39 | 39 | /* devices */ |
| 40 | 40 | required_device<cpu_device> m_maincpu; |
| 41 | 41 | optional_device<cpu_device> m_audiocpu; |
| r244614 | r244615 | |
| 107 | 107 | DECLARE_PALETTE_INIT(arknoid2); |
| 108 | 108 | DECLARE_MACHINE_START(tnzs_common); |
| 109 | 109 | DECLARE_MACHINE_RESET(jpopnics); |
| 110 | ||
| 110 | ||
| 111 | 111 | UINT32 screen_update_tnzs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 112 | 112 | void screen_eof_tnzs(screen_device &screen, bool state); |
| 113 | ||
| 113 | ||
| 114 | 114 | INTERRUPT_GEN_MEMBER(arknoid2_interrupt); |
| 115 | 115 | TIMER_CALLBACK_MEMBER(kludge_callback); |
| 116 | ||
| 116 | ||
| 117 | 117 | void tnzs_postload(); |
| 118 | 118 | void mcu_reset(); |
| 119 | 119 | void mcu_handle_coins(int coin); |
| r244614 | r244615 | |
|---|---|---|
| 23 | 23 | required_shared_ptr<UINT8> m_videoram; |
| 24 | 24 | required_shared_ptr<UINT8> m_scrolly_lo; |
| 25 | 25 | required_shared_ptr<UINT8> m_spriteram; |
| 26 | ||
| 26 | ||
| 27 | 27 | int m_scrollx_hi; |
| 28 | 28 | int m_scrolly_hi; |
| 29 | 29 | int m_scrollx_lo; |
| r244614 | r244615 | |
| 32 | 32 | int m_bgprombank; |
| 33 | 33 | int m_spprombank; |
| 34 | 34 | tilemap_t *m_bg_tilemap; |
| 35 | ||
| 35 | ||
| 36 | 36 | DECLARE_WRITE8_MEMBER(irq_ack_w); |
| 37 | 37 | DECLARE_WRITE8_MEMBER(bankswitch_w); |
| 38 | 38 | DECLARE_WRITE8_MEMBER(cpu_sound_command_w); |
| r244614 | r244615 | |
| 40 | 40 | DECLARE_WRITE8_MEMBER(scrollx_lo_w); |
| 41 | 41 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 42 | 42 | DECLARE_WRITE8_MEMBER(attrib_w); |
| 43 | ||
| 43 | ||
| 44 | 44 | TILEMAP_MAPPER_MEMBER(background_scan); |
| 45 | 45 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 46 | ||
| 46 | ||
| 47 | 47 | virtual void machine_start(); |
| 48 | 48 | virtual void video_start(); |
| 49 | ||
| 49 | ||
| 50 | 50 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 51 | TIMER_DEVICE_CALLBACK_MEMBER(vball_scanline); |
| 52 | 52 | void bgprombank_w(int bank); |
| r244614 | r244615 | |
|---|---|---|
| 28 | 28 | m_spriteram(*this, "spriteram") |
| 29 | 29 | { } |
| 30 | 30 | |
| 31 | ||
| 31 | ||
| 32 | 32 | required_device<cpu_device> m_maincpu; |
| 33 | 33 | required_device<cpu_device> m_audiocpu; |
| 34 | 34 | required_device<gfxdecode_device> m_gfxdecode; |
| r244614 | r244615 | |
| 51 | 51 | required_shared_ptr<UINT8> m_scroll2ylo; |
| 52 | 52 | required_shared_ptr<UINT8> m_scroll2yhi; |
| 53 | 53 | required_shared_ptr<UINT8> m_spriteram; |
| 54 | ||
| 54 | ||
| 55 | 55 | tilemap_t *m_tx_tilemap; |
| 56 | 56 | tilemap_t *m_fg_tilemap; |
| 57 | 57 | tilemap_t *m_bg_tilemap; |
| r244614 | r244615 | |
| 63 | 63 | DECLARE_WRITE8_MEMBER(fgvideoram_w); |
| 64 | 64 | DECLARE_WRITE8_MEMBER(txvideoram_w); |
| 65 | 65 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 66 | ||
| 66 | ||
| 67 | 67 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 68 | 68 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 69 | 69 | TILE_GET_INFO_MEMBER(get_tx_tile_info); |
| 70 | 70 | TILE_GET_INFO_MEMBER(track_get_bg_tile_info); |
| 71 | 71 | TILE_GET_INFO_MEMBER(track_get_fg_tile_info); |
| 72 | ||
| 72 | ||
| 73 | 73 | virtual void video_start(); |
| 74 | 74 | DECLARE_VIDEO_START(wc90t); |
| 75 | ||
| 75 | ||
| 76 | 76 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 77 | 77 | }; |
| r244614 | r244615 | |
|---|---|---|
| 31 | 31 | UINT16 m_pixelpalettebank; |
| 32 | 32 | int m_scrollx; |
| 33 | 33 | int m_scrolly; |
| 34 | ||
| 34 | ||
| 35 | 35 | DECLARE_WRITE8_MEMBER(sound_bankswitch_w); |
| 36 | 36 | DECLARE_WRITE16_MEMBER(sound_command_w); |
| 37 | 37 | DECLARE_WRITE8_MEMBER(pending_command_clear_w); |
| r244614 | r244615 | |
| 40 | 40 | DECLARE_WRITE16_MEMBER(scrollreg_w); |
| 41 | 41 | DECLARE_WRITE16_MEMBER(charvideoram_w); |
| 42 | 42 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 43 | ||
| 43 | ||
| 44 | 44 | DECLARE_CUSTOM_INPUT_MEMBER(pending_sound_r); |
| 45 | ||
| 45 | ||
| 46 | 46 | DECLARE_DRIVER_INIT(quiz18k); |
| 47 | 47 | DECLARE_DRIVER_INIT(welltris); |
| 48 | 48 | virtual void machine_start(); |
| 49 | 49 | virtual void video_start(); |
| 50 | ||
| 50 | ||
| 51 | 51 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 52 | 52 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 53 | 53 | void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| r244614 | r244615 | |
|---|---|---|
| 19 | 19 | required_shared_ptr<UINT16> m_vregs; |
| 20 | 20 | required_shared_ptr<UINT16> m_spriteram; |
| 21 | 21 | required_shared_ptr<UINT16> m_shareram; |
| 22 | ||
| 22 | ||
| 23 | 23 | tilemap_t *m_pant[2]; |
| 24 | 24 | |
| 25 | 25 | DECLARE_READ8_MEMBER(dallas_share_r); |
| r244614 | r244615 | |
| 29 | 29 | DECLARE_WRITE16_MEMBER(okim6295_bankswitch_w); |
| 30 | 30 | DECLARE_WRITE16_MEMBER(wrally_coin_counter_w); |
| 31 | 31 | DECLARE_WRITE16_MEMBER(wrally_coin_lockout_w); |
| 32 | ||
| 32 | ||
| 33 | 33 | TILE_GET_INFO_MEMBER(get_tile_info_screen0); |
| 34 | 34 | TILE_GET_INFO_MEMBER(get_tile_info_screen1); |
| 35 | ||
| 35 | ||
| 36 | 36 | virtual void video_start(); |
| 37 | ||
| 37 | ||
| 38 | 38 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 39 | 39 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority); |
| 40 | 40 | }; |
| r244614 | r244615 | |
|---|---|---|
| 21 | 21 | required_shared_ptr<UINT16> m_spriteram; |
| 22 | 22 | required_shared_ptr<UINT16> m_fg0_videoram; |
| 23 | 23 | required_shared_ptr<UINT16> m_bg0_videoram; |
| 24 | ||
| 24 | ||
| 25 | 25 | int m_vblank; |
| 26 | 26 | int m_scrollx; |
| 27 | 27 | int m_scrolly; |
| 28 | 28 | tilemap_t *m_fg0_tilemap; |
| 29 | 29 | tilemap_t *m_bg0_tilemap; |
| 30 | ||
| 30 | ||
| 31 | 31 | DECLARE_WRITE16_MEMBER(scroll_w); |
| 32 | 32 | DECLARE_WRITE16_MEMBER(sound_w); |
| 33 | 33 | DECLARE_WRITE16_MEMBER(flipscreen_w); |
| 34 | 34 | DECLARE_WRITE16_MEMBER(irqack_w); |
| 35 | 35 | DECLARE_WRITE16_MEMBER(fg0_videoram_w); |
| 36 | 36 | DECLARE_WRITE16_MEMBER(bg0_videoram_w); |
| 37 | ||
| 37 | ||
| 38 | 38 | DECLARE_CUSTOM_INPUT_MEMBER(vblank_r); |
| 39 | ||
| 39 | ||
| 40 | 40 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 41 | ||
| 41 | ||
| 42 | 42 | TILE_GET_INFO_MEMBER(get_fg0_tile_info); |
| 43 | 43 | TILEMAP_MAPPER_MEMBER(bg0_scan); |
| 44 | 44 | TILE_GET_INFO_MEMBER(get_bg0_tile_info); |
| r244614 | r244615 | |
|---|---|---|
| 16 | 16 | required_device<eeprom_serial_93cxx_device> m_eeprom; |
| 17 | 17 | required_device<gfxdecode_device> m_gfxdecode; |
| 18 | 18 | required_device<palette_device> m_palette; |
| 19 | ||
| 19 | ||
| 20 | 20 | required_shared_ptr<UINT16> m_videoram; |
| 21 | 21 | required_shared_ptr<UINT16> m_spriteram; |
| 22 | ||
| 22 | ||
| 23 | 23 | tilemap_t *m_bg_tilemap; |
| 24 | ||
| 24 | ||
| 25 | 25 | DECLARE_WRITE16_MEMBER(irq2_ack_w); |
| 26 | 26 | DECLARE_WRITE16_MEMBER(irq6_ack_w); |
| 27 | 27 | DECLARE_WRITE16_MEMBER(videoram_w); |
| 28 | 28 | DECLARE_WRITE16_MEMBER(eeprom_chip_select_w); |
| 29 | 29 | DECLARE_WRITE16_MEMBER(eeprom_serial_clock_w); |
| 30 | 30 | DECLARE_WRITE16_MEMBER(eeprom_data_w); |
| 31 | ||
| 31 | ||
| 32 | 32 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 33 | ||
| 33 | ||
| 34 | 34 | DECLARE_DRIVER_INIT(xorworld); |
| 35 | 35 | virtual void video_start(); |
| 36 | 36 | DECLARE_PALETTE_INIT(xorworld); |
| 37 | ||
| 37 | ||
| 38 | 38 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 39 | 39 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 40 | 40 | }; |
| r244614 | r244615 | |
|---|---|---|
| 26 | 26 | UINT8 m_xscroll; |
| 27 | 27 | UINT8 m_yscroll; |
| 28 | 28 | UINT8 m_flipscreen; |
| 29 | ||
| 29 | ||
| 30 | 30 | DECLARE_WRITE8_MEMBER(bank_sel_w); |
| 31 | 31 | DECLARE_WRITE8_MEMBER(status_m_w); |
| 32 | 32 | DECLARE_WRITE8_MEMBER(status_s_w); |
| r244614 | r244615 | |
| 35 | 35 | DECLARE_READ8_MEMBER(bgram_r); |
| 36 | 36 | DECLARE_WRITE8_MEMBER(scroll_x_w); |
| 37 | 37 | DECLARE_WRITE8_MEMBER(scroll_y_w); |
| 38 | ||
| 38 | ||
| 39 | 39 | DECLARE_CUSTOM_INPUT_MEMBER(status_r); |
| 40 | ||
| 40 | ||
| 41 | 41 | INTERRUPT_GEN_MEMBER(interrupt_m); |
| 42 | 42 | INTERRUPT_GEN_MEMBER(interrupt_s); |
| 43 | ||
| 43 | ||
| 44 | 44 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 45 | 45 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 46 | ||
| 46 | ||
| 47 | 47 | virtual void machine_start(); |
| 48 | 48 | virtual void video_start(); |
| 49 | ||
| 49 | ||
| 50 | 50 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 51 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx); |
| 52 | 52 | }; |
| r244614 | r244615 | |
|---|---|---|
| 33 | 33 | AM_RANGE(0x00, 0x07) AM_READWRITE(gpio_r, gpio_w) |
| 34 | 34 | AM_RANGE(0x08, 0x08) AM_READWRITE(gpiodir_r, gpiodir_w) |
| 35 | 35 | AM_RANGE(0x0f, 0x0f) AM_READWRITE(adc_r, adc_w) |
| 36 | AM_RANGE(0x10, 0x10) AM_READWRITE(jvs_r, jvs_w) | |
| 36 | AM_RANGE(0x10, 0x10) AM_READWRITE(jvs_r, jvs_w) // ports 1x and 2x is standard UARTs, TODO handle it properly | |
| 37 | 37 | AM_RANGE(0x12, 0x12) AM_WRITE(jvs_dest_w) |
| 38 | 38 | AM_RANGE(0x13, 0x13) AM_WRITE(jvs_lcr_w) |
| 39 | 39 | AM_RANGE(0x15, 0x15) AM_READ(jvs_status_r) |
| r244614 | r244615 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | void nb1414m4_device::device_reset() |
| 57 | 57 | { |
| 58 | ||
| 59 | 58 | } |
| 60 | 59 | |
| 61 | 60 | /***************************************************************************** |
| r244614 | r244615 | |
| 142 | 141 | int i; |
| 143 | 142 | UINT8 first_digit; |
| 144 | 143 | UINT8 res; |
| 145 | ||
| 144 | ||
| 146 | 145 | first_digit = 0; |
| 147 | 146 | |
| 148 | 147 | for(i=0;i<6;i++) |
| r244614 | r244615 | |
|---|---|---|
| 250 | 250 | m_port_handler_1_r.resolve_safe(0); |
| 251 | 251 | m_port_handler_2_r.resolve_safe(0); |
| 252 | 252 | m_port_handler_3_r.resolve_safe(0); |
| 253 | ||
| 253 | ||
| 254 | 254 | for (int i = 0; i < 4; i++) |
| 255 | 255 | { |
| 256 | 256 | save_item(NAME(m_taito8741[i].toData), i); |
| r244614 | r244615 | |
| 360 | 360 | m_port_handler_1_r.resolve_safe(0); |
| 361 | 361 | m_port_handler_2_r.resolve_safe(0); |
| 362 | 362 | m_port_handler_3_r.resolve_safe(0); |
| 363 | ||
| 363 | ||
| 364 | 364 | for (int i = 0; i < 4; i++) |
| 365 | 365 | { |
| 366 | 366 | save_item(NAME(m_i8741[i].cmd), i); |
| r244614 | r244615 | |
| 370 | 370 | save_item(NAME(m_i8741[i].rxd), i); |
| 371 | 371 | save_item(NAME(m_i8741[i].rst), i); |
| 372 | 372 | }; |
| 373 | ||
| 373 | ||
| 374 | 374 | save_item(NAME(m_nmi_enable)); |
| 375 | 375 | } |
| 376 | 376 |
| r244614 | r244615 | |
|---|---|---|
| 639 | 639 | MACHINE_START_MEMBER(tnzs_state,tnzs_common) |
| 640 | 640 | { |
| 641 | 641 | UINT8 *SUB = memregion("sub")->base(); |
| 642 | ||
| 642 | ||
| 643 | 643 | membank("subbank")->configure_entries(0, 4, &SUB[0x08000], 0x2000); |
| 644 | 644 | membank("subbank")->set_entry(m_bank2); |
| 645 | 645 |
| r244614 | r244615 | |
|---|---|---|
| 4713 | 4713 | desertbr // 1993.?? Desert Breaker (World, FD1094) |
| 4714 | 4714 | desertbrj // 1992.10 Desert Breaker (Japan, FD1094) |
| 4715 | 4715 | pontoon |
| 4716 | hamaway | |
| 4716 | hamaway // prototype | |
| 4717 | 4717 | |
| 4718 | 4718 | // System18 Bootlegs |
| 4719 | 4719 | astormbl // BOOTLEG |
| r244614 | r244615 | |
| 4747 | 4747 | toutrun3 // 1987 (FD1094) |
| 4748 | 4748 | toutrun2 // 1987 (FD1094) |
| 4749 | 4749 | toutrun1 // 1987 (FD1094) |
| 4750 | toutrunj1 | |
| 4750 | toutrunj1 // 1987 (FD1094) | |
| 4751 | 4751 | |
| 4752 | 4752 | // X Board |
| 4753 | 4753 | aburner // 1987.07 After Burner (Japan) |
| r244614 | r244615 | |
| 5910 | 5910 | pcktgal2 // (c) 1989 Data East Corporation (World?) |
| 5911 | 5911 | pcktgal2j // (c) 1989 Data East Corporation (World?) |
| 5912 | 5912 | pokechmp // Korean hack of Pocket Gal |
| 5913 | pokechmpa | |
| 5913 | pokechmpa // | |
| 5914 | 5914 | billlist // |
| 5915 | 5915 | spool3 // (c) 1989 Data East Corporation (World?) |
| 5916 | 5916 | spool3i // (c) 1990 Data East Corporation + I-Vics license |
| r244614 | r244615 | |
| 9325 | 9325 | missw96a // (c) 1996 Comad |
| 9326 | 9326 | missw96b // (c) 1996 Comad |
| 9327 | 9327 | missmw96 // (c) 1996 Comad |
| 9328 | smissw | |
| 9328 | smissw // | |
| 9329 | 9329 | fantsia2 // (c) 1997 Comad |
| 9330 | 9330 | fantsia2a // (c) 1997 Comad |
| 9331 | 9331 | wownfant // (c) 2002 Comad |
| r244614 | r244615 | |
| 10500 | 10500 | heuksun // (c) 1998 Oksan / F2 System |
| 10501 | 10501 | bestri // (c) F2 System |
| 10502 | 10502 | silvmil // (c) 1995 Para |
| 10503 | puzzlove | |
| 10503 | puzzlove // (c) 1994 Para | |
| 10504 | 10504 | funybubl // (c) 1999 In Chang Electronic Co |
| 10505 | 10505 | funybublc // (c) 1999 Comad Industries |
| 10506 | 10506 | dcheese // (c) 1993 HAR |
| r244614 | r244615 | |
|---|---|---|
| 61 | 61 | |
| 62 | 62 | m_fg_tilemap->set_transparent_pen(15); |
| 63 | 63 | m_tx_tilemap->set_transparent_pen(15); |
| 64 | ||
| 64 | ||
| 65 | 65 | save_item(NAME(m_scrollram)); |
| 66 | 66 | save_item(NAME(m_layer_en)); |
| 67 | 67 | } |
| r244614 | r244615 | |
|---|---|---|
| 25 | 25 | PALETTE_INIT_MEMBER(chaknpop_state, chaknpop) |
| 26 | 26 | { |
| 27 | 27 | const UINT8 *color_prom = memregion("proms")->base(); |
| 28 | ||
| 28 | ||
| 29 | 29 | for (int i = 0; i < 1024; i++) |
| 30 | 30 | { |
| 31 | 31 | int col, r, g, b; |
| r244614 | r244615 | |
|---|---|---|
| 101 | 101 | m_txtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(darkmist_state::get_txttile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32 ); |
| 102 | 102 | m_fgtilemap->set_transparent_pen(0); |
| 103 | 103 | m_txtilemap->set_transparent_pen(0); |
| 104 | ||
| 104 | ||
| 105 | 105 | save_item(NAME(m_hw)); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | UINT32 darkmist_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 109 | 109 | { |
| 110 | ||
| 111 | 110 | #define DM_GETSCROLL(n) (((m_scroll[(n)]<<1)&0xff) + ((m_scroll[(n)]&0x80)?1:0) +( ((m_scroll[(n)-1]<<4) | (m_scroll[(n)-1]<<12) )&0xff00)) |
| 112 | 111 | |
| 113 | 112 | m_bgtilemap->set_scrollx(0, DM_GETSCROLL(0x2)); |
| r244614 | r244615 | |
|---|---|---|
| 106 | 106 | m_text_layer->set_transparent_pen(15); |
| 107 | 107 | |
| 108 | 108 | m_gfx_bank_select = 0; |
| 109 | ||
| 109 | ||
| 110 | 110 | save_item(NAME(m_gfx_bank_select)); |
| 111 | 111 | save_item(NAME(m_last_gfx_bank)); |
| 112 | 112 | save_item(NAME(m_scroll_ram)); |
| r244614 | r244615 | |
|---|---|---|
| 233 | 233 | { |
| 234 | 234 | sprite = spriteram[offs + 1]; |
| 235 | 235 | y = spriteram[offs]; |
| 236 | ||
| 237 | if (m_is_bootleg && (m_bootleg_type == 1)) | |
| 236 | ||
| 237 | if (m_is_bootleg && (m_bootleg_type == 1)) | |
| 238 | 238 | { |
| 239 | 239 | flash = y & 0x0400; |
| 240 | 240 | } |
| r244614 | r244615 | |
|---|---|---|
| 345 | 345 | /* web colors */ |
| 346 | 346 | m_palette->set_pen_color(256+64+0,rgb_t(0x50,0x00,0x00)); |
| 347 | 347 | m_palette->set_pen_color(256+64+1,rgb_t(0x00,0x00,0x00)); |
| 348 | ||
| 348 | ||
| 349 | 349 | save_item(NAME(m_imago_sprites)); |
| 350 | 350 | save_item(NAME(m_imago_sprites_address)); |
| 351 | 351 | save_item(NAME(m_imago_sprites_bank)); |
| r244614 | r244615 | |
| 356 | 356 | save_item(NAME(m_timer_adjusted)); |
| 357 | 357 | save_item(NAME(m_stars_colors_start)); |
| 358 | 358 | save_item(NAME(m_stars_scrollpos)); |
| 359 | ||
| 359 | ||
| 360 | 360 | for (int i = 0; i < STAR_COUNT; i++) |
| 361 | 361 | { |
| 362 | 362 | save_item(NAME(m_stars[i].x), i); |
| r244614 | r244615 | |
|---|---|---|
| 50 | 50 | m_bg_tilemap->set_scroll_cols(0x10); |
| 51 | 51 | |
| 52 | 52 | m_sprite_bank = 1; |
| 53 | ||
| 53 | ||
| 54 | 54 | save_item(NAME(m_video_attributes)); |
| 55 | 55 | save_item(NAME(m_fg_scrolly)); |
| 56 | 56 | save_item(NAME(m_sprite_buffer)); |
| r244614 | r244615 | |
| 68 | 68 | m_fg_tilemap->set_scrolldx(-0x30, 0x12f); |
| 69 | 69 | |
| 70 | 70 | m_sprite_bank = 2; |
| 71 | ||
| 71 | ||
| 72 | 72 | save_item(NAME(m_video_attributes)); |
| 73 | 73 | save_item(NAME(m_fg_scrollx)); |
| 74 | 74 | save_item(NAME(m_fg_scrolly)); |
| r244614 | r244615 | |
|---|---|---|
| 148 | 148 | { |
| 149 | 149 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(gsword_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, |
| 150 | 150 | 8, 8, 32, 64); |
| 151 | ||
| 151 | ||
| 152 | 152 | save_item(NAME(m_charbank)); |
| 153 | 153 | save_item(NAME(m_charpalbank)); |
| 154 | 154 | save_item(NAME(m_flipscreen)); |
| r244614 | r244615 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | m_bg_tilemap->set_transparent_pen(0); |
| 43 | 43 | m_fg_tilemap->set_scroll_cols(64); |
| 44 | ||
| 44 | ||
| 45 | 45 | save_item(NAME(m_videoenable)); |
| 46 | 46 | } |
| 47 | 47 |
| r244614 | r244615 | |
|---|---|---|
| 71 | 71 | m_first_sprite = auto_alloc_array(machine(), struct tempsprite, 0x400); |
| 72 | 72 | m_sprites_regs = auto_alloc_array_clear(machine(), UINT16, 0x20/2); |
| 73 | 73 | m_screen->register_screen_bitmap(m_sprites_bitmap); |
| 74 | ||
| 74 | ||
| 75 | 75 | save_item(NAME(m_sprite_flipx)); |
| 76 | 76 | save_item(NAME(m_sprite_flipy)); |
| 77 | 77 | save_pointer(NAME(m_sprites_regs), 0x20/2); |
| r244614 | r244615 | |
| 629 | 629 | // link features (assuming the bad program roms aren't the cause) it's clearly derived from this sprite system tho. |
| 630 | 630 | void kaneko16_sprite_device::bootleg_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram16, int spriteram16_bytes) |
| 631 | 631 | { |
| 632 | // | |
| 632 | // UINT16 *spriteram16 = m_spriteram; | |
| 633 | 633 | int offs; |
| 634 | 634 | int sx=0, sy=0; |
| 635 | 635 | |
| r244614 | r244615 | |
| 662 | 662 | flipx,flipy, |
| 663 | 663 | sx,sy,0); |
| 664 | 664 | } |
| 665 | } | |
| No newline at end of file | ||
| 665 | } |
| r244614 | r244615 | |
|---|---|---|
| 209 | 209 | |
| 210 | 210 | m_fg_gfx = memregion("fg_gfx")->base(); |
| 211 | 211 | m_charram = auto_alloc_array(machine(), UINT8, 0x1800 * 2); |
| 212 | ||
| 212 | ||
| 213 | 213 | save_pointer(NAME(m_charram), 0x1800 * 2); |
| 214 | 214 | save_pointer(NAME(m_fg_gfx), 0x6000); |
| 215 | 215 | } |
| r244614 | r244615 | |
|---|---|---|
| 92 | 92 | 8, 8, 64, 32); |
| 93 | 93 | |
| 94 | 94 | m_bg_tilemap->set_scroll_rows(4); |
| 95 | ||
| 95 | ||
| 96 | 96 | save_item(NAME(m_control_byte)); |
| 97 | 97 | } |
| 98 | 98 |
| r244614 | r244615 | |
|---|---|---|
| 69 | 69 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(quizpani_state::bg_tile_info),this), tilemap_mapper_delegate(FUNC(quizpani_state::bg_scan),this),16,16,256,32); |
| 70 | 70 | m_txt_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(quizpani_state::txt_tile_info),this),tilemap_mapper_delegate(FUNC(quizpani_state::bg_scan),this),16,16,256,32); |
| 71 | 71 | m_txt_tilemap->set_transparent_pen(15); |
| 72 | ||
| 72 | ||
| 73 | 73 | save_item(NAME(m_bgbank)); |
| 74 | 74 | save_item(NAME(m_txtbank)); |
| 75 | 75 | } |
| r244614 | r244615 | |
|---|---|---|
| 103 | 103 | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(retofinv_state::fg_get_tile_info),this),tilemap_mapper_delegate(FUNC(retofinv_state::tilemap_scan),this),8,8,36,28); |
| 104 | 104 | |
| 105 | 105 | m_fg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0); |
| 106 | ||
| 106 | ||
| 107 | 107 | save_item(NAME(m_fg_bank)); |
| 108 | 108 | save_item(NAME(m_bg_bank)); |
| 109 | 109 | } |
| r244614 | r244615 | |
|---|---|---|
| 119 | 119 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(scotrsht_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 120 | 120 | |
| 121 | 121 | m_bg_tilemap->set_scroll_cols(64); |
| 122 | ||
| 122 | ||
| 123 | 123 | save_item(NAME(m_irq_enable)); |
| 124 | 124 | save_item(NAME(m_charbank)); |
| 125 | 125 | save_item(NAME(m_palette_bank)); |
| r244614 | r244615 | |
|---|---|---|
| 67 | 67 | m_bg1tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_bg1tile_info),this),TILEMAP_SCAN_ROWS, 16, 16,32,32); |
| 68 | 68 | |
| 69 | 69 | m_spvideoram_old = auto_alloc_array(machine(), UINT16, m_spvideoram.bytes()/2); |
| 70 | ||
| 70 | ||
| 71 | 71 | save_item(NAME(m_video_enable)); |
| 72 | 72 | save_item(NAME(m_irqs_enable)); |
| 73 | 73 | save_item(NAME(m_raster_scanline)); |
| r244614 | r244615 | |
|---|---|---|
| 80 | 80 | m_background = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shootout_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); |
| 81 | 81 | m_foreground = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shootout_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); |
| 82 | 82 | m_foreground->set_transparent_pen(0 ); |
| 83 | ||
| 83 | ||
| 84 | 84 | save_item(NAME(m_bFlicker)); |
| 85 | 85 | } |
| 86 | 86 |
| r244614 | r244615 | |
|---|---|---|
| 52 | 52 | void skydiver_state::video_start() |
| 53 | 53 | { |
| 54 | 54 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(skydiver_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); |
| 55 | ||
| 55 | ||
| 56 | 56 | save_item(NAME(m_nmion)); |
| 57 | 57 | save_item(NAME(m_width)); |
| 58 | 58 | } |
| r244614 | r244615 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | m_bg_tilemap->set_scrolldx(-48,256+48); |
| 96 | 96 | m_fg_tilemap->set_scrolldx(-48,256+48); |
| 97 | ||
| 97 | ||
| 98 | 98 | save_item(NAME(m_fgscroll)); |
| 99 | 99 | save_item(NAME(m_bgscroll)); |
| 100 | 100 | } |
| r244614 | r244615 | |
|---|---|---|
| 82 | 82 | m_tx_tilemap->set_scrolly(0,-16); |
| 83 | 83 | m_flipscreen = 0; |
| 84 | 84 | m_game_is_riot = 0; |
| 85 | ||
| 85 | ||
| 86 | 86 | save_state(); |
| 87 | 87 | } |
| 88 | 88 | |
| r244614 | r244615 | |
| 104 | 104 | m_tx_tilemap->set_transparent_pen(0); |
| 105 | 105 | m_flipscreen = 0; |
| 106 | 106 | m_game_is_riot = 0; |
| 107 | ||
| 107 | ||
| 108 | 108 | save_state(); |
| 109 | 109 | } |
| 110 | 110 | |
| r244614 | r244615 | |
| 127 | 127 | m_tx_tilemap->set_scrolldy(-16,-16); |
| 128 | 128 | m_flipscreen = 0; |
| 129 | 129 | m_game_is_riot = 1; |
| 130 | ||
| 130 | ||
| 131 | 131 | save_state(); |
| 132 | 132 | } |
| 133 | 133 |
| r244614 | r244615 | |
|---|---|---|
| 339 | 339 | |
| 340 | 340 | m_bg2tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(tecmosys_state::get_bg2tile_info),this),TILEMAP_SCAN_ROWS,16,16,32,32); |
| 341 | 341 | m_bg2tilemap->set_transparent_pen(0); |
| 342 | ||
| 342 | ||
| 343 | 343 | save_item(NAME(m_spritelist)); |
| 344 | 344 | } |
| r244614 | r244615 | |
|---|---|---|
| 94 | 94 | 8, 8, 32, 32); |
| 95 | 95 | |
| 96 | 96 | m_fg_tilemap->set_transparent_pen(0); |
| 97 | ||
| 97 | ||
| 98 | 98 | save_item(NAME(m_scroll_x)); |
| 99 | 99 | save_item(NAME(m_led0)); |
| 100 | 100 | save_item(NAME(m_led1)); |
| r244614 | r244615 | |
|---|---|---|
| 44 | 44 | m_gfxset=0; |
| 45 | 45 | m_bgprombank=0xff; |
| 46 | 46 | m_spprombank=0xff; |
| 47 | ||
| 47 | ||
| 48 | 48 | save_item(NAME(m_scrollx_hi)); |
| 49 | 49 | save_item(NAME(m_scrolly_hi)); |
| 50 | 50 | save_item(NAME(m_scrollx_lo)); |
| r244614 | r244615 | |
|---|---|---|
| 71 | 71 | m_char_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(welltris_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 72 | 72 | |
| 73 | 73 | m_char_tilemap->set_transparent_pen(15); |
| 74 | ||
| 74 | ||
| 75 | 75 | save_item(NAME(m_gfxbank)); |
| 76 | 76 | save_item(NAME(m_charpalettebank)); |
| 77 | 77 | save_item(NAME(m_spritepalettebank)); |
| r244614 | r244615 | |
|---|---|---|
| 207 | 207 | |
| 208 | 208 | m_bg0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wwfsstar_state::get_bg0_tile_info),this),tilemap_mapper_delegate(FUNC(wwfsstar_state::bg0_scan),this), 16, 16,32,32); |
| 209 | 209 | m_fg0_tilemap->set_transparent_pen(0); |
| 210 | ||
| 210 | ||
| 211 | 211 | save_item(NAME(m_vblank)); |
| 212 | 212 | save_item(NAME(m_scrollx)); |
| 213 | 213 | save_item(NAME(m_scrolly)); |
| r244614 | r244615 | |
|---|---|---|
| 69 | 69 | m_bg_tilemap->set_scrolldx(2, 12); |
| 70 | 70 | |
| 71 | 71 | m_fg_tilemap->set_transparent_pen(0); |
| 72 | ||
| 72 | ||
| 73 | 73 | save_item(NAME(m_xscroll)); |
| 74 | 74 | save_item(NAME(m_yscroll)); |
| 75 | 75 | save_item(NAME(m_flipscreen)); |
| r244614 | r244615 | |
|---|---|---|
| 35 | 35 | void gamate_sound_device::device_start() |
| 36 | 36 | { |
| 37 | 37 | // bind callbacks |
| 38 | // | |
| 38 | // m_irq_cb.bind_relative_to(*owner()); | |
| 39 | 39 | |
| 40 | 40 | memset(m_channels, 0, sizeof(m_channels)); |
| 41 | 41 | memset(reg, 0, sizeof(reg)); |
| r244614 | r244615 | |
| 93 | 93 | m_mixer_channel->update(); |
| 94 | 94 | reg[offset] = data; |
| 95 | 95 | int chan=-1; |
| 96 | ||
| 96 | ||
| 97 | 97 | switch (offset) |
| 98 | 98 | { |
| 99 | 99 | case 0: |
| r244614 | r244615 | |
| 102 | 102 | case 3: |
| 103 | 103 | case 4: |
| 104 | 104 | case 5: |
| 105 | | |
| 105 | chan=offset/2; | |
| 106 | 106 | size = reg[chan*2] | ((reg[chan*2+1] & 0xf) << 8); |
| 107 | 107 | if (size) |
| 108 | 108 | { |
| r244614 | r244615 | |
| 117 | 117 | case 6: |
| 118 | 118 | case 7: |
| 119 | 119 | case 8: |
| 120 | chan=offset-6; | |
| 121 | // m_channels[chan]->on = data & 0x40; | |
| 122 | // channel->waveform = (data & 0x30) >> 4; | |
| 120 | chan=offset-6; | |
| 121 | // m_channels[chan]->on = data & 0x40; | |
| 122 | // channel->waveform = (data & 0x30) >> 4; | |
| 123 | 123 | m_channels[chan].volume = data & 0xf; |
| 124 | 124 | break; |
| 125 | 125 | } |
| 126 | ||
| 126 | if (chan!=-1) m_channels[chan].on=m_channels[chan].volume!=0 && m_channels[chan].size>3/* avoid speed loss for unhearable >=23khz*/; | |
| 127 | 127 | } |
| r244614 | r244615 | |
|---|---|---|
| 6 | 6 | * boards are labeled TN-16 |
| 7 | 7 | * NEC uCOM-43 MCU, labeled D553C 258 |
| 8 | 8 | * red/green VFD display with color overlay, 2-sided* |
| 9 | ||
| 9 | ||
| 10 | 10 | *Player one views the VFD from the front (grid+filament side) while the |
| 11 | 11 | opposite player views it from the back side (through the conductive traces), |
| 12 | 12 | basically a mirror-image. |
| 13 | ||
| 13 | ||
| 14 | 14 | This is a space-themed tabletop VFD electronic game. To start, simply |
| 15 | 15 | press [UP]. Hold a joystick direction to move around. |
| 16 | 16 | |
| r244614 | r244615 | |
| 42 | 42 | required_device<cpu_device> m_maincpu; |
| 43 | 43 | required_ioport_array<2> m_button_matrix; |
| 44 | 44 | required_device<speaker_sound_device> m_speaker; |
| 45 | ||
| 45 | ||
| 46 | 46 | UINT8 m_input_mux; |
| 47 | 47 | UINT32 m_plate; |
| 48 | 48 | UINT16 m_grid; |
| r244614 | r244615 | |
| 73 | 73 | // on difference, send to output |
| 74 | 74 | for (int j = 0; j < 17; j++) |
| 75 | 75 | output_set_lamp_value(i*100 + j, m_plate >> j & 1); |
| 76 | ||
| 76 | ||
| 77 | 77 | m_vfd_state[i] = m_plate; |
| 78 | 78 | } |
| 79 | 79 | } |
| r244614 | r244615 | |
| 101 | 101 | WRITE8_MEMBER(alnchase_state::display_w) |
| 102 | 102 | { |
| 103 | 103 | int shift; |
| 104 | ||
| 104 | ||
| 105 | 105 | if (offset <= NEC_UCOM4_PORTE) |
| 106 | 106 | { |
| 107 | 107 | // C/D/E0: vfd matrix grid |
| 108 | 108 | shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 109 | 109 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 110 | ||
| 110 | ||
| 111 | 111 | // C0(grid 0): input enable PL1 |
| 112 | 112 | // D0(grid 4): input enable PL2 |
| 113 | 113 | m_input_mux = (m_grid & 1) | (m_grid >> 3 & 2); |
| 114 | 114 | } |
| 115 | ||
| 115 | ||
| 116 | 116 | if (offset >= NEC_UCOM4_PORTE) |
| 117 | 117 | { |
| 118 | 118 | // E23/F/G/H/I: vfd matrix plate |
| 119 | 119 | shift = (offset - NEC_UCOM4_PORTE) * 4; |
| 120 | 120 | m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2; |
| 121 | 121 | } |
| 122 | ||
| 122 | ||
| 123 | 123 | update_vfd(); |
| 124 | 124 | } |
| 125 | 125 | |
| r244614 | r244615 | |
| 143 | 143 | |
| 144 | 144 | POWER SOUND LEVEL PLAYER |
| 145 | 145 | ON ON PRO TWO START |
| 146 | o o | | | |
| 146 | o o | | | |
| 147 | 147 | | | | | [joystick] |
| 148 | 148 | | | o o |
| 149 | 149 | OFF OFF AMA ONE GAME 0,1,2,3 |
| 150 | ||
| 150 | ||
| 151 | 151 | 1 PLAYER SIDE |
| 152 | ||
| 152 | ||
| 153 | 153 | other player side only has a joystick |
| 154 | 154 | */ |
| 155 | 155 |
| r244614 | r244615 | |
|---|---|---|
| 12 | 12 | |
| 13 | 13 | Note: |
| 14 | 14 | - VIC-4567 will be eventually be added via compile switch, once that I |
| 15 | get the hang of the system (and checking where the old code fails | |
| 15 | get the hang of the system (and checking where the old code fails | |
| 16 | 16 | eventually) |
| 17 | 17 | |
| 18 | 18 | ***************************************************************************/ |
| r244614 | r244615 | |
| 60 | 60 | UINT8 *m_iplrom; |
| 61 | 61 | UINT8 m_keyb_input[10]; |
| 62 | 62 | UINT8 m_keyb_mux; |
| 63 | ||
| 63 | ||
| 64 | 64 | DECLARE_READ8_MEMBER(vic4567_dummy_r); |
| 65 | 65 | DECLARE_WRITE8_MEMBER(vic4567_dummy_w); |
| 66 | 66 | DECLARE_WRITE8_MEMBER(PalRed_w); |
| r244614 | r244615 | |
| 74 | 74 | DECLARE_READ8_MEMBER(cia0_portb_r); |
| 75 | 75 | DECLARE_WRITE8_MEMBER(cia0_portb_w); |
| 76 | 76 | DECLARE_WRITE_LINE_MEMBER(cia0_irq); |
| 77 | ||
| 77 | ||
| 78 | 78 | DECLARE_READ8_MEMBER(dummy_r); |
| 79 | 79 | |
| 80 | 80 | // screen updates |
| r244614 | r244615 | |
| 82 | 82 | DECLARE_PALETTE_INIT(c65); |
| 83 | 83 | DECLARE_DRIVER_INIT(c65); |
| 84 | 84 | DECLARE_DRIVER_INIT(c65pal); |
| 85 | ||
| 85 | ||
| 86 | 86 | INTERRUPT_GEN_MEMBER(vic3_vblank_irq); |
| 87 | 87 | protected: |
| 88 | 88 | // driver_device overrides |
| r244614 | r244615 | |
| 124 | 124 | { |
| 125 | 125 | int y,x; |
| 126 | 126 | int border_color = m_VIC2_EXTColor & 0xf; |
| 127 | ||
| 127 | ||
| 128 | 128 | // TODO: border area |
| 129 | 129 | for(y=0;y<m_screen->height();y++) |
| 130 | 130 | { |
| r244614 | r244615 | |
| 139 | 139 | UINT8 attr = m_cram[xi+yi*80]; |
| 140 | 140 | if(attr & 0xf0) |
| 141 | 141 | attr = machine().rand() & 0xf; |
| 142 | ||
| 142 | ||
| 143 | 143 | int enable_dot = ((m_iplrom[(tile<<3)+ym+0xd000] >> xm) & 1); |
| 144 | ||
| 144 | ||
| 145 | 145 | //if(cliprect.contains(x, y)) |
| 146 | 146 | bitmap.pix16(y, x) = m_palette->pen((enable_dot) ? attr & 0xf : border_color); |
| 147 | 147 | |
| 148 | ||
| 148 | ||
| 149 | 149 | //gfx->opaque(bitmap,cliprect,tile,0,0,0,x*8,y*8); |
| 150 | 150 | } |
| 151 | 151 | } |
| r244614 | r244615 | |
| 170 | 170 | return 0xff; // silence log for now |
| 171 | 171 | case 0x19: |
| 172 | 172 | return m_VIC2_IRQPend; |
| 173 | ||
| 173 | ||
| 174 | 174 | case 0x1a: |
| 175 | 175 | return m_VIC2_IRQMask; |
| 176 | ||
| 176 | ||
| 177 | 177 | case 0x20: |
| 178 | 178 | return m_VIC2_EXTColor; |
| 179 | 179 | |
| r244614 | r244615 | |
| 182 | 182 | case 0x31: |
| 183 | 183 | return m_VIC3_ControlB; |
| 184 | 184 | } |
| 185 | ||
| 185 | ||
| 186 | 186 | if(!space.debugger_access()) |
| 187 | 187 | printf("%02x\n",offset); // TODO: PC |
| 188 | 188 | return res; |
| r244614 | r244615 | |
| 203 | 203 | case 0x20: |
| 204 | 204 | m_VIC2_EXTColor = data & 0xf; |
| 205 | 205 | break; |
| 206 | /* KEY register, handles vic-iii and vic-ii modes via two consecutive writes | |
| 206 | /* KEY register, handles vic-iii and vic-ii modes via two consecutive writes | |
| 207 | 207 | 0xa5 -> 0x96 vic-iii mode |
| 208 | ||
| 208 | any other write vic-ii mode | |
| 209 | 209 | */ |
| 210 | 210 | //case 0x2f: break; |
| 211 | case 0x30: | |
| 211 | case 0x30: | |
| 212 | 212 | if((data & 0xfe) != 0x64) |
| 213 | printf("CONTROL A %02x\n",data); | |
| 213 | printf("CONTROL A %02x\n",data); | |
| 214 | 214 | m_VIC3_ControlA = data; |
| 215 | 215 | break; |
| 216 | 216 | case 0x31: |
| 217 | printf("CONTROL B %02x\n",data); | |
| 217 | printf("CONTROL B %02x\n",data); | |
| 218 | 218 | m_VIC3_ControlB = data; |
| 219 | 219 | break; |
| 220 | 220 | default: |
| 221 | 221 | if(!space.debugger_access()) |
| 222 | printf("%02x %02x\n",offset,data); | |
| 222 | printf("%02x %02x\n",offset,data); | |
| 223 | 223 | break; |
| 224 | 224 | } |
| 225 | 225 | |
| r244614 | r244615 | |
| 365 | 365 | break; |
| 366 | 366 | } |
| 367 | 367 | } |
| 368 | ||
| 368 | ||
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | READ8_MEMBER(c65_state::cia0_porta_r) |
| 372 | 372 | { |
| 373 | ||
| 374 | 373 | return 0xff; |
| 375 | 374 | } |
| 376 | 375 | |
| r244614 | r244615 | |
| 378 | 377 | { |
| 379 | 378 | static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" }; |
| 380 | 379 | UINT8 res; |
| 381 | ||
| 380 | ||
| 382 | 381 | res = 0xff; |
| 383 | 382 | for(int i=0;i<8;i++) |
| 384 | 383 | { |
| 385 | ||
| 386 | 384 | m_keyb_input[i] = machine().root_device().ioport(c64ports[i])->read(); |
| 387 | 385 | |
| 388 | 386 | if(m_keyb_mux & 1 << (i)) |
| r244614 | r244615 | |
| 400 | 398 | |
| 401 | 399 | WRITE8_MEMBER(c65_state::cia0_portb_w) |
| 402 | 400 | { |
| 403 | ||
| 404 | 401 | } |
| 405 | 402 | |
| 406 | 403 | READ8_MEMBER(c65_state::dummy_r) |
| r244614 | r244615 | |
| 429 | 426 | // 0x0de00, 0x0de** Ext I/O Select 1 |
| 430 | 427 | // 0x0df00, 0x0df** Ext I/O Select 2 (RAM window?) |
| 431 | 428 | AM_RANGE(0x0e000, 0x0ffff) AM_ROM AM_REGION("maincpu",0x0e000) |
| 432 | AM_RANGE(0x10000, 0x1f7ff) AM_RAM | |
| 429 | AM_RANGE(0x10000, 0x1f7ff) AM_RAM | |
| 433 | 430 | AM_RANGE(0x1f800, 0x1ffff) AM_RAM // VRAM attributes |
| 434 | 431 | AM_RANGE(0x20000, 0x3ffff) AM_ROM AM_REGION("maincpu",0) |
| 435 | 432 | ADDRESS_MAP_END |
| r244614 | r244615 | |
| 534 | 531 | |
| 535 | 532 | PALETTE_INIT_MEMBER(c65_state, c65) |
| 536 | 533 | { |
| 537 | // TODO: initial state? | |
| 534 | // TODO: initial state? | |
| 538 | 535 | } |
| 539 | 536 | |
| 540 | 537 | static const gfx_layout charlayout = |
| r244614 | r244615 | |
| 556 | 553 | { |
| 557 | 554 | m_VIC2_IRQPend |= (irq_cause != 0) ? 0x80 : 0x00; |
| 558 | 555 | m_VIC2_IRQPend |= irq_cause; |
| 559 | ||
| 556 | ||
| 560 | 557 | m_maincpu->set_input_line(M4510_IRQ_LINE,m_VIC2_IRQMask & m_VIC2_IRQPend ? ASSERT_LINE : CLEAR_LINE); |
| 561 | 558 | } |
| 562 | 559 | |
| r244614 | r244615 | |
| 564 | 561 | { |
| 565 | 562 | IRQCheck(1); |
| 566 | 563 | //if(m_VIC2_IRQMask & 1) |
| 567 | // | |
| 564 | // m_maincpu->set_input_line(M4510_IRQ_LINE,HOLD_LINE); | |
| 568 | 565 | } |
| 569 | 566 | |
| 570 | 567 | WRITE_LINE_MEMBER(c65_state::cia0_irq) |
| r244614 | r244615 | |
| 577 | 574 | static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" }; |
| 578 | 575 | for(int i=0;i<8;i++) |
| 579 | 576 | m_keyb_input[i] = machine().root_device().ioport(c64ports[i])->read(); |
| 580 | } | |
| 577 | } | |
| 581 | 578 | #endif |
| 582 | // m_cia0_irq = state; | |
| 583 | // c65_irq(state || m_vicirq); | |
| 579 | // m_cia0_irq = state; | |
| 580 | // c65_irq(state || m_vicirq); | |
| 584 | 581 | } |
| 585 | 582 | |
| 586 | 583 | static MACHINE_CONFIG_START( c65, c65_state ) |
| r244614 | r244615 | |
| 600 | 597 | |
| 601 | 598 | MCFG_DEVICE_ADD("cia_1", MOS6526, MAIN_CLOCK) |
| 602 | 599 | MCFG_MOS6526_TOD(60) |
| 603 | // MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, c65_cia1_interrupt)) | |
| 604 | // MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, c65_cia1_port_a_r)) | |
| 605 | // MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(c65_state, c65_cia1_port_a_w)) | |
| 600 | // MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, c65_cia1_interrupt)) | |
| 601 | // MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, c65_cia1_port_a_r)) | |
| 602 | // MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(c65_state, c65_cia1_port_a_w)) | |
| 606 | 603 | |
| 607 | ||
| 604 | ||
| 608 | 605 | /* video hardware */ |
| 609 | 606 | MCFG_SCREEN_ADD("screen", RASTER) |
| 610 | 607 | // MCFG_SCREEN_REFRESH_RATE(60) |
| r244614 | r244615 | |
| 654 | 651 | |
| 655 | 652 | DRIVER_INIT_MEMBER(c65_state,c65) |
| 656 | 653 | { |
| 657 | // m_dma.version = 2; | |
| 658 | // c65_common_driver_init(); | |
| 654 | // m_dma.version = 2; | |
| 655 | // c65_common_driver_init(); | |
| 659 | 656 | } |
| 660 | 657 | |
| 661 | 658 | DRIVER_INIT_MEMBER(c65_state,c65pal) |
| 662 | 659 | { |
| 663 | // m_dma.version = 1; | |
| 664 | // c65_common_driver_init(); | |
| 665 | // m_pal = 1; | |
| 660 | // m_dma.version = 1; | |
| 661 | // c65_common_driver_init(); | |
| 662 | // m_pal = 1; | |
| 666 | 663 | } |
| 667 | 664 | |
| 668 | 665 | COMP( 1991, c65, 0, 0, c65, c65, c65_state, c65, "Commodore Business Machines", "Commodore 65 Development System (Prototype, NTSC)", GAME_NOT_WORKING ) |
| r244614 | r244615 | |
|---|---|---|
| 644 | 644 | |
| 645 | 645 | COMP( 1991, c65, 0, 0, c65, c65, c65_state, c65, "Commodore Business Machines", "Commodore 65 Development System (Prototype, NTSC)", GAME_NOT_WORKING ) |
| 646 | 646 | COMP( 1991, c64dx, c65, 0, c65pal, c65ger, c65_state, c65pal, "Commodore Business Machines", "Commodore 64DX Development System (Prototype, PAL, German)", GAME_NOT_WORKING ) |
| 647 | ||
| 648 |
| r244614 | r244615 | |
|---|---|---|
| 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 | ||
| 8 | ||
| 9 | 9 | known releases: |
| 10 | 10 | - Japan: Dracula House, yellow case |
| 11 | 11 | - USA: Dracula, red case |
| r244614 | r244615 | |
| 47 | 47 | |
| 48 | 48 | UINT32 m_vfd_state[0x10]; |
| 49 | 49 | void update_vfd(); |
| 50 | ||
| 50 | ||
| 51 | 51 | virtual void machine_start(); |
| 52 | 52 | }; |
| 53 | 53 | |
| r244614 | r244615 | |
| 67 | 67 | // on difference, send to output |
| 68 | 68 | for (int j = 0; j < 18; j++) |
| 69 | 69 | output_set_lamp_value(i*100 + j, m_plate >> j & 1); |
| 70 | ||
| 70 | ||
| 71 | 71 | m_vfd_state[i] = m_plate; |
| 72 | 72 | } |
| 73 | 73 | } |
| r244614 | r244615 | |
| 85 | 85 | // port C/D: vfd matrix grid |
| 86 | 86 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 87 | 87 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 88 | ||
| 88 | ||
| 89 | 89 | update_vfd(); |
| 90 | 90 | } |
| 91 | 91 | |
| r244614 | r244615 | |
| 94 | 94 | // port E/F/G/H/I01: vfd matrix plate |
| 95 | 95 | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
| 96 | 96 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 97 | ||
| 97 | ||
| 98 | 98 | update_vfd(); |
| 99 | 99 | } |
| 100 | 100 |
| r244614 | r244615 | |
|---|---|---|
| 51 | 51 | |
| 52 | 52 | struct |
| 53 | 53 | { |
| 54 | UINT8 reg[8]; | |
| 55 | struct { | |
| 56 | bool write; | |
| 57 | bool page2; // else page1 | |
| 54 | UINT8 reg[8]; | |
| 55 | struct { | |
| 56 | bool write; | |
| 57 | bool page2; // else page1 | |
| 58 | 58 | UINT8 ypos, xpos/*tennis*/; |
| 59 | UINT8 data[2][0x100][0x20]; | |
| 60 | } bitmap; | |
| 61 | UINT8 x, y; | |
| 59 | UINT8 data[2][0x100][0x20]; | |
| 60 | } bitmap; | |
| 61 | UINT8 x, y; | |
| 62 | 62 | bool y_increment; |
| 63 | 63 | } video; |
| 64 | 64 | |
| 65 | 65 | struct { |
| 66 | | |
| 66 | bool set; | |
| 67 | 67 | int bit_shifter; |
| 68 | 68 | UINT8 cartridge_byte; |
| 69 | 69 | UINT16 address; // in reality something more like short local cartridge address offset |
| 70 | 70 | bool unprotected; |
| 71 | 71 | bool failed; |
| 72 | ||
| 72 | ||
| 73 | 73 | } card_protection; |
| 74 | 74 | |
| 75 | 75 | required_device<cpu_device> m_maincpu; |
| r244614 | r244615 | |
| 80 | 80 | required_shared_ptr<UINT8> m_bios; |
| 81 | 81 | emu_timer *timer1; |
| 82 | 82 | emu_timer *timer2; |
| 83 | UINT8 bank_multi; | |
| 83 | UINT8 bank_multi; | |
| 84 | 84 | }; |
| 85 | 85 | |
| 86 | 86 | WRITE8_MEMBER( gamate_state::gamate_cart_protection_w ) |
| 87 | 87 | { |
| 88 | logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter); | |
| 89 | ||
| 88 | logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter); | |
| 89 | ||
| 90 | 90 | switch (offset) { |
| 91 | 91 | case 0: |
| 92 | 92 | card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0); |
| r244614 | r244615 | |
| 112 | 112 | } |
| 113 | 113 | ret=(card_protection.cartridge_byte&0x80)?2:0; |
| 114 | 114 | if (card_protection.bit_shifter==7 && !card_protection.failed) { // now protection chip on cartridge activates cartridge chip select on cpu accesses |
| 115 | // | |
| 115 | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working | |
| 116 | 116 | } |
| 117 | 117 | card_protection.cartridge_byte<<=1; |
| 118 | 118 | } |
| r244614 | r244615 | |
| 143 | 143 | { |
| 144 | 144 | video.reg[offset]=data; |
| 145 | 145 | switch (offset) { |
| 146 | case 1: | |
| 146 | case 1: | |
| 147 | 147 | if (data&0xf) printf("lcd mode %x\n", data); |
| 148 | 148 | video.bitmap.write=data&0xc0; // more addressing mode |
| 149 | 149 | video.y_increment=data&0x40; |
| 150 | 150 | break; |
| 151 | 151 | case 2: video.bitmap.xpos=data;break; |
| 152 | case 3: | |
| 152 | case 3: | |
| 153 | 153 | if (data>=200) printf("lcd ypos: %x\n", data); |
| 154 | 154 | video.bitmap.ypos=data; |
| 155 | 155 | break; |
| r244614 | r244615 | |
| 181 | 181 | |
| 182 | 182 | READ8_MEMBER( gamate_state::gamate_video_r ) |
| 183 | 183 | { |
| 184 | if (offset!=6) return 0; | |
| 185 | UINT8 data=0; | |
| 186 | if (video.bitmap.write) { | |
| 187 | data=video.bitmap.data[video.bitmap.page2][video.y][video.x]; | |
| 188 | } else { | |
| 189 | data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]; | |
| 190 | } | |
| 184 | if (offset!=6) return 0; | |
| 185 | UINT8 data=0; | |
| 186 | if (video.bitmap.write) { | |
| 187 | data=video.bitmap.data[video.bitmap.page2][video.y][video.x]; | |
| 188 | } else { | |
| 189 | data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]; | |
| 190 | } | |
| 191 | 191 | // if (m_maincpu->pc()<0xf000) |
| 192 | 192 | // machine().ui().popup_time(2, "lcd read x:%x y:%x mode:%x data:%x\n", video.x, video.y, video.reg[1], data); |
| 193 | ||
| 193 | return data; | |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | WRITE8_MEMBER( gamate_state::gamate_audio_w ) |
| 197 | 197 | { |
| 198 | 198 | // printf("audio write %x:%x\n", offset, data);//logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data); |
| 199 | ||
| 199 | m_sound->device_w(space, offset, data); | |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | READ8_MEMBER( gamate_state::gamate_audio_r ) |
| 203 | 203 | { |
| 204 | 204 | // legend of dragon knight |
| 205 | 205 | // machine().ui().popup_time(2, "%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset); |
| 206 | ||
| 206 | return 0; | |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | |
| 210 | 210 | READ8_MEMBER( gamate_state::gamate_pad_r ) |
| 211 | 211 | { |
| 212 | UINT8 data=m_io_joy->read(); | |
| 213 | return data; | |
| 212 | UINT8 data=m_io_joy->read(); | |
| 213 | return data; | |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state ) |
| 217 | AM_RANGE(0x0000, 0x03ff) AM_RAM | |
| 218 | AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w) | |
| 219 | AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r) | |
| 220 | AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w) | |
| 221 | AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set) | |
| 222 | AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset) | |
| 223 | AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r) | |
| 217 | AM_RANGE(0x0000, 0x03ff) AM_RAM | |
| 218 | AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w) | |
| 219 | AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r) | |
| 220 | AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w) | |
| 221 | AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set) | |
| 222 | AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset) | |
| 223 | AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r) | |
| 224 | 224 | |
| 225 | AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti") | |
| 226 | AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank") | |
| 225 | AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti") | |
| 226 | AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank") | |
| 227 | 227 | |
| 228 | 228 | AM_RANGE(0x6000, 0x6000) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w) |
| 229 | 229 | AM_RANGE(0x8000, 0x8000) AM_WRITE(cart_bankswitchmulti_w) |
| 230 | 230 | AM_RANGE(0xc000, 0xc000) AM_WRITE(cart_bankswitch_w) |
| 231 | 231 | |
| 232 | ||
| 232 | AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios") | |
| 233 | 233 | ADDRESS_MAP_END |
| 234 | 234 | |
| 235 | 235 | |
| r244614 | r244615 | |
| 254 | 254 | /* palette in red, green, blue tribles */ |
| 255 | 255 | static const unsigned char gamate_colors[4][3] = |
| 256 | 256 | { |
| 257 | { 255,255,255 }, | |
| 258 | { 0xa0, 0xa0, 0xa0 }, | |
| 259 | { 0x60, 0x60, 0x60 }, | |
| 260 | { 0, 0, 0 } | |
| 257 | { 255,255,255 }, | |
| 258 | { 0xa0, 0xa0, 0xa0 }, | |
| 259 | { 0x60, 0x60, 0x60 }, | |
| 260 | { 0, 0, 0 } | |
| 261 | 261 | }; |
| 262 | 262 | |
| 263 | 263 | PALETTE_INIT_MEMBER(gamate_state, gamate) |
| r244614 | r244615 | |
| 280 | 280 | |
| 281 | 281 | UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 282 | 282 | { |
| 283 | int x, y, j; | |
| 284 | for (y=0;y<152;y++) { | |
| 285 | for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) { | |
| 286 | UINT8 d1, d2; | |
| 287 | if (video.bitmap.ypos<200) { | |
| 283 | int x, y, j; | |
| 284 | for (y=0;y<152;y++) { | |
| 285 | for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) { | |
| 286 | UINT8 d1, d2; | |
| 287 | if (video.bitmap.ypos<200) { | |
| 288 | 288 | d1=video.bitmap.data[0][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f]; |
| 289 | 289 | d2=video.bitmap.data[1][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f]; |
| 290 | ||
| 290 | } else if ((video.bitmap.ypos&0xf)<8) { // lcdtest, of course still some registers not known, my gamate doesn't display bottom lines | |
| 291 | 291 | int yi=(y+(video.bitmap.ypos&0xf)-8); |
| 292 | 292 | if (yi<0) yi=video.bitmap.ypos+y; // in this case only 2nd plane used!?, source of first plane? |
| 293 | 293 | d1=video.bitmap.data[0][yi][(j+video.bitmap.xpos/8)&0x1f]; // value of lines bevor 0 chaos |
| 294 | 294 | d2=video.bitmap.data[1][yi][(j+video.bitmap.xpos/8)&0x1f]; |
| 295 | ||
| 295 | } else { | |
| 296 | 296 | d1=video.bitmap.data[0][y][(j+video.bitmap.xpos/8)&0x1f]; |
| 297 | d2=video.bitmap.data[1][y][(j+video.bitmap.xpos/8)&0x1f]; | |
| 298 | } | |
| 299 | BlitPlane(&bitmap.pix16(y, x+4), d1, d2); | |
| 300 | BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4); | |
| 301 | } | |
| 302 | } | |
| 303 | return 0; | |
| 297 | d2=video.bitmap.data[1][y][(j+video.bitmap.xpos/8)&0x1f]; | |
| 298 | } | |
| 299 | BlitPlane(&bitmap.pix16(y, x+4), d1, d2); | |
| 300 | BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4); | |
| 301 | } | |
| 302 | } | |
| 303 | return 0; | |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | DRIVER_INIT_MEMBER(gamate_state,gamate) |
| r244614 | r244615 | |
| 314 | 314 | void gamate_state::machine_start() |
| 315 | 315 | { |
| 316 | 316 | if (m_cart->exists()) { |
| 317 | // | |
| 317 | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); | |
| 318 | 318 | membank("bankmulti")->set_base(m_cart->get_rom_base()+1); |
| 319 | 319 | membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset |
| 320 | 320 | } |
| 321 | // | |
| 321 | // m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback | |
| 322 | 322 | card_protection.set=false; |
| 323 | 323 | bank_multi=0; |
| 324 | 324 | card_protection.unprotected=false; |
| r244614 | r244615 | |
| 378 | 378 | MCFG_SOUND_ADD("custom", GAMATE_SND, 0) |
| 379 | 379 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.50) |
| 380 | 380 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) |
| 381 | ||
| 381 | ||
| 382 | 382 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "gamate_cart") |
| 383 | 383 | MCFG_GENERIC_MANDATORY |
| 384 | 384 | |
| r244614 | r244615 | |
| 397 | 397 | |
| 398 | 398 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ |
| 399 | 399 | CONS( 19??, gamate, 0, 0, gamate, gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_IMPERFECT_SOUND) |
| 400 | ||
| 401 |
| r244614 | r244615 | |
|---|---|---|
| 405 | 405 | case 0x1a0: // I/O control register? |
| 406 | 406 | ret = m_control; // end of DMA transfer? (maybe a per-channel EOP?) Bit 6 is set during a transfer? |
| 407 | 407 | break; |
| 408 | // default: | |
| 409 | // logerror("Unknown 80186 peripheral read offset %04x mask %04x returning %04x\n",offset,mem_mask,ret); | |
| 408 | // default: | |
| 409 | // logerror("Unknown 80186 peripheral read offset %04x mask %04x returning %04x\n",offset,mem_mask,ret); | |
| 410 | 410 | } |
| 411 | 411 | return ret; |
| 412 | 412 | } |
| r244614 | r244615 | |
| 420 | 420 | { |
| 421 | 421 | UINT16 addr = (data & 0x00ff) << 8; |
| 422 | 422 | cpu_device* cpu; |
| 423 | ||
| 423 | ||
| 424 | 424 | if(m_maincpu) |
| 425 | 425 | cpu = m_maincpu; |
| 426 | 426 | else |
| r244614 | r244615 | |
| 544 | 544 | ret = m_fdc->read(space,offset); |
| 545 | 545 | m_fdc_timer->write_clk0(1); |
| 546 | 546 | m_fdc_timer->write_clk0(0); // Data register access clocks the FDC's PIT channel 0 |
| 547 | } | |
| 547 | } | |
| 548 | 548 | break; |
| 549 | 549 | case 0x08: |
| 550 | 550 | case 0x09: |
| r244614 | r244615 | |
| 706 | 706 | else |
| 707 | 707 | cpu = m_i386cpu; |
| 708 | 708 | address_space& prog_space = cpu->space(AS_PROGRAM); // get the right address space |
| 709 | ||
| 709 | ||
| 710 | 710 | if(m_dma_channel == -1) |
| 711 | 711 | return 0xff; |
| 712 | 712 | offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0xFE0000; |
| r244614 | r244615 | |
| 727 | 727 | else |
| 728 | 728 | cpu = m_i386cpu; |
| 729 | 729 | address_space& prog_space = cpu->space(AS_PROGRAM); // get the right address space |
| 730 | ||
| 730 | ||
| 731 | 731 | if(m_dma_channel == -1) |
| 732 | 732 | return; |
| 733 | 733 | offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0xFE0000; |
| r244614 | r244615 | |
| 905 | 905 | |
| 906 | 906 | // keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board) |
| 907 | 907 | MCFG_DEVICE_ADD("videouart", I8251, 0) // main clock unknown, Rx/Tx clocks are 19.53kHz |
| 908 | // | |
| 908 | // MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w)) | |
| 909 | 909 | MCFG_I8251_TXD_HANDLER(DEVWRITELINE("keyboard", rs232_port_device, write_txd)) |
| 910 | 910 | MCFG_RS232_PORT_ADD("keyboard", keyboard, "ngen") |
| 911 | 911 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE("videouart", i8251_device, write_rxd)) |
| r244614 | r244615 | |
| 919 | 919 | MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu",i80186_cpu_device,drq1_w)) |
| 920 | 920 | MCFG_WD_FDC_FORCE_READY |
| 921 | 921 | MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0) |
| 922 | MCFG_PIT8253_CLK0(0) | |
| 922 | MCFG_PIT8253_CLK0(0) | |
| 923 | 923 | MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) // clocked on FDC data register access |
| 924 | 924 | MCFG_PIT8253_CLK1(XTAL_20MHz / 20) |
| 925 | // | |
| 925 | // MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) // 1MHz | |
| 926 | 926 | MCFG_PIT8253_CLK2(XTAL_20MHz / 20) |
| 927 | // | |
| 927 | // MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) | |
| 928 | 928 | |
| 929 | 929 | // TODO: WD1010 HDC (not implemented), use WD2010 for now |
| 930 | 930 | MCFG_DEVICE_ADD("hdc", WD2010, XTAL_20MHz / 4) |
| r244614 | r244615 | |
| 1015 | 1015 | |
| 1016 | 1016 | // keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board) |
| 1017 | 1017 | MCFG_DEVICE_ADD("videouart", I8251, 0) // main clock unknown, Rx/Tx clocks are 19.53kHz |
| 1018 | // | |
| 1018 | // MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w)) | |
| 1019 | 1019 | MCFG_I8251_TXD_HANDLER(DEVWRITELINE("keyboard", rs232_port_device, write_txd)) |
| 1020 | 1020 | MCFG_RS232_PORT_ADD("keyboard", keyboard, "ngen") |
| 1021 | 1021 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE("videouart", i8251_device, write_rxd)) |
| r244614 | r244615 | |
| 1026 | 1026 | // floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each) |
| 1027 | 1027 | MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 20) |
| 1028 | 1028 | MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(ngen_state,fdc_irq_w)) |
| 1029 | // | |
| 1029 | // MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("i386cpu",i80186_cpu_device,drq1_w)) | |
| 1030 | 1030 | MCFG_WD_FDC_FORCE_READY |
| 1031 | 1031 | MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0) |
| 1032 | MCFG_PIT8253_CLK0(0) | |
| 1032 | MCFG_PIT8253_CLK0(0) | |
| 1033 | 1033 | MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) // clocked on FDC data register access |
| 1034 | 1034 | MCFG_PIT8253_CLK1(XTAL_20MHz / 20) |
| 1035 | // | |
| 1035 | // MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) // 1MHz | |
| 1036 | 1036 | MCFG_PIT8253_CLK2(XTAL_20MHz / 20) |
| 1037 | // | |
| 1037 | // MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) | |
| 1038 | 1038 | |
| 1039 | 1039 | // TODO: WD1010 HDC (not implemented), use WD2010 for now |
| 1040 | 1040 | MCFG_DEVICE_ADD("hdc", WD2010, XTAL_20MHz / 4) |
| r244614 | r244615 | |
|---|---|---|
| 886 | 886 | for(kanji_lr=0;kanji_lr<x_step;kanji_lr++) |
| 887 | 887 | { |
| 888 | 888 | /* Rori Rori Rolling definitely uses different colors for brake stop PCG elements, |
| 889 | ||
| 889 | assume that all attributes are recalculated on different strips */ | |
| 890 | 890 | attr = (m_video_ram_1[((tile_addr+kanji_lr) & 0xfff) | 0x1000] & 0xff); |
| 891 | 891 | |
| 892 | 892 | secret = (attr & 1) ^ 1; |
| r244614 | r244615 | |
| 896 | 896 | v_line = (m_video_ff[ATTRSEL_REG]) ? 0 : attr & 0x10; |
| 897 | 897 | gfx_mode = (m_video_ff[ATTRSEL_REG]) ? attr & 0x10 : 0; |
| 898 | 898 | color = (attr & 0xe0) >> 5; |
| 899 | ||
| 899 | ||
| 900 | 900 | for(yi=0;yi<lr;yi++) |
| 901 | 901 | { |
| 902 | 902 | for(xi=0;xi<8;xi++) |
| r244614 | r244615 | |
|---|---|---|
| 306 | 306 | AM_RANGE(0xf9c0, 0xf9c3) AM_DEVREADWRITE8("usart1",mc2661_device,read,write,0xffff) // UARTs |
| 307 | 307 | AM_RANGE(0xf9d0, 0xf9d3) AM_DEVREADWRITE8("usart2",mc2661_device,read,write,0xffff) |
| 308 | 308 | AM_RANGE(0xf9e0, 0xf9e3) AM_DEVREADWRITE8("usart3",mc2661_device,read,write,0xffff) |
| 309 | // | |
| 309 | // AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select) | |
| 310 | 310 | AM_RANGE(0xfb00, 0xfb01) AM_READWRITE8(detect_r, detect_w, 0xff00) // expansion card detection? |
| 311 | 311 | AM_RANGE(0xfb00, 0xffff) AM_READWRITE8(nmi_io_r, nmi_io_w, 0xffff) |
| 312 | 312 | ADDRESS_MAP_END |
| r244614 | r244615 | |
|---|---|---|
| 1098 | 1098 | UINT16 joy1 = 0, joy2 = 0, joy3 = 0, joy4 = 0; |
| 1099 | 1099 | m_ctrl1->port_poll(); |
| 1100 | 1100 | m_ctrl2->port_poll(); |
| 1101 | ||
| 1101 | ||
| 1102 | 1102 | for (int i = 0; i < 16; i++) |
| 1103 | 1103 | { |
| 1104 | 1104 | joy1 |= ((m_ctrl1->read_pin4() & 1) << (15 - i)); |
| r244614 | r244615 | |
| 1115 | 1115 | SNES_CPU_REG(JOY3H) = (joy3 & 0xff00) >> 8; |
| 1116 | 1116 | SNES_CPU_REG(JOY4L) = (joy4 & 0x00ff) >> 0; |
| 1117 | 1117 | SNES_CPU_REG(JOY4H) = (joy4 & 0xff00) >> 8; |
| 1118 | } | |
| 1118 | } | |
| 1119 | 1119 | } |
| 1120 | 1120 | |
| 1121 | 1121 | UINT8 snes_console_state::oldjoy1_read(int latched) |
| r244614 | r244615 | |
| 1160 | 1160 | x = 0; |
| 1161 | 1161 | if (x > (SNES_SCR_WIDTH - 1)) |
| 1162 | 1162 | x = SNES_SCR_WIDTH - 1; |
| 1163 | ||
| 1163 | ||
| 1164 | 1164 | if (y < 0) |
| 1165 | 1165 | y = 0; |
| 1166 | 1166 | if (y > (m_ppu->m_beam.last_visible_line - 1)) |
| 1167 | 1167 | y = m_ppu->m_beam.last_visible_line - 1; |
| 1168 | 1168 | |
| 1169 | // | |
| 1169 | // m_ppu->set_latch_hv(x, y); // it would be more accurate to write twice to WRIO register, first with bit7 = 0 and then with bit7 = 1 | |
| 1170 | 1170 | m_ppu->set_latch_hv(m_ppu->current_x(), m_ppu->current_y()); |
| 1171 | 1171 | } |
| 1172 | 1172 |
| r244614 | r244615 | |
|---|---|---|
| 203 | 203 | |
| 204 | 204 | // R9,R10: input mux |
| 205 | 205 | m_input_mux = data >> 9 & 3; |
| 206 | ||
| 206 | ||
| 207 | 207 | // R0-R7: led rows |
| 208 | 208 | m_r = data & 0xff; |
| 209 | 209 | display_update(); |
| r244614 | r244615 | |
| 216 | 216 | |
| 217 | 217 | // R2,R3: input mux |
| 218 | 218 | m_input_mux = data >> 2 & 3; |
| 219 | ||
| 219 | ||
| 220 | 220 | // R2-R10: led rows |
| 221 | 221 | m_r = data & ~3; |
| 222 | 222 | display_update(); |
| r244614 | r244615 | |
| 252 | 252 | SCORE] |
| 253 | 253 | |
| 254 | 254 | ------ led display ------ |
| 255 | ||
| 255 | ||
| 256 | 256 | [ANGLE] [AIM] [CUE UP |
| 257 | 257 | SHOOT] |
| 258 | 258 | */ |
| r244614 | r244615 | |
|---|---|---|
| 6 | 6 | * NEC uCOM-43 MCU, labeled D650C 133 |
| 7 | 7 | * 3*uPD444C 1024x4 Static CMOS SRAM |
| 8 | 8 | * board is packed with discrete components |
| 9 | ||
| 9 | ||
| 10 | 10 | x |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| r244614 | r244615 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Coleco Total Control 4 |
| 6 | 6 | * TMS1400NLL MP7334-N2 (die labeled MP7334) |
| 7 | ||
| 7 | ||
| 8 | 8 | This is a head to head electronic tabletop LED-display sports console. |
| 9 | 9 | One cartridge(Football) was included with the console, the other three were |
| 10 | 10 | sold separately. Gameplay has emphasis on strategy, read the official manual |
| 11 | 11 | on how to play. Remember that you can rotate the view in MESS: rotate left |
| 12 | 12 | for Home(P1) orientation, rotate right for Visitor(P2) orientation. |
| 13 | ||
| 13 | ||
| 14 | 14 | Cartridge socket: |
| 15 | 15 | 1 N/C |
| 16 | 16 | 2 9V+ |
| r244614 | r244615 | |
| 20 | 20 | 6 K2 |
| 21 | 21 | 7 K1 |
| 22 | 22 | 8 R9 |
| 23 | ||
| 23 | ||
| 24 | 24 | The cartridge connects pin 8 with one of the K-pins. |
| 25 | 25 | |
| 26 | 26 | Available cartridges: |
| r244614 | r244615 | |
| 166 | 166 | for (int i = 0; i < 6; i++) |
| 167 | 167 | if (m_r >> i & 1) |
| 168 | 168 | k |= m_button_matrix[i]->read(); |
| 169 | ||
| 169 | ||
| 170 | 170 | // read from cartridge |
| 171 | 171 | if (m_r & 0x200) |
| 172 | 172 | k |= m_button_matrix[6]->read(); |
| 173 | ||
| 173 | ||
| 174 | 174 | return k; |
| 175 | 175 | } |
| 176 | 176 |
| r244614 | r244615 | |
|---|---|---|
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | 5 | Texas Instruments 1st-gen. handheld speech devices, |
| 6 | ||
| 6 | ||
| 7 | 7 | These devices, mostly edu-toys, are based around an MCU(TMS0270/TMS1100), |
| 8 | 8 | TMS51xx speech, and VSM ROM(s). Newer devices, such as Speak & Music, |
| 9 | 9 | are based around the TMP50C40 and belong in another driver, probably. |
| r244614 | r244615 | |
| 246 | 246 | - CD2802: 16KB CD2357 |
| 247 | 247 | - notes: MCU is the same as in Touch & Tell, but instead of a toddler's toy, |
| 248 | 248 | you get a serious medical aid device for the voice-impaired. |
| 249 | ||
| 249 | ||
| 250 | 250 | Spelling B (US), 1978 |
| 251 | 251 | - MCU: TMC0272* |
| 252 | 252 | - ?: TMC1984* (what is this?) |
| 253 | 253 | - notes: this line of toys (Spelling B, Mr. Challenger, Math Marvel) is calculator-sized, |
| 254 | 254 | might have been aimed for older kids. Note that Math Marvel is a TMC1986, no speech. |
| 255 | ||
| 255 | ||
| 256 | 256 | Spelling B (US), newer |
| 257 | 257 | - MCU: TMC0274* |
| 258 | 258 | - TMS51xx: ?KB TMC0355 CD2602* |
| 259 | ||
| 259 | ||
| 260 | 260 | Spelling B (Germany) "Spelling ABC", 198? |
| 261 | 261 | - MCU: TMC0274* (assume same as US version) |
| 262 | 262 | - TMS51xx: ?KB TMC0355 CD2607* |
| 263 | ||
| 263 | ||
| 264 | 264 | Mr. Challenger (US), 1980 |
| 265 | 265 | - MCU: TMC0273* |
| 266 | 266 | - TMS51xx: ?KB TMC0355 CD2601* |
| r244614 | r244615 | |
|---|---|---|
| 6 | 6 | * board labeled TOMY TN-04 TENNIS |
| 7 | 7 | * NEC uCOM-44 MCU, labeled D552C 048 |
| 8 | 8 | * VFD display NEC FIP11AM15T (FIP=fluorescent indicator panel) |
| 9 | ||
| 9 | ||
| 10 | 10 | The initial release of this game was in 1979, known as Pro-Tennis, |
| 11 | 11 | it is unknown if the hardware and/or ROM contents differ. |
| 12 | 12 | |
| 13 | 13 | This is an early VFD simple electronic tennis game. Player 1 is on the right |
| 14 | 14 | side, player 2 or CPU on the left. Each player has six possible positions |
| 15 | 15 | where to hit the ball. A backdrop behind the VFD shows a tennis court. |
| 16 | ||
| 16 | ||
| 17 | 17 | NOTE!: MESS external artwork is required to be able to play |
| 18 | 18 | |
| 19 | 19 | |
| r244614 | r244615 | |
| 42 | 42 | required_device<cpu_device> m_maincpu; |
| 43 | 43 | required_ioport_array<2> m_button_matrix; |
| 44 | 44 | required_device<speaker_sound_device> m_speaker; |
| 45 | ||
| 45 | ||
| 46 | 46 | UINT8 m_input_mux; |
| 47 | 47 | UINT16 m_plate; |
| 48 | 48 | UINT16 m_grid; |
| r244614 | r244615 | |
| 88 | 88 | // on difference, send to output |
| 89 | 89 | for (int j = 0; j < 12; j++) |
| 90 | 90 | output_set_lamp_value(i*100 + j, m_plate >> j & 1); |
| 91 | ||
| 91 | ||
| 92 | 92 | m_vfd_state[i] = m_plate; |
| 93 | 93 | } |
| 94 | 94 | } |
| r244614 | r244615 | |
| 129 | 129 | if (offset == NEC_UCOM4_PORTF) offset--; |
| 130 | 130 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 131 | 131 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 132 | ||
| 132 | ||
| 133 | 133 | update_vfd(); |
| 134 | 134 | } |
| 135 | 135 | |
| r244614 | r244615 | |
| 138 | 138 | // port G/H/I: vfd matrix grid |
| 139 | 139 | int shift = (offset - NEC_UCOM4_PORTG) * 4; |
| 140 | 140 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 141 | ||
| 141 | ||
| 142 | 142 | update_vfd(); |
| 143 | 143 | } |
| 144 | 144 |
| r244614 | r244615 | |
|---|---|---|
| 62 | 62 | TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); |
| 63 | 63 | bool index_is_7segled(int index); |
| 64 | 64 | void display_update(); |
| 65 | ||
| 65 | ||
| 66 | 66 | TIMER_DEVICE_CALLBACK_MEMBER(reset_q2); |
| 67 | 67 | void write_a12(int state); |
| 68 | 68 | void sound_update(); |
| r244614 | r244615 | |
| 94 | 94 | // where xx is led column and y is led row, eg. lamp103 is output A10 D3 |
| 95 | 95 | // (note: 2 mistakes in the patent: the L19 between L12 and L14 should be L13, and L84 should of course be L48) |
| 96 | 96 | /* |
| 97 | L0 = - L10 = lamp60 L20 = lamp41 L30 = lamp53 L40 = lamp57 L50 = lamp110 | |
| 98 | L1 = lamp107 L11 = lamp50 L21 = lamp42 L31 = lamp43 L41 = lamp66 L51 = lamp111 | |
| 99 | L2 = lamp106 L12 = lamp61 L22 = lamp52 L32 = lamp54 L42 = lamp76 L52 = lamp112 | |
| 100 | L3 = lamp105 L13 = lamp71 L23 = lamp63 L33 = lamp55 L43 = lamp86 L53 = lamp113 | |
| 101 | L4 = lamp104 L14 = lamp81 L24 = lamp73 L34 = lamp117 L44 = lamp96 L60 = lamp30 | |
| 97 | L0 = - L10 = lamp60 L20 = lamp41 L30 = lamp53 L40 = lamp57 L50 = lamp110 | |
| 98 | L1 = lamp107 L11 = lamp50 L21 = lamp42 L31 = lamp43 L41 = lamp66 L51 = lamp111 | |
| 99 | L2 = lamp106 L12 = lamp61 L22 = lamp52 L32 = lamp54 L42 = lamp76 L52 = lamp112 | |
| 100 | L3 = lamp105 L13 = lamp71 L23 = lamp63 L33 = lamp55 L43 = lamp86 L53 = lamp113 | |
| 101 | L4 = lamp104 L14 = lamp81 L24 = lamp73 L34 = lamp117 L44 = lamp96 L60 = lamp30 | |
| 102 | 102 | L5 = lamp103 L15 = lamp92 L25 = lamp115 L35 = lamp75 L45 = lamp67 L61 = lamp30(!) |
| 103 | L6 = lamp102 L16 = lamp82 L26 = lamp93 L36 = lamp95 L46 = lamp77 L62 = lamp31 | |
| 103 | L6 = lamp102 L16 = lamp82 L26 = lamp93 L36 = lamp95 L46 = lamp77 L62 = lamp31 | |
| 104 | 104 | L7 = lamp101 L17 = lamp72 L27 = lamp94 L37 = lamp56 L47 = lamp87 L63 = lamp31(!) |
| 105 | L8 = lamp80 L18 = lamp114 L28 = lamp84 L38 = lamp65 L48 = lamp97 L70 = lamp33 | |
| 106 | L9 = lamp70 L19 = lamp51 L29 = lamp116 L39 = lamp85 L49 = - | |
| 105 | L8 = lamp80 L18 = lamp114 L28 = lamp84 L38 = lamp65 L48 = lamp97 L70 = lamp33 | |
| 106 | L9 = lamp70 L19 = lamp51 L29 = lamp116 L39 = lamp85 L49 = - | |
| 107 | 107 | */ |
| 108 | 108 | |
| 109 | 109 | void wildfire_state::display_update() |
| r244614 | r244615 | |
| 221 | 221 | WRITE16_MEMBER(wildfire_state::write_a) |
| 222 | 222 | { |
| 223 | 223 | data ^= 0x1fff; // active-low |
| 224 | ||
| 224 | ||
| 225 | 225 | // A12: enable speaker |
| 226 | 226 | write_a12(data >> 12 & 1); |
| 227 | 227 |
| r244614 | r244615 | |
|---|---|---|
| 14 | 14 | struct GAMATE_CHANNEL |
| 15 | 15 | { |
| 16 | 16 | GAMATE_CHANNEL() : |
| 17 | // on(0), | |
| 18 | // waveform(0), | |
| 17 | // on(0), | |
| 18 | // waveform(0), | |
| 19 | 19 | volume(0), |
| 20 | 20 | pos(0), |
| 21 | 21 | size(0) |
| 22 | // | |
| 22 | // count(0) | |
| 23 | 23 | { |
| 24 | 24 | } |
| 25 | 25 | |
| r244614 | r244615 | |
| 27 | 27 | int /*waveform,*/ volume; |
| 28 | 28 | int pos; |
| 29 | 29 | int size; |
| 30 | // | |
| 30 | // int count; | |
| 31 | 31 | }; |
| 32 | 32 | |
| 33 | 33 | |
| r244614 | r244615 | |
| 51 | 51 | DECLARE_WRITE8_MEMBER( device_w ); |
| 52 | 52 | |
| 53 | 53 | private: |
| 54 | ||
| 54 | ||
| 55 | 55 | sound_stream *m_mixer_channel; |
| 56 | 56 | GAMATE_CHANNEL m_channels[3]; |
| 57 | 57 | UINT8 reg[14]; |
| r244614 | r244615 | |
|---|---|---|
| 2918 | 2918 | |
| 2919 | 2919 | void amstrad_state::amstrad_common_init() |
| 2920 | 2920 | { |
| 2921 | // | |
| 2921 | // address_space &space = m_maincpu->space(AS_PROGRAM); | |
| 2922 | 2922 | |
| 2923 | 2923 | m_aleste_mode = 0; |
| 2924 | 2924 | |
| r244614 | r244615 | |
| 2928 | 2928 | m_GateArray_RamConfiguration = 0; |
| 2929 | 2929 | m_gate_array.hsync_counter = 2; |
| 2930 | 2930 | |
| 2931 | /* space.install_read_bank(0x0000, 0x1fff, "bank1"); | |
| 2932 | space.install_read_bank(0x2000, 0x3fff, "bank2"); | |
| 2931 | /* space.install_read_bank(0x0000, 0x1fff, "bank1"); | |
| 2932 | space.install_read_bank(0x2000, 0x3fff, "bank2"); | |
| 2933 | 2933 | |
| 2934 | space.install_read_bank(0x4000, 0x5fff, "bank3"); | |
| 2935 | space.install_read_bank(0x6000, 0x7fff, "bank4"); | |
| 2934 | space.install_read_bank(0x4000, 0x5fff, "bank3"); | |
| 2935 | space.install_read_bank(0x6000, 0x7fff, "bank4"); | |
| 2936 | 2936 | |
| 2937 | space.install_read_bank(0x8000, 0x9fff, "bank5"); | |
| 2938 | space.install_read_bank(0xa000, 0xbfff, "bank6"); | |
| 2937 | space.install_read_bank(0x8000, 0x9fff, "bank5"); | |
| 2938 | space.install_read_bank(0xa000, 0xbfff, "bank6"); | |
| 2939 | 2939 | |
| 2940 | space.install_read_bank(0xc000, 0xdfff, "bank7"); | |
| 2941 | space.install_read_bank(0xe000, 0xffff, "bank8"); | |
| 2940 | space.install_read_bank(0xc000, 0xdfff, "bank7"); | |
| 2941 | space.install_read_bank(0xe000, 0xffff, "bank8"); | |
| 2942 | 2942 | |
| 2943 | space.install_write_bank(0x0000, 0x1fff, "bank9"); | |
| 2944 | space.install_write_bank(0x2000, 0x3fff, "bank10"); | |
| 2943 | space.install_write_bank(0x0000, 0x1fff, "bank9"); | |
| 2944 | space.install_write_bank(0x2000, 0x3fff, "bank10"); | |
| 2945 | 2945 | |
| 2946 | space.install_write_bank(0x4000, 0x5fff, "bank11"); | |
| 2947 | space.install_write_bank(0x6000, 0x7fff, "bank12"); | |
| 2946 | space.install_write_bank(0x4000, 0x5fff, "bank11"); | |
| 2947 | space.install_write_bank(0x6000, 0x7fff, "bank12"); | |
| 2948 | 2948 | |
| 2949 | space.install_write_bank(0x8000, 0x9fff, "bank13"); | |
| 2950 | space.install_write_bank(0xa000, 0xbfff, "bank14"); | |
| 2949 | space.install_write_bank(0x8000, 0x9fff, "bank13"); | |
| 2950 | space.install_write_bank(0xa000, 0xbfff, "bank14"); | |
| 2951 | 2951 | |
| 2952 | space.install_write_bank(0xc000, 0xdfff, "bank15"); | |
| 2953 | space.install_write_bank(0xe000, 0xffff, "bank16"); | |
| 2952 | space.install_write_bank(0xc000, 0xdfff, "bank15"); | |
| 2953 | space.install_write_bank(0xe000, 0xffff, "bank16"); | |
| 2954 | 2954 | */ |
| 2955 | 2955 | enumerate_roms(); |
| 2956 | 2956 |
| r244614 | r244615 | |
|---|---|---|
| 248 | 248 | apple3_write_charmem(); |
| 249 | 249 | break; |
| 250 | 250 | |
| 251 | case 0xE0: case 0xE1: | |
| 251 | case 0xE0: case 0xE1: | |
| 252 | 252 | result = m_fdc->read(space, offset&0xf); |
| 253 | 253 | m_va = offset & 1; |
| 254 | 254 | break; |
| r244614 | r244615 | |
| 258 | 258 | m_vb = offset & 1; |
| 259 | 259 | break; |
| 260 | 260 | |
| 261 | case 0xE4: case 0xE5: | |
| 261 | case 0xE4: case 0xE5: | |
| 262 | 262 | result = m_fdc->read(space, offset&0xf); |
| 263 | 263 | m_vc = offset & 1; |
| 264 | 264 | break; |
| 265 | 265 | |
| 266 | case 0xE6: case 0xE7: case 0xE8: case 0xE9: | |
| 267 | case 0xEA: case 0xEB: case 0xEC: case 0xED: | |
| 266 | case 0xE6: case 0xE7: case 0xE8: case 0xE9: | |
| 267 | case 0xEA: case 0xEB: case 0xEC: case 0xED: | |
| 268 | 268 | case 0xEE: case 0xEF: |
| 269 | 269 | result = m_fdc->read(space, offset&0xf); |
| 270 | 270 | break; |
| r244614 | r244615 | |
| 1297 | 1297 | m_maincpu->set_input_line(INPUT_LINE_NMI, state); |
| 1298 | 1298 | } |
| 1299 | 1299 | } |
| 1300 |
| r244614 | r244615 | |
|---|---|---|
| 106 | 106 | READ8_MEMBER(beta_disk_device::state_r) |
| 107 | 107 | { |
| 108 | 108 | if (m_betadisk_active==1) { |
| 109 | UINT8 result = 0x3F; | |
| 109 | UINT8 result = 0x3F; // actually open bus | |
| 110 | 110 | result |= m_wd179x->drq_r() ? 0x40 : 0; |
| 111 | 111 | result |= m_wd179x->intrq_r() ? 0x80 : 0; |
| 112 | 112 | return result; |
| r244614 | r244615 | |
| 181 | 181 | SLOT_INTERFACE_END |
| 182 | 182 | |
| 183 | 183 | static MACHINE_CONFIG_FRAGMENT( beta_disk ) |
| 184 | MCFG_WD2793x_ADD("wd179x", XTAL_8MHz / 8) | |
| 184 | MCFG_WD2793x_ADD("wd179x", XTAL_8MHz / 8) // KR1818VG93 clone of WD1793 | |
| 185 | 185 | MCFG_FLOPPY_DRIVE_ADD("wd179x:0", beta_disk_floppies, "drive0", beta_disk_device::floppy_formats) |
| 186 | 186 | MCFG_FLOPPY_DRIVE_ADD("wd179x:1", beta_disk_floppies, "drive1", beta_disk_device::floppy_formats) |
| 187 | 187 | MCFG_FLOPPY_DRIVE_ADD("wd179x:2", beta_disk_floppies, "drive2", beta_disk_device::floppy_formats) |
| r244614 | r244615 | |
|---|---|---|
| 1335 | 1335 | value &= ~ioport("FUNCT")->read(); |
| 1336 | 1336 | m_keyline = value; |
| 1337 | 1337 | } |
| 1338 |
| r244614 | r244615 | |
|---|---|---|
| 28 | 28 | $(MESS_WINOBJ)/%.res: $(MESS_WINSRC)/%.rc |
| 29 | 29 | @echo Compiling resources $<... |
| 30 | 30 | $(RC) $(RCDEFS) $(RCFLAGS) --include-dir $(MESS_WINOBJ) -o $@ -i $< |
| 31 | ||
| 32 | 31 | |
| 32 | ||
| 33 | 33 | #------------------------------------------------- |
| 34 | 34 | # rules for resource file |
| 35 | 35 | #------------------------------------------------- |
| r244614 | r244615 | |
|---|---|---|
| 482 | 482 | |
| 483 | 483 | UINT32 apple3_state::screen_update_apple3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 484 | 484 | { |
| 485 | // | |
| 485 | // printf("gfx mode %x\n", m_flags & (VAR_VM3|VAR_VM1|VAR_VM0)); | |
| 486 | 486 | |
| 487 | 487 | switch(m_flags & (VAR_VM3|VAR_VM1|VAR_VM0)) |
| 488 | 488 | { |
| r244614 | r244615 | |
|---|---|---|
| 73 | 73 | private: |
| 74 | 74 | template <typename T> T *create_window(); |
| 75 | 75 | |
| 76 | running_machine *m_machine; | |
| 77 | auto_pointer<ui_metrics> m_metrics; | |
| 78 | bool m_waiting_for_debugger; | |
| 79 | simple_list<debugwin_info> m_window_list; | |
| 80 | consolewin_info *m_main_console; | |
| 76 | running_machine *m_machine; | |
| 77 | auto_pointer<ui_metrics> m_metrics; | |
| 78 | bool m_waiting_for_debugger; | |
| 79 | simple_list<debugwin_info> m_window_list; | |
| 80 | consolewin_info *m_main_console; | |
| 81 | 81 | }; |
| 82 | 82 | |
| 83 | 83 | |
| r244614 | r244615 | |
| 207 | 207 | int const vkey = wininput_vkey_for_mame_code(code); |
| 208 | 208 | bool const pressed = (vkey != 0) && ((GetAsyncKeyState(vkey) & 0x8000) != 0); |
| 209 | 209 | |
| 210 | if (first) | |
| 210 | if (first) // if this is the first in the sequence, result is set equal | |
| 211 | 211 | result = pressed ^ invert; |
| 212 | else if (result) | |
| 212 | else if (result) // further values are ANDed | |
| 213 | 213 | result = result && (pressed ^ invert); |
| 214 | 214 | |
| 215 | 215 | // no longer first, and clear the invert flag |
| r244614 | r244615 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | @interface MAMEDebugCommandHistory : NSObject |
| 18 | 18 | { |
| 19 | NSInteger length, position; | |
| 20 | NSString *current; | |
| 21 | NSMutableArray *history; | |
| 19 | NSInteger length, position; | |
| 20 | NSString *current; | |
| 21 | NSMutableArray *history; | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | + (NSInteger)defaultLength; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | @interface MAMEDebugConsole : MAMEDebugWindowHandler <NSTextFieldDelegate, NSSplitViewDelegate> |
| 24 | 24 | { |
| 25 | MAMEDebugCommandHistory *history; | |
| 26 | NSMutableArray *auxiliaryWindows; | |
| 25 | MAMEDebugCommandHistory *history; | |
| 26 | NSMutableArray *auxiliaryWindows; | |
| 27 | 27 | |
| 28 | MAMERegistersView *regView; | |
| 29 | MAMEDisassemblyView *dasmView; | |
| 30 | MAMEDebugView *consoleView; | |
| 31 | NSTextField *commandField; | |
| 28 | MAMERegistersView *regView; | |
| 29 | MAMEDisassemblyView *dasmView; | |
| 30 | MAMEDebugView *consoleView; | |
| 31 | NSTextField *commandField; | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | - (id)initWithMachine:(running_machine &)m; |
| r244614 | r244615 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | @interface MAMEDebugView : NSView |
| 21 | 21 | { |
| 22 | int type; | |
| 23 | running_machine *machine; | |
| 24 | debug_view *view; | |
| 25 | BOOL wholeLineScroll; | |
| 22 | int type; | |
| 23 | running_machine *machine; | |
| 24 | debug_view *view; | |
| 25 | BOOL wholeLineScroll; | |
| 26 | 26 | |
| 27 | INT32 | |
| 27 | INT32 totalWidth, totalHeight, originTop; | |
| 28 | 28 | |
| 29 | NSFont *font; | |
| 30 | CGFloat fontWidth, fontHeight, fontAscent; | |
| 29 | NSFont *font; | |
| 30 | CGFloat fontWidth, fontHeight, fontAscent; | |
| 31 | 31 | |
| 32 | NSTextStorage *text; | |
| 33 | NSTextContainer *textContainer; | |
| 34 | NSLayoutManager *layoutManager; | |
| 32 | NSTextStorage *text; | |
| 33 | NSTextContainer *textContainer; | |
| 34 | NSLayoutManager *layoutManager; | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | + (NSFont *)defaultFont; |
| r244614 | r244615 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | @interface MAMEDebugWindowHandler : NSObject <NSWindowDelegate> |
| 30 | 30 | { |
| 31 | NSWindow *window; | |
| 32 | running_machine *machine; | |
| 31 | NSWindow *window; | |
| 32 | running_machine *machine; | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | + (void)addCommonActionItems:(NSMenu *)menu; |
| r244614 | r244615 | |
| 64 | 64 | |
| 65 | 65 | @interface MAMEAuxiliaryDebugWindowHandler : MAMEDebugWindowHandler |
| 66 | 66 | { |
| 67 | MAMEDebugConsole | |
| 67 | MAMEDebugConsole *console; | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | + (void)cascadeWindow:(NSWindow *)window; |
| r244614 | r244615 | |
| 86 | 86 | |
| 87 | 87 | @interface MAMEExpressionAuxiliaryDebugWindowHandler : MAMEAuxiliaryDebugWindowHandler <NSTextFieldDelegate> |
| 88 | 88 | { |
| 89 | MAMEDebugCommandHistory *history; | |
| 90 | NSTextField *expressionField; | |
| 89 | MAMEDebugCommandHistory *history; | |
| 90 | NSTextField *expressionField; | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | - (id)initWithMachine:(running_machine &)m title:(NSString *)t console:(MAMEDebugConsole *)c; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | @interface MAMEDeviceInfoViewer : MAMEAuxiliaryDebugWindowHandler |
| 24 | 24 | { |
| 25 | device_t | |
| 25 | device_t *device; | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | - (id)initWithDevice:(device_t &)d machine:(running_machine &)m console:(MAMEDebugConsole *)c; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | @interface MAMEDevicesViewer : MAMEAuxiliaryDebugWindowHandler <NSOutlineViewDataSource> |
| 24 | 24 | { |
| 25 | MAMEDeviceWrapper *root; | |
| 26 | NSOutlineView *devicesView; | |
| 25 | MAMEDeviceWrapper *root; | |
| 26 | NSOutlineView *devicesView; | |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | @interface MAMEDisassemblyViewer : MAMEExpressionAuxiliaryDebugWindowHandler |
| 24 | 24 | { |
| 25 | MAMEDisassemblyView *dasmView; | |
| 26 | NSPopUpButton *subviewButton; | |
| 25 | MAMEDisassemblyView *dasmView; | |
| 26 | NSPopUpButton *subviewButton; | |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | @interface MAMEErrorLogViewer : MAMEAuxiliaryDebugWindowHandler |
| 24 | 24 | { |
| 25 | MAMEErrorLogView | |
| 25 | MAMEErrorLogView *logView; | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | @interface MAMEMemoryViewer : MAMEExpressionAuxiliaryDebugWindowHandler |
| 24 | 24 | { |
| 25 | MAMEMemoryView *memoryView; | |
| 26 | NSPopUpButton *subviewButton; | |
| 25 | MAMEMemoryView *memoryView; | |
| 26 | NSPopUpButton *subviewButton; | |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; |
| r244614 | r244615 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | @interface MAMEPointsViewer : MAMEAuxiliaryDebugWindowHandler |
| 24 | 24 | { |
| 25 | NSTabView | |
| 25 | NSTabView *tabs; | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // consolewininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 304 | 304 | |
| 305 | 305 | void consolewin_info::process_string(char const *string) |
| 306 | 306 | { |
| 307 | if (string[0] == 0) | |
| 307 | if (string[0] == 0) // an empty string is a single step | |
| 308 | 308 | debug_cpu_get_visible_cpu(machine())->debug()->single_step(); |
| 309 | else | |
| 309 | else // otherwise, just process the command | |
| 310 | 310 | debug_console_execute_command(machine(), string, 1); |
| 311 | 311 | |
| 312 | 312 | // clear the edit text box |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // consolewininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 47 | 47 | static void add_filter_entry(astring &dest, char const *description, char const *extensions); |
| 48 | 48 | static void copy_extension_list(astring &dest, char const *extensions); |
| 49 | 49 | |
| 50 | HMENU | |
| 50 | HMENU m_devices_menu; | |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | #endif |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // debugbaseinfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // debugbaseinfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 30 | 30 | static void smart_show_window(HWND wnd, bool show); |
| 31 | 31 | |
| 32 | 32 | private: |
| 33 | debugger_windows_interface &m_debugger; | |
| 34 | running_machine &m_machine; | |
| 35 | ui_metrics const &m_metrics; | |
| 36 | bool const &m_waiting_for_debugger; | |
| 33 | debugger_windows_interface &m_debugger; | |
| 34 | running_machine &m_machine; | |
| 35 | ui_metrics const &m_metrics; | |
| 36 | bool const &m_waiting_for_debugger; | |
| 37 | 37 | }; |
| 38 | 38 | |
| 39 | 39 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // debugview.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | // debugger view styles |
| 20 | #define DEBUG_VIEW_STYLE WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | |
| 21 | #define DEBUG_VIEW_STYLE_EX 0 | |
| 20 | #define DEBUG_VIEW_STYLE WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | |
| 21 | #define DEBUG_VIEW_STYLE_EX 0 | |
| 22 | 22 | |
| 23 | 23 | // combo box styles |
| 24 | #define COMBO_BOX_STYLE WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL | |
| 25 | #define COMBO_BOX_STYLE_EX 0 | |
| 24 | #define COMBO_BOX_STYLE WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL | |
| 25 | #define COMBO_BOX_STYLE_EX 0 | |
| 26 | 26 | |
| 27 | 27 | // horizontal scroll bar styles |
| 28 | #define HSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_HORZ | |
| 29 | #define HSCROLL_STYLE_EX 0 | |
| 28 | #define HSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_HORZ | |
| 29 | #define HSCROLL_STYLE_EX 0 | |
| 30 | 30 | |
| 31 | 31 | // vertical scroll bar styles |
| 32 | #define VSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_VERT | |
| 33 | #define VSCROLL_STYLE_EX 0 | |
| 32 | #define VSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_VERT | |
| 33 | #define VSCROLL_STYLE_EX 0 | |
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | bool debugview_info::s_window_class_registered = false; |
| r244614 | r244615 | |
| 310 | 310 | // iterate over rows and columns |
| 311 | 311 | for (UINT32 row = 0; row < visarea.y; row++) |
| 312 | 312 | { |
| 313 | ||
| 314 | 313 | // loop twice; once to fill the background and once to draw the text |
| 315 | 314 | for (int iter = 0; iter < 2; iter++) |
| 316 | 315 | { |
| r244614 | r244615 | |
| 789 | 788 | WNDCLASS wc = { 0 }; |
| 790 | 789 | |
| 791 | 790 | // initialize the description of the window class |
| 792 | wc.lpszClassName = TEXT("MAMEDebugView"); | |
| 793 | wc.hInstance = GetModuleHandle(NULL); | |
| 794 | wc.lpfnWndProc = &debugview_info::static_view_proc; | |
| 795 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); | |
| 796 | wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); | |
| 797 | wc.lpszMenuName = NULL; | |
| 798 | wc.hbrBackground = NULL; | |
| 799 | wc.style = 0; | |
| 800 | wc.cbClsExtra = 0; | |
| 801 | wc.cbWndExtra = 0; | |
| 791 | wc.lpszClassName = TEXT("MAMEDebugView"); | |
| 792 | wc.hInstance = GetModuleHandle(NULL); | |
| 793 | wc.lpfnWndProc = &debugview_info::static_view_proc; | |
| 794 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); | |
| 795 | wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); | |
| 796 | wc.lpszMenuName = NULL; | |
| 797 | wc.hbrBackground = NULL; | |
| 798 | wc.style = 0; | |
| 799 | wc.cbClsExtra = 0; | |
| 800 | wc.cbWndExtra = 0; | |
| 802 | 801 | |
| 803 | 802 | // register the class; fail if we can't |
| 804 | 803 | if (!RegisterClass(&wc)) |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // debugviewinfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 65 | 65 | |
| 66 | 66 | static void register_window_class(); |
| 67 | 67 | |
| 68 | debugwin_info &m_owner; | |
| 69 | debug_view *m_view; | |
| 70 | HWND m_wnd; | |
| 71 | HWND m_hscroll; | |
| 72 | HWND m_vscroll; | |
| 68 | debugwin_info &m_owner; | |
| 69 | debug_view *m_view; | |
| 70 | HWND m_wnd; | |
| 71 | HWND m_hscroll; | |
| 72 | HWND m_vscroll; | |
| 73 | 73 | |
| 74 | static bool | |
| 74 | static bool s_window_class_registered; | |
| 75 | 75 | }; |
| 76 | 76 | |
| 77 | 77 | #endif |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // debugwin.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // debugwininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 579 | 579 | WNDCLASS wc = { 0 }; |
| 580 | 580 | |
| 581 | 581 | // initialize the description of the window class |
| 582 | wc.lpszClassName = TEXT("MAMEDebugWindow"); | |
| 583 | wc.hInstance = GetModuleHandle(NULL); | |
| 584 | wc.lpfnWndProc = &debugwin_info::static_window_proc; | |
| 585 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); | |
| 586 | wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); | |
| 587 | wc.lpszMenuName = NULL; | |
| 588 | wc.hbrBackground = NULL; | |
| 589 | wc.style = 0; | |
| 590 | wc.cbClsExtra = 0; | |
| 591 | wc.cbWndExtra = 0; | |
| 582 | wc.lpszClassName = TEXT("MAMEDebugWindow"); | |
| 583 | wc.hInstance = GetModuleHandle(NULL); | |
| 584 | wc.lpfnWndProc = &debugwin_info::static_window_proc; | |
| 585 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); | |
| 586 | wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); | |
| 587 | wc.lpszMenuName = NULL; | |
| 588 | wc.hbrBackground = NULL; | |
| 589 | wc.style = 0; | |
| 590 | wc.cbClsExtra = 0; | |
| 591 | wc.cbWndExtra = 0; | |
| 592 | 592 | |
| 593 | 593 | // register the class; fail if we can't |
| 594 | 594 | if (!RegisterClass(&wc)) |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // debugwininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 54 | 54 | virtual bool handle_key(WPARAM wparam, LPARAM lparam); |
| 55 | 55 | |
| 56 | 56 | protected: |
| 57 | static DWORD const DEBUG_WINDOW_STYLE = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN) & (~WS_MINIMIZEBOX & ~WS_MAXIMIZEBOX); | |
| 58 | static DWORD const DEBUG_WINDOW_STYLE_EX = 0; | |
| 57 | static DWORD const DEBUG_WINDOW_STYLE = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN) & (~WS_MINIMIZEBOX & ~WS_MAXIMIZEBOX); | |
| 58 | static DWORD const DEBUG_WINDOW_STYLE_EX = 0; | |
| 59 | 59 | |
| 60 | static int const MAX_VIEWS = 4; | |
| 61 | static int const EDGE_WIDTH = 3; | |
| 60 | static int const MAX_VIEWS = 4; | |
| 61 | static int const EDGE_WIDTH = 3; | |
| 62 | 62 | |
| 63 | 63 | enum |
| 64 | 64 | { |
| r244614 | r244615 | |
| 98 | 98 | ID_SHOW_BREAKPOINTS, |
| 99 | 99 | ID_SHOW_WATCHPOINTS, |
| 100 | 100 | |
| 101 | ID_DEVICE_OPTIONS | |
| 101 | ID_DEVICE_OPTIONS // always keep this at the end | |
| 102 | 102 | }; |
| 103 | 103 | |
| 104 | 104 | bool is_main_console() const { return m_is_main_console; } |
| r244614 | r244615 | |
| 115 | 115 | void draw_border(HDC dc, RECT &bounds); |
| 116 | 116 | void draw_border(HDC dc, HWND child); |
| 117 | 117 | |
| 118 | auto_pointer<debugview_info> | |
| 118 | auto_pointer<debugview_info> m_views[MAX_VIEWS]; | |
| 119 | 119 | |
| 120 | 120 | private: |
| 121 | 121 | LRESULT window_proc(UINT message, WPARAM wparam, LPARAM lparam); |
| r244614 | r244615 | |
| 126 | 126 | |
| 127 | 127 | static void register_window_class(); |
| 128 | 128 | |
| 129 | bool const | |
| 129 | bool const m_is_main_console; | |
| 130 | 130 | |
| 131 | debugwin_info *m_next; | |
| 132 | HWND m_wnd; | |
| 133 | WNDPROC const m_handler; | |
| 131 | debugwin_info *m_next; | |
| 132 | HWND m_wnd; | |
| 133 | WNDPROC const m_handler; | |
| 134 | 134 | |
| 135 | UINT32 m_minwidth, m_maxwidth; | |
| 136 | UINT32 m_minheight, m_maxheight; | |
| 135 | UINT32 m_minwidth, m_maxwidth; | |
| 136 | UINT32 m_minheight, m_maxheight; | |
| 137 | 137 | |
| 138 | UINT16 | |
| 138 | UINT16 m_ignore_char_lparam; | |
| 139 | 139 | |
| 140 | static bool | |
| 140 | static bool s_window_class_registered; | |
| 141 | 141 | }; |
| 142 | 142 | |
| 143 | 143 | #endif |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // disasmbasewininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // disasmbasewininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // disasmviewinfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 41 | 41 | void disasmview_info::set_right_column(disasm_right_column contents) |
| 42 | 42 | { |
| 43 | 43 | view<debug_view_disasm>()->set_right_column(contents); |
| 44 | } | |
| No newline at end of file | ||
| 44 | } |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // disasmviewinfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // disasmwininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // disasmwininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 30 | 30 | |
| 31 | 31 | void update_caption(); |
| 32 | 32 | |
| 33 | HWND | |
| 33 | HWND m_combownd; | |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | 36 | #endif |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // editwininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | // edit box styles |
| 18 | #define EDIT_BOX_STYLE WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | |
| 19 | #define EDIT_BOX_STYLE_EX 0 | |
| 18 | #define EDIT_BOX_STYLE WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | |
| 19 | #define EDIT_BOX_STYLE_EX 0 | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | editwin_info::editwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler) : |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // editwininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 25 | 25 | virtual bool set_default_focus(); |
| 26 | 26 | |
| 27 | 27 | protected: |
| 28 | static DWORD const COMBO_BOX_STYLE = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL; | |
| 29 | static DWORD const COMBO_BOX_STYLE_EX = 0; | |
| 28 | static DWORD const COMBO_BOX_STYLE = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL; | |
| 29 | static DWORD const COMBO_BOX_STYLE_EX = 0; | |
| 30 | 30 | |
| 31 | 31 | void set_editwnd_bounds(RECT const &bounds); |
| 32 | 32 | void set_editwnd_text(char const *text); |
| r244614 | r244615 | |
| 42 | 42 | |
| 43 | 43 | static LRESULT CALLBACK static_edit_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam); |
| 44 | 44 | |
| 45 | static int const MAX_EDIT_STRING = 256; | |
| 46 | static int const HISTORY_LENGTH = 20; | |
| 45 | static int const MAX_EDIT_STRING = 256; | |
| 46 | static int const HISTORY_LENGTH = 20; | |
| 47 | 47 | |
| 48 | HWND m_editwnd; | |
| 49 | astring m_edit_defstr; | |
| 50 | WNDPROC m_original_editproc; | |
| 51 | TCHAR m_history[HISTORY_LENGTH][MAX_EDIT_STRING]; | |
| 52 | int m_history_count; | |
| 53 | int m_last_history; | |
| 48 | HWND m_editwnd; | |
| 49 | astring m_edit_defstr; | |
| 50 | WNDPROC m_original_editproc; | |
| 51 | TCHAR m_history[HISTORY_LENGTH][MAX_EDIT_STRING]; | |
| 52 | int m_history_count; | |
| 53 | int m_last_history; | |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | 56 | #endif |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // logwininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // logwininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // memoryviewinfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // memoryviewinfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // memorywininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // memorywininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 | |
| r244614 | r244615 | |
| 33 | 33 | |
| 34 | 34 | void update_caption(); |
| 35 | 35 | |
| 36 | HWND | |
| 36 | HWND m_combownd; | |
| 37 | 37 | }; |
| 38 | 38 | |
| 39 | 39 | #endif |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // pointswininfo.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // pointswininfo.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // uimetrics.c - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 2 | 2 | // copyright-holders:Aaron Giles, Vas Crabb |
| 3 | 3 | //============================================================ |
| 4 | 4 | // |
| 5 | // | |
| 5 | // uimetrics.h - Win32 debug window handling | |
| 6 | 6 | // |
| 7 | 7 | //============================================================ |
| 8 | 8 |
| r244614 | r244615 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | #if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS) |
| 17 | 17 | |
| 18 | #define LIB_NAME L"wpcap.dll" | |
| 19 | #define LIB_ERROR_STR "Unable to load winpcap: %lx\n" | |
| 18 | #define LIB_NAME L"wpcap.dll" | |
| 19 | #define LIB_ERROR_STR "Unable to load winpcap: %lx\n" | |
| 20 | 20 | typedef DWORD except_type; |
| 21 | 21 | |
| 22 | 22 | #else |
| r244614 | r244615 | |
| 28 | 28 | #endif |
| 29 | 29 | |
| 30 | 30 | #ifdef SDLMAME_MACOSX |
| 31 | #define LIB_NAME | |
| 31 | #define LIB_NAME "libpcap.dylib" | |
| 32 | 32 | #else |
| 33 | #define LIB_NAME | |
| 33 | #define LIB_NAME "libpcap.so" | |
| 34 | 34 | #endif |
| 35 | #define LIB_ERROR_STR | |
| 35 | #define LIB_ERROR_STR "Unable to load pcap: %s\n" | |
| 36 | 36 | |
| 37 | 37 | typedef void *HMODULE; |
| 38 | 38 | typedef const char *except_type; |
| r244614 | r244615 | |
| 178 | 178 | sprintf(filter, "not ether src %.2X:%.2X:%.2X:%.2X:%.2X:%.2X and (ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast or ether dst 09:00:07:ff:ff:ff)", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5], (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]); |
| 179 | 179 | #else |
| 180 | 180 | sprintf(filter, "ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]); |
| 181 | #endif | |
| 181 | #endif | |
| 182 | 182 | if(pcap_compile_dl(m_p, &fp, filter, 1, 0) == -1) { |
| 183 | 183 | logerror("Error with pcap_compile\n"); |
| 184 | 184 | } |
| r244614 | r244615 | |
| 300 | 300 | |
| 301 | 301 | |
| 302 | 302 | MODULE_DEFINITION(NETDEV_PCAP, pcap_module) |
| 303 |
| r244614 | r244615 | |
|---|---|---|
| 35 | 35 | |
| 36 | 36 | inline UINT32 pixel_ycc_to_rgb(const UINT16 *pixel) |
| 37 | 37 | { |
| 38 | ||
| 39 | 38 | const UINT32 p = *(UINT32 *)((FPTR) pixel & ~3); |
| 40 | 39 | return ycc_to_rgb((*pixel >> 8) & 0xff, (p) & 0xff, (p>>16) & 0xff); |
| 41 | 40 | } |
| r244614 | r244615 | |
| 53 | 52 | |
| 54 | 53 | #define FUNC_DEF(source) op(const source &src, const rgb_t *palbase) const |
| 55 | 54 | #define FUNCTOR(name, x...) \ |
| 56 | template<typename _source, typename _dest> \ | |
| 57 | struct name { _dest FUNC_DEF(_source) { x } }; | |
| 55 | template<typename _source, typename _dest> \ | |
| 56 | struct name { _dest FUNC_DEF(_source) { x } }; | |
| 58 | 57 | |
| 59 | 58 | FUNCTOR(op_argb32_argb32, return src; ) |
| 60 | 59 | FUNCTOR(op_rgb32_argb32, return src | 0xff000000; ) |
| 61 | 60 | FUNCTOR(op_pal16_argb32, return 0xff000000 |palbase[src]; ) |
| 62 | 61 | FUNCTOR(op_pal16_rgb32, return palbase[src]; ) |
| 63 | 62 | FUNCTOR(op_rgb32pal_argb32, |
| 64 | return palbase[0x200 + (((src) >> 16) & 0xff) ] | | |
| 65 | palbase[0x100 + (((src) >> 8) & 0xff) ] | | |
| 66 | palbase[((src) & 0xff) ] | 0xff000000; ) | |
| 63 | return palbase[0x200 + (((src) >> 16) & 0xff) ] | | |
| 64 | palbase[0x100 + (((src) >> 8) & 0xff) ] | | |
| 65 | palbase[((src) & 0xff) ] | 0xff000000; ) | |
| 67 | 66 | |
| 68 | 67 | FUNCTOR(op_pal16a_argb32, return palbase[src]; ) |
| 69 | 68 | |
| r244614 | r244615 | |
| 74 | 73 | |
| 75 | 74 | FUNCTOR(op_rgb15pal_argb32, |
| 76 | 75 | return 0xff000000 | palbase[0x40 + ((src >> 10) & 0x1f)] | |
| 77 | ||
| 76 | palbase[0x20 + ((src >> 5) & 0x1f)] | palbase[0x00 + ((src >> 0) & 0x1f)]; ) | |
| 78 | 77 | |
| 79 | 78 | FUNCTOR(op_argb32_rgb32, return premult32(src); ) |
| 80 | 79 | FUNCTOR(op_pal16a_rgb32, return premult32(palbase[src]); ) |
| 81 | 80 | FUNCTOR(op_pal16_argb1555, |
| 82 | 81 | return (palbase[src]&0xf80000) >> 9 | |
| 83 | (palbase[src]&0x00f800) >> 6 | | |
| 84 | (palbase[src]&0x0000f8) >> 3 | 0x8000; ) | |
| 82 | (palbase[src]&0x00f800) >> 6 | | |
| 83 | (palbase[src]&0x0000f8) >> 3 | 0x8000; ) | |
| 85 | 84 | |
| 86 | 85 | FUNCTOR(op_rgb15_argb1555, return src | 0x8000; ) |
| 87 | 86 | |
| 88 | 87 | FUNCTOR(op_rgb15pal_argb1555, |
| 89 | 88 | return (palbase[src >> 10] & 0xf8) << 7 | |
| 90 | (palbase[(src >> 5) & 0x1f] & 0xf8) << 2 | | |
| 91 | (palbase[src & 0x1f] & 0xf8) >> 3 | 0x8000; ) | |
| 89 | (palbase[(src >> 5) & 0x1f] & 0xf8) << 2 | | |
| 90 | (palbase[src & 0x1f] & 0xf8) >> 3 | 0x8000; ) | |
| 92 | 91 | |
| 93 | 92 | FUNCTOR(op_yuv16_uyvy, return src; ) |
| 94 | 93 | FUNCTOR(op_yuv16pal_uyvy, return (palbase[(src >> 8) & 0xff] << 8) | (src & 0x00ff); ) |
| r244614 | r244615 | |
| 106 | 105 | |
| 107 | 106 | FUNCTOR(op_yuv16_argb32, |
| 108 | 107 | return (UINT64) ycc_to_rgb((src >> 8) & 0xff, src & 0xff , (src>>16) & 0xff) |
| 109 | ||
| 108 | | ((UINT64)ycc_to_rgb((src >> 24) & 0xff, src & 0xff , (src>>16) & 0xff) << 32); ) | |
| 110 | 109 | |
| 111 | 110 | FUNCTOR(op_yuv16pal_argb32, |
| 112 | 111 | return (UINT64)ycc_to_rgb(palbase[(src >> 8) & 0xff], src & 0xff , (src>>16) & 0xff) |
| 113 | ||
| 112 | | ((UINT64)ycc_to_rgb(palbase[(src >> 24) & 0xff], src & 0xff , (src>>16) & 0xff) << 32);) | |
| 114 | 113 | |
| 115 | 114 | FUNCTOR(op_yuv16_argb32rot, return pixel_ycc_to_rgb(&src) ; ) |
| 116 | 115 | |
| r244614 | r244615 | |
| 121 | 120 | //============================================================ |
| 122 | 121 | |
| 123 | 122 | struct blit_base { |
| 124 | ||
| 125 | 123 | blit_base(int dest_bpp, bool is_rot, bool is_passthrough) |
| 126 | 124 | : m_dest_bpp(dest_bpp), m_is_rot(is_rot), m_is_passthrough(is_passthrough) |
| 127 | 125 | { } |
| r244614 | r244615 | |
| 137 | 135 | struct blit_texcopy : public blit_base |
| 138 | 136 | { |
| 139 | 137 | blit_texcopy() : blit_base(sizeof(_dest_type) / _len_div, false, false) { } |
| 140 | void texop(const texture_info *texture, const render_texinfo *texsource) const | |
| 141 | { | |
| 142 | ATTR_UNUSED const rgb_t *palbase = texsource->palette; | |
| 143 | int x, y; | |
| 144 | /* loop over Y */ | |
| 145 | for (y = 0; y < texsource->height; y++) { | |
| 146 | _src_type *src = (_src_type *)texsource->base + y * texsource->rowpixels / (_len_div); | |
| 147 | _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch); | |
| 148 | x = texsource->width / (_len_div); | |
| 149 | while (x > 0) { | |
| 150 | *dst++ = m_op.op(*src, palbase); | |
| 151 | src++; | |
| 152 | x--; | |
| 153 | } | |
| 154 | } | |
| 155 | } | |
| 138 | void texop(const texture_info *texture, const render_texinfo *texsource) const | |
| 139 | { | |
| 140 | ATTR_UNUSED const rgb_t *palbase = texsource->palette; | |
| 141 | int x, y; | |
| 142 | /* loop over Y */ | |
| 143 | for (y = 0; y < texsource->height; y++) { | |
| 144 | _src_type *src = (_src_type *)texsource->base + y * texsource->rowpixels / (_len_div); | |
| 145 | _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch); | |
| 146 | x = texsource->width / (_len_div); | |
| 147 | while (x > 0) { | |
| 148 | *dst++ = m_op.op(*src, palbase); | |
| 149 | src++; | |
| 150 | x--; | |
| 151 | } | |
| 152 | } | |
| 153 | } | |
| 156 | 154 | private: |
| 157 | ||
| 155 | _op m_op; | |
| 158 | 156 | }; |
| 159 | 157 | |
| 160 | 158 | #define TEXCOPYA(a, b, c, d) \ |
| r244614 | r244615 | |
| 187 | 185 | } |
| 188 | 186 | } |
| 189 | 187 | private: |
| 190 | ||
| 188 | _op m_op; | |
| 191 | 189 | }; |
| 192 | 190 | |
| 193 | 191 | #define TEXROTA(a, b, c) \ |
| r244614 | r244615 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | static inline bool is_opaque(const float &a) |
| 51 | 51 | { |
| 52 | ||
| 52 | return (a >= 1.0f); | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | static inline bool is_transparent(const float &a) |
| 56 | 56 | { |
| 57 | ||
| 57 | return (a < 0.0001f); | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | //============================================================ |
| r244614 | r244615 | |
| 64 | 64 | |
| 65 | 65 | struct quad_setup_data |
| 66 | 66 | { |
| 67 | quad_setup_data() | |
| 68 | : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0), | |
| 69 | rotwidth(0), rotheight(0) | |
| 70 | {} | |
| 71 | void compute(const render_primitive &prim, const int prescale); | |
| 67 | quad_setup_data() | |
| 68 | : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0), | |
| 69 | rotwidth(0), rotheight(0) | |
| 70 | {} | |
| 71 | void compute(const render_primitive &prim, const int prescale); | |
| 72 | 72 | |
| 73 | 73 | INT32 dudx, dvdx, dudy, dvdy; |
| 74 | 74 | INT32 startu, startv; |
| r244614 | r244615 | |
| 85 | 85 | /* texture_info holds information about a texture */ |
| 86 | 86 | class texture_info |
| 87 | 87 | { |
| 88 | ||
| 88 | friend class simple_list<texture_info>; | |
| 89 | 89 | public: |
| 90 | texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags); | |
| 91 | ~texture_info(); | |
| 90 | texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags); | |
| 91 | ~texture_info(); | |
| 92 | 92 | |
| 93 | void set_data(const render_texinfo &texsource, const UINT32 flags); | |
| 94 | void render_quad(const render_primitive *prim, const int x, const int y); | |
| 95 | bool matches(const render_primitive &prim, const quad_setup_data &setup); | |
| 93 | void set_data(const render_texinfo &texsource, const UINT32 flags); | |
| 94 | void render_quad(const render_primitive *prim, const int x, const int y); | |
| 95 | bool matches(const render_primitive &prim, const quad_setup_data &setup); | |
| 96 | 96 | |
| 97 | ||
| 97 | copy_info_t *compute_size_type(); | |
| 98 | 98 | |
| 99 | 99 | void *m_pixels; // pixels for the texture |
| 100 | 100 | int m_pitch; |
| r244614 | r244615 | |
| 105 | 105 | osd_ticks_t m_last_access; |
| 106 | 106 | |
| 107 | 107 | int raw_width() const { return m_texinfo.width; } |
| 108 | ||
| 108 | int raw_height() const { return m_texinfo.height; } | |
| 109 | 109 | |
| 110 | texture_info *next() { return m_next; } | |
| 111 | const render_texinfo &texinfo() const { return m_texinfo; } | |
| 112 | render_texinfo &texinfo() { return m_texinfo; } | |
| 110 | texture_info *next() { return m_next; } | |
| 111 | const render_texinfo &texinfo() const { return m_texinfo; } | |
| 112 | render_texinfo &texinfo() { return m_texinfo; } | |
| 113 | 113 | |
| 114 | const HashT hash() const { return m_hash; } | |
| 115 | const UINT32 flags() const { return m_flags; } | |
| 116 | // FIXME: | |
| 117 | const bool is_pixels_owned() const; | |
| 114 | const HashT hash() const { return m_hash; } | |
| 115 | const UINT32 flags() const { return m_flags; } | |
| 116 | // FIXME: | |
| 117 | const bool is_pixels_owned() const; | |
| 118 | 118 | |
| 119 | 119 | private: |
| 120 | Uint32 m_sdl_access; | |
| 121 | SDL_Renderer * m_sdl_renderer; | |
| 122 | render_texinfo m_texinfo; // copy of the texture info | |
| 123 | HashT m_hash; // hash value for the texture (must be >= pointer size) | |
| 124 | UINT32 m_flags; // rendering flags | |
| 120 | Uint32 m_sdl_access; | |
| 121 | SDL_Renderer * m_sdl_renderer; | |
| 122 | render_texinfo m_texinfo; // copy of the texture info | |
| 123 | HashT m_hash; // hash value for the texture (must be >= pointer size) | |
| 124 | UINT32 m_flags; // rendering flags | |
| 125 | 125 | |
| 126 | SDL_Texture * m_texture_id; | |
| 127 | bool m_is_rotated; | |
| 126 | SDL_Texture * m_texture_id; | |
| 127 | bool m_is_rotated; | |
| 128 | 128 | |
| 129 | int m_format; // texture format | |
| 130 | SDL_BlendMode m_sdl_blendmode; | |
| 129 | int m_format; // texture format | |
| 130 | SDL_BlendMode m_sdl_blendmode; | |
| 131 | 131 | |
| 132 | ||
| 132 | texture_info * m_next; // next texture in the list | |
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | 135 | //============================================================ |
| r244614 | r244615 | |
| 142 | 142 | class sdl_info13 : public osd_renderer |
| 143 | 143 | { |
| 144 | 144 | public: |
| 145 | sdl_info13(osd_window *w) | |
| 146 | : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL), | |
| 147 | m_last_hofs(0), m_last_vofs(0), | |
| 148 | m_width(0), m_height(0), | |
| 149 | m_blitwidth(0), m_blitheight(0), | |
| 150 | m_last_blit_time(0), m_last_blit_pixels(0) | |
| 151 | {} | |
| 145 | sdl_info13(osd_window *w) | |
| 146 | : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL), | |
| 147 | m_last_hofs(0), m_last_vofs(0), | |
| 148 | m_width(0), m_height(0), | |
| 149 | m_blitwidth(0), m_blitheight(0), | |
| 150 | m_last_blit_time(0), m_last_blit_pixels(0) | |
| 151 | {} | |
| 152 | 152 | |
| 153 | 153 | /* virtual */ int create(); |
| 154 | 154 | /* virtual */ int draw(const int update); |
| r244614 | r244615 | |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | private: |
| 171 | ||
| 171 | void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y); | |
| 172 | 172 | |
| 173 | texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); | |
| 174 | texture_info *texture_update(const render_primitive &prim); | |
| 173 | texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); | |
| 174 | texture_info *texture_update(const render_primitive &prim); | |
| 175 | 175 | |
| 176 | ||
| 176 | void destroy_all_textures(); | |
| 177 | 177 | |
| 178 | 178 | INT32 m_blittimer; |
| 179 | 179 | |
| r244614 | r244615 | |
| 190 | 190 | float m_last_hofs; |
| 191 | 191 | float m_last_vofs; |
| 192 | 192 | |
| 193 | int m_width; | |
| 194 | int m_height; | |
| 193 | int m_width; | |
| 194 | int m_height; | |
| 195 | 195 | |
| 196 | int m_blitwidth; | |
| 197 | int m_blitheight; | |
| 196 | int m_blitwidth; | |
| 197 | int m_blitheight; | |
| 198 | 198 | |
| 199 | 199 | // Stats |
| 200 | 200 | INT64 m_last_blit_time; |
| r244614 | r244615 | |
| 204 | 204 | struct copy_info_t { |
| 205 | 205 | int src_fmt; |
| 206 | 206 | Uint32 dst_fmt; |
| 207 | const blit_base | |
| 207 | const blit_base *blitter; | |
| 208 | 208 | Uint32 bm_mask; |
| 209 | 209 | const char *srcname; |
| 210 | 210 | const char *dstname; |
| r244614 | r244615 | |
| 241 | 241 | static copy_info_t blit_info_default[] = |
| 242 | 242 | { |
| 243 | 243 | /* no rotation */ |
| 244 | ENTRY(ARGB32, | |
| 244 | ENTRY(ARGB32, ARGB8888, argb32_argb32), | |
| 245 | 245 | ENTRY_LR(ARGB32, RGB888, argb32_rgb32), |
| 246 | 246 | /* Entry primarily for directfb */ |
| 247 | 247 | ENTRY_BM(ARGB32, RGB888, argb32_rgb32, SDL_BLENDMODE_ADD), |
| r244614 | r244615 | |
| 249 | 249 | ENTRY_BM(ARGB32, RGB888, argb32_rgb32, SDL_BLENDMODE_NONE), |
| 250 | 250 | |
| 251 | 251 | ENTRY(RGB32, ARGB8888, rgb32_argb32), |
| 252 | ENTRY(RGB32, | |
| 252 | ENTRY(RGB32, RGB888, rgb32_rgb32), | |
| 253 | 253 | |
| 254 | 254 | ENTRY(RGB32_PALETTED, ARGB8888, rgb32pal_argb32), |
| 255 | 255 | ENTRY(RGB32_PALETTED, RGB888, rgb32pal_argb32), |
| 256 | 256 | |
| 257 | ENTRY(YUY16, | |
| 257 | ENTRY(YUY16, UYVY, yuv16_uyvy), | |
| 258 | 258 | ENTRY(YUY16, YUY2, yuv16_yuy2), |
| 259 | 259 | ENTRY(YUY16, YVYU, yuv16_yvyu), |
| 260 | 260 | ENTRY(YUY16, ARGB8888, yuv16_argb32), |
| r244614 | r244615 | |
| 269 | 269 | ENTRY(PALETTE16, ARGB8888, pal16_argb32), |
| 270 | 270 | ENTRY(PALETTE16, RGB888, pal16_argb32), |
| 271 | 271 | |
| 272 | ENTRY(RGB15, | |
| 272 | ENTRY(RGB15, RGB555, rgb15_rgb555), | |
| 273 | 273 | ENTRY(RGB15, ARGB1555, rgb15_argb1555), |
| 274 | 274 | ENTRY(RGB15, ARGB8888, rgb15_argb32), |
| 275 | 275 | ENTRY(RGB15, RGB888, rgb15_argb32), |
| r244614 | r244615 | |
| 647 | 647 | |
| 648 | 648 | int sdl_info13::xy_to_render_target(int x, int y, int *xt, int *yt) |
| 649 | 649 | { |
| 650 | ||
| 651 | 650 | *xt = x - m_last_hofs; |
| 652 | 651 | *yt = y - m_last_vofs; |
| 653 | 652 | if (*xt<0 || *xt >= m_blitwidth) |
| r244614 | r244615 | |
| 830 | 829 | // FIXME: |
| 831 | 830 | const bool texture_info::is_pixels_owned() const |
| 832 | 831 | { // do we own / allocated it ? |
| 833 | return ((m_sdl_access == SDL_TEXTUREACCESS_STATIC) | |
| 834 | && (m_copyinfo->blitter->m_is_passthrough)); | |
| 832 | return ((m_sdl_access == SDL_TEXTUREACCESS_STATIC) | |
| 833 | && (m_copyinfo->blitter->m_is_passthrough)); | |
| 835 | 834 | } |
| 836 | 835 | |
| 837 | 836 | //============================================================ |
| r244614 | r244615 | |
| 1098 | 1097 | } |
| 1099 | 1098 | return texture; |
| 1100 | 1099 | } |
| 1101 |
| r244614 | r244615 | |
|---|---|---|
| 33 | 33 | #include "osdsdl.h" |
| 34 | 34 | #include "window.h" |
| 35 | 35 | |
| 36 | #include <bgfxplatform.h> | |
| 36 | #include <bgfxplatform.h> | |
| 37 | 37 | #include <bgfx.h> |
| 38 | 38 | |
| 39 | 39 | //============================================================ |
| r244614 | r244615 | |
| 73 | 73 | class sdl_info_bgfx : public osd_renderer |
| 74 | 74 | { |
| 75 | 75 | public: |
| 76 | sdl_info_bgfx(osd_window *w) | |
| 77 | : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_renderer(NULL), | |
| 78 | m_blitwidth(0), m_blitheight(0), | |
| 79 | m_last_hofs(0), m_last_vofs(0), | |
| 80 | m_last_blit_time(0), m_last_blit_pixels(0) | |
| 81 | {} | |
| 76 | sdl_info_bgfx(osd_window *w) | |
| 77 | : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_renderer(NULL), | |
| 78 | m_blitwidth(0), m_blitheight(0), | |
| 79 | m_last_hofs(0), m_last_vofs(0), | |
| 80 | m_last_blit_time(0), m_last_blit_pixels(0) | |
| 81 | {} | |
| 82 | 82 | |
| 83 | 83 | /* virtual */ int create(); |
| 84 | 84 | /* virtual */ int draw(const int update); |
| r244614 | r244615 | |
| 97 | 97 | return &window().target()->get_primitives(); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | ||
| 100 | // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y); | |
| 101 | 101 | |
| 102 | //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); | |
| 103 | //texture_info *texture_update(const render_primitive &prim); | |
| 102 | //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); | |
| 103 | //texture_info *texture_update(const render_primitive &prim); | |
| 104 | 104 | |
| 105 | 105 | INT32 m_blittimer; |
| 106 | 106 | |
| 107 | 107 | SDL_Renderer * m_renderer; |
| 108 | 108 | //simple_list<texture_info> m_texlist; // list of active textures |
| 109 | 109 | |
| 110 | int m_blitwidth; | |
| 111 | int m_blitheight; | |
| 110 | int m_blitwidth; | |
| 111 | int m_blitheight; | |
| 112 | 112 | float m_last_hofs; |
| 113 | 113 | float m_last_vofs; |
| 114 | 114 | |
| r244614 | r244615 | |
| 139 | 139 | // fill in the callbacks |
| 140 | 140 | callbacks->exit = drawbgfx_exit; |
| 141 | 141 | callbacks->create = drawbgfx_create; |
| 142 | ||
| 142 | ||
| 143 | 143 | return 0; |
| 144 | 144 | } |
| 145 | 145 | |
| r244614 | r244615 | |
| 159 | 159 | bgfx::sdlSetWindow(window().sdl_window()); |
| 160 | 160 | bgfx::init(); |
| 161 | 161 | bgfx::reset(width, height, BGFX_RESET_VSYNC); |
| 162 | ||
| 162 | ||
| 163 | 163 | // Enable debug text. |
| 164 | 164 | bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT); |
| 165 | 165 | osd_printf_verbose("Leave drawsdl2_window_create\n"); |
| r244614 | r244615 | |
| 187 | 187 | |
| 188 | 188 | int sdl_info_bgfx::draw(int update) |
| 189 | 189 | { |
| 190 | ||
| 191 | 190 | //if (has_flags(FI_CHANGED) || (window().width() != m_last_width) || (window().height() != m_last_height)) |
| 192 | 191 | // do something |
| 193 | 192 | //clear_flags(FI_CHANGED); |
| r244614 | r244615 | |
| 207 | 206 | |
| 208 | 207 | window().m_primlist->acquire_lock(); |
| 209 | 208 | window().m_primlist->release_lock(); |
| 210 | // Advance to next frame. Rendering thread will be kicked to | |
| 209 | // Advance to next frame. Rendering thread will be kicked to | |
| 211 | 210 | // process submitted rendering primitives. |
| 212 | 211 | bgfx::frame(); |
| 213 | ||
| 212 | ||
| 214 | 213 | return 0; |
| 215 | 214 | } |
| 216 | 215 |
| r244614 | r244615 | |
|---|---|---|
| 202 | 202 | { |
| 203 | 203 | public: |
| 204 | 204 | texture_info() |
| 205 | : | |
| 205 | : hash(0), flags(0), rawwidth(0), rawheight(0), | |
| 206 | 206 | rawwidth_create(0), rawheight_create(0), |
| 207 | 207 | type(0), format(0), borderpix(0), xprescale(0), yprescale(0), nocopy(0), |
| 208 | 208 | texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(NULL), |
| r244614 | r244615 | |
| 337 | 337 | void texture_all_disable(); |
| 338 | 338 | |
| 339 | 339 | INT32 m_blittimer; |
| 340 | int m_width; | |
| 341 | int m_height; | |
| 342 | int m_blitwidth; | |
| 343 | int m_blitheight; | |
| 340 | int m_width; | |
| 341 | int m_height; | |
| 342 | int m_blitwidth; | |
| 343 | int m_blitheight; | |
| 344 | 344 | |
| 345 | 345 | #if (SDLMAME_SDL2) |
| 346 | 346 | SDL_GLContext m_gl_context_id; |
| 347 | 347 | #ifdef OSD_WINDOWS |
| 348 | HDC | |
| 348 | HDC m_hdc; | |
| 349 | 349 | #endif |
| 350 | 350 | #else |
| 351 | 351 | #endif |
| r244614 | r244615 | |
| 792 | 792 | void |
| 793 | 793 | setupPixelFormat(HDC hDC) |
| 794 | 794 | { |
| 795 | PIXELFORMATDESCRIPTOR pfd = { | |
| 796 | sizeof(PIXELFORMATDESCRIPTOR), /* size */ | |
| 797 | 1, /* version */ | |
| 798 | PFD_SUPPORT_OPENGL | | |
| 799 | PFD_DRAW_TO_WINDOW | | |
| 800 | PFD_DOUBLEBUFFER, /* support double-buffering */ | |
| 801 | PFD_TYPE_RGBA, /* color type */ | |
| 802 | 32, /* prefered color depth */ | |
| 803 | 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ | |
| 804 | 0, /* no alpha buffer */ | |
| 805 | 0, /* alpha bits (ignored) */ | |
| 806 | 0, /* no accumulation buffer */ | |
| 807 | 0, 0, 0, 0, /* accum bits (ignored) */ | |
| 808 | 16, /* depth buffer */ | |
| 809 | 0, /* no stencil buffer */ | |
| 810 | 0, /* no auxiliary buffers */ | |
| 811 | PFD_MAIN_PLANE, /* main layer */ | |
| 812 | 0, /* reserved */ | |
| 813 | 0, 0, 0, /* no layer, visible, damage masks */ | |
| 814 | }; | |
| 815 | int pixelFormat; | |
| 795 | PIXELFORMATDESCRIPTOR pfd = { | |
| 796 | sizeof(PIXELFORMATDESCRIPTOR), /* size */ | |
| 797 | 1, /* version */ | |
| 798 | PFD_SUPPORT_OPENGL | | |
| 799 | PFD_DRAW_TO_WINDOW | | |
| 800 | PFD_DOUBLEBUFFER, /* support double-buffering */ | |
| 801 | PFD_TYPE_RGBA, /* color type */ | |
| 802 | 32, /* prefered color depth */ | |
| 803 | 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ | |
| 804 | 0, /* no alpha buffer */ | |
| 805 | 0, /* alpha bits (ignored) */ | |
| 806 | 0, /* no accumulation buffer */ | |
| 807 | 0, 0, 0, 0, /* accum bits (ignored) */ | |
| 808 | 16, /* depth buffer */ | |
| 809 | 0, /* no stencil buffer */ | |
| 810 | 0, /* no auxiliary buffers */ | |
| 811 | PFD_MAIN_PLANE, /* main layer */ | |
| 812 | 0, /* reserved */ | |
| 813 | 0, 0, 0, /* no layer, visible, damage masks */ | |
| 814 | }; | |
| 815 | int pixelFormat; | |
| 816 | 816 | |
| 817 | pixelFormat = ChoosePixelFormat(hDC, &pfd); | |
| 818 | if (pixelFormat == 0) { | |
| 819 | osd_printf_error("ChoosePixelFormat failed.\n"); | |
| 820 | exit(1); | |
| 821 | } | |
| 817 | pixelFormat = ChoosePixelFormat(hDC, &pfd); | |
| 818 | if (pixelFormat == 0) { | |
| 819 | osd_printf_error("ChoosePixelFormat failed.\n"); | |
| 820 | exit(1); | |
| 821 | } | |
| 822 | 822 | |
| 823 | if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) { | |
| 824 | osd_printf_error("SetPixelFormat failed.\n"); | |
| 825 | exit(1); | |
| 826 | } | |
| 823 | if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) { | |
| 824 | osd_printf_error("SetPixelFormat failed.\n"); | |
| 825 | exit(1); | |
| 826 | } | |
| 827 | 827 | } |
| 828 | 828 | #endif |
| 829 | 829 | int sdl_info_ogl::create() |
| 830 | 830 | { |
| 831 | ||
| 832 | 831 | #if (SDLMAME_SDL2) |
| 833 | 832 | // create renderer |
| 834 | 833 | #ifdef OSD_WINDOWS |
| r244614 | r244615 | |
| 889 | 888 | |
| 890 | 889 | void sdl_info_ogl::destroy() |
| 891 | 890 | { |
| 892 | ||
| 893 | 891 | // free the memory in the window |
| 894 | 892 | |
| 895 | 893 | destroy_all_textures(); |
| r244614 | r244615 | |
| 912 | 910 | |
| 913 | 911 | int sdl_info_ogl::xy_to_render_target(int x, int y, int *xt, int *yt) |
| 914 | 912 | { |
| 915 | ||
| 916 | 913 | *xt = x - m_last_hofs; |
| 917 | 914 | *yt = y - m_last_vofs; |
| 918 | 915 | if (*xt<0 || *xt >= m_blitwidth) |
| r244614 | r244615 | |
| 3136 | 3133 | pfn_glBindBuffer( GL_PIXEL_UNPACK_BUFFER_ARB, 0); |
| 3137 | 3134 | } |
| 3138 | 3135 | } |
| 3139 | ||
| 3140 | ||
| 3141 |
| r244614 | r244615 | |
|---|---|---|
| 434 | 434 | |
| 435 | 435 | int sdl_info::create() |
| 436 | 436 | { |
| 437 | ||
| 438 | 437 | #if (SDLMAME_SDL2) |
| 439 | 438 | const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode]; |
| 440 | 439 | |
| 441 | // create renderer | |
| 440 | // create renderer | |
| 442 | 441 | |
| 443 | 442 | /* set hints ... */ |
| 444 | 443 | SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode); |
| r244614 | r244615 | |
| 500 | 499 | |
| 501 | 500 | void sdl_info::destroy() |
| 502 | 501 | { |
| 503 | ||
| 504 | 502 | // free the memory in the window |
| 505 | 503 | |
| 506 | 504 | destroy_all_textures(); |
| r244614 | r244615 | |
| 726 | 724 | float fh = (float) mameheight / (float) blitheight; |
| 727 | 725 | |
| 728 | 726 | // FIXME: this could be a lot easier if we get the primlist here! |
| 729 | // | |
| 727 | // Bounds would be set fit for purpose and done! | |
| 730 | 728 | |
| 731 | 729 | for (render_primitive *prim = window().m_primlist->first(); prim != NULL; prim = prim->next()) |
| 732 | 730 | { |
| r244614 | r244615 | |
|---|---|---|
| 365 | 365 | INCPATH += -I$(3RDPARTY)/winpcap/Include |
| 366 | 366 | |
| 367 | 367 | # enable UNICODE |
| 368 | DEFS += -Dmain=utf8_main -DUNICODE -D_UNICODE | |
| 369 | LDFLAGS += -municode | |
| 368 | DEFS += -Dmain=utf8_main -DUNICODE -D_UNICODE | |
| 369 | LDFLAGS += -municode | |
| 370 | 370 | |
| 371 | 371 | # Qt |
| 372 | 372 | ifndef NO_USE_QTDEBUG |
| r244614 | r244615 | |
| 734 | 734 | LIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static |
| 735 | 735 | BASELIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static |
| 736 | 736 | else |
| 737 | LIBS += -lSDL -lws2_32 -static | |
| 737 | LIBS += -lSDL -lws2_32 -static | |
| 738 | 738 | BASELIBS += -lSDL -lws2_32 -static |
| 739 | 739 | endif |
| 740 | 740 | LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi |
| r244614 | r244615 | |
| 809 | 809 | |
| 810 | 810 | ifdef USE_BGFX |
| 811 | 811 | DEFS += -DUSE_BGFX |
| 812 | OSDOBJS += $(SDLOBJ)/drawbgfx.o | |
| 812 | OSDOBJS += $(SDLOBJ)/drawbgfx.o | |
| 813 | 813 | INCPATH += -I$(3RDPARTY)/bgfx/include -I$(3RDPARTY)/bx/include |
| 814 | 814 | USE_DISPATCH_GL = 0 |
| 815 | 815 | BGFX_LIB = $(OBJ)/libbgfx.a |
| r244614 | r244615 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | sdl_monitor_info() |
| 68 | 68 | : m_next(NULL), m_handle(0), m_aspect(0.0f) |
| 69 | | |
| 69 | {} | |
| 70 | 70 | sdl_monitor_info(const UINT64 handle, const char *monitor_device, float aspect) |
| 71 | 71 | : m_next(NULL), m_handle(handle), m_aspect(aspect) |
| 72 | 72 | { |
| r244614 | r244615 | |
| 84 | 84 | void set_aspect(const float aspect) { m_aspect = aspect; } |
| 85 | 85 | |
| 86 | 86 | // STATIC |
| 87 | static void | |
| 87 | static void init(); | |
| 88 | 88 | static void exit(); |
| 89 | 89 | static sdl_monitor_info *pick_monitor(sdl_options &options, int index); |
| 90 | 90 | #if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2) |
| 91 | 91 | static void add_primary_monitor(void *data); |
| 92 | 92 | #endif |
| 93 | 93 | |
| 94 | sdl_monitor_info | |
| 94 | sdl_monitor_info * next() { return m_next; } // pointer to next monitor in list | |
| 95 | 95 | |
| 96 | 96 | // STATIC |
| 97 | 97 | static sdl_monitor_info *primary_monitor; |
| 98 | 98 | static sdl_monitor_info *list; |
| 99 | 99 | |
| 100 | sdl_monitor_info | |
| 100 | sdl_monitor_info * m_next; // pointer to next monitor in list | |
| 101 | 101 | private: |
| 102 | 102 | void refresh(); |
| 103 | 103 | |
| 104 | 104 | UINT64 m_handle; // handle to the monitor |
| 105 | SDL_Rect | |
| 105 | SDL_Rect m_dimensions; | |
| 106 | 106 | char m_name[64]; |
| 107 | 107 | float m_aspect; // computed/configured aspect ratio of the physical device |
| 108 | 108 | }; |
| r244614 | r244615 | |
|---|---|---|
| 1013 | 1013 | // if we're visible and running and not in the middle of a resize, draw |
| 1014 | 1014 | if (m_target != NULL) |
| 1015 | 1015 | { |
| 1016 | ||
| 1017 | ||
| 1018 | ||
| 1019 | 1016 | int tempwidth, tempheight; |
| 1020 | 1017 | |
| 1021 | 1018 | // see if the games video mode has changed |
| r244614 | r244615 | |
| 1044 | 1041 | |
| 1045 | 1042 | if (osd_event_wait(m_rendered_event, event_wait_ticks)) |
| 1046 | 1043 | { |
| 1047 | ||
| 1048 | 1044 | // ensure the target bounds are up-to-date, and then get the primitives |
| 1049 | 1045 | |
| 1050 | 1046 | render_primitive_list &primlist = *m_renderer->get_primitives(); |
| r244614 | r244615 | |
| 1150 | 1146 | SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); |
| 1151 | 1147 | |
| 1152 | 1148 | /* FIXME: A reminder that gamma is wrong throughout MAME. Currently, SDL2.0 doesn't seem to |
| 1153 | * support the following attribute although my hardware lists GL_ARB_framebuffer_sRGB as an extension. | |
| 1154 | * | |
| 1155 | * SDL_GL_SetAttribute( SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1 ); | |
| 1156 | * | |
| 1157 | */ | |
| 1149 | * support the following attribute although my hardware lists GL_ARB_framebuffer_sRGB as an extension. | |
| 1150 | * | |
| 1151 | * SDL_GL_SetAttribute( SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1 ); | |
| 1152 | * | |
| 1153 | */ | |
| 1158 | 1154 | window->m_extra_flags = SDL_WINDOW_OPENGL; |
| 1159 | 1155 | } |
| 1160 | 1156 | else |
| r244614 | r244615 | |
| 1173 | 1169 | window->monitor()->position_size().x, window->monitor()->position_size().y, |
| 1174 | 1170 | tempwidth, tempheight, window->m_extra_flags); |
| 1175 | 1171 | //window().sdl_window() = SDL_CreateWindow(window().m_title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, |
| 1176 | // | |
| 1172 | // width, height, m_extra_flags); | |
| 1177 | 1173 | |
| 1178 | 1174 | if ( window->m_sdl_window == NULL ) |
| 1179 | 1175 | { |
| r244614 | r244615 | |
| 1235 | 1231 | #if (SDL_VERSION_ATLEAST(1,2,10)) && (!defined(SDLMAME_EMSCRIPTEN)) |
| 1236 | 1232 | SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, video_config.waitvsync ? 1 : 0); |
| 1237 | 1233 | #endif |
| 1238 | // | |
| 1234 | // load_gl_lib(window->machine()); | |
| 1239 | 1235 | } |
| 1240 | 1236 | |
| 1241 | 1237 | // create the SDL surface (which creates the window in windowed mode) |
| r244614 | r244615 | |
|---|---|---|
| 53 | 53 | #endif |
| 54 | 54 | m_prescale(1), |
| 55 | 55 | m_primlist(NULL) |
| 56 | ||
| 56 | {} | |
| 57 | 57 | virtual ~osd_window() { } |
| 58 | 58 | |
| 59 | 59 | virtual render_target *target() = 0; |
| r244614 | r244615 | |
| 81 | 81 | virtual win_monitor_info *winwindow_video_window_monitor(const RECT *proposed) = 0; |
| 82 | 82 | |
| 83 | 83 | // window handle and info |
| 84 | HWND m_hwnd; | |
| 85 | HDC m_dc; // only used by GDI renderer! | |
| 84 | HWND m_hwnd; | |
| 85 | HDC m_dc; // only used by GDI renderer! | |
| 86 | 86 | // FIXME: this is the same as win_window_list->m_hwnd, i.e. first window. |
| 87 | 87 | // During modularization, this should be passed in differently |
| 88 | HWND | |
| 88 | HWND m_focus_hwnd; | |
| 89 | 89 | |
| 90 | int | |
| 90 | int m_resize_state; | |
| 91 | 91 | #endif |
| 92 | 92 | |
| 93 | osd_window_config m_win_config; | |
| 94 | int m_prescale; | |
| 95 | render_primitive_list *m_primlist; | |
| 93 | osd_window_config m_win_config; | |
| 94 | int m_prescale; | |
| 95 | render_primitive_list *m_primlist; | |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | 98 | class osd_renderer |
| r244614 | r244615 | |
| 100 | 100 | public: |
| 101 | 101 | |
| 102 | 102 | /* Generic flags */ |
| 103 | static const int FLAG_NONE = 0x0000; | |
| 104 | static const int FLAG_NEEDS_OPENGL = 0x0001; | |
| 105 | static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; | |
| 103 | static const int FLAG_NONE = 0x0000; | |
| 104 | static const int FLAG_NEEDS_OPENGL = 0x0001; | |
| 105 | static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; | |
| 106 | 106 | |
| 107 | 107 | /* SDL 1.2 flags */ |
| 108 | static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; | |
| 109 | static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; | |
| 108 | static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; | |
| 109 | static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; | |
| 110 | 110 | |
| 111 | 111 | osd_renderer(osd_window *window, const int flags) |
| 112 | 112 | : m_window(window), m_flags(flags) { } |
| r244614 | r244615 | |
| 139 | 139 | |
| 140 | 140 | protected: |
| 141 | 141 | /* Internal flags */ |
| 142 | static const int FI_CHANGED | |
| 142 | static const int FI_CHANGED = 0x010000; | |
| 143 | 143 | |
| 144 | 144 | private: |
| 145 | 145 | |
| 146 | osd_window | |
| 146 | osd_window *m_window; | |
| 147 | 147 | int m_flags; |
| 148 | 148 | }; |
| 149 | 149 | |
| r244614 | r244615 | |
| 161 | 161 | m_resize_height(0), |
| 162 | 162 | m_last_resize(0), |
| 163 | 163 | #endif |
| 164 | | |
| 164 | m_minwidth(0), m_minheight(0), | |
| 165 | 165 | m_rendered_event(0), m_target(0), |
| 166 | 166 | #if (SDLMAME_SDL2) |
| 167 | 167 | m_sdl_window(NULL), |
| r244614 | r244615 | |
| 256 | 256 | SDL_Surface *m_sdlsurf; |
| 257 | 257 | #endif |
| 258 | 258 | |
| 259 | int | |
| 259 | int m_extra_flags; | |
| 260 | 260 | |
| 261 | 261 | void set_renderer(osd_renderer *renderer) |
| 262 | 262 | { |
| r244614 | r244615 | |
| 281 | 281 | sdl_monitor_info * m_monitor; |
| 282 | 282 | int m_fullscreen; |
| 283 | 283 | int m_index; |
| 284 | osd_renderer * | |
| 284 | osd_renderer * m_renderer; | |
| 285 | 285 | |
| 286 | 286 | // static callbacks ... |
| 287 | 287 |
| r244614 | r244615 | |
|---|---|---|
| 335 | 335 | |
| 336 | 336 | base * d3dintf; // D3D interface |
| 337 | 337 | |
| 338 | running_machine * machine; | |
| 339 | d3d::renderer * d3d; // D3D renderer | |
| 338 | running_machine * machine; | |
| 339 | d3d::renderer * d3d; // D3D renderer | |
| 340 | 340 | |
| 341 | 341 | bool master_enable; // overall enable flag |
| 342 | 342 | bool vector_enable; // vector post-processing enable flag |
| r244614 | r244615 | |
|---|---|---|
| 19 | 19 | // MAMEOS headers |
| 20 | 20 | #include "window.h" |
| 21 | 21 | |
| 22 | #include <bgfxplatform.h> | |
| 22 | #include <bgfxplatform.h> | |
| 23 | 23 | #include <bgfx.h> |
| 24 | 24 | |
| 25 | 25 | class renderer_bgfx : public osd_renderer |
| r244614 | r244615 | |
| 95 | 95 | bgfx::winSetHwnd(window().m_hwnd); |
| 96 | 96 | bgfx::init(); |
| 97 | 97 | bgfx::reset(rect_width(&client), rect_height(&client), BGFX_RESET_VSYNC); |
| 98 | ||
| 98 | ||
| 99 | 99 | // Enable debug text. |
| 100 | 100 | bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT); |
| 101 | 101 | |
| r244614 | r244615 | |
| 165 | 165 | */ |
| 166 | 166 | case render_primitive::LINE: |
| 167 | 167 | // check if it's really a point |
| 168 | /* | |
| 169 | if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0)) | |
| 170 | { | |
| 171 | curPrimitive=GL_POINTS; | |
| 172 | } else { | |
| 173 | curPrimitive=GL_LINES; | |
| 174 | } | |
| 168 | /* | |
| 169 | if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0)) | |
| 170 | { | |
| 171 | curPrimitive=GL_POINTS; | |
| 172 | } else { | |
| 173 | curPrimitive=GL_LINES; | |
| 174 | } | |
| 175 | 175 | |
| 176 | if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive) | |
| 177 | { | |
| 178 | glEnd(); | |
| 179 | pendingPrimitive=GL_NO_PRIMITIVE; | |
| 180 | } | |
| 176 | if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive) | |
| 177 | { | |
| 178 | glEnd(); | |
| 179 | pendingPrimitive=GL_NO_PRIMITIVE; | |
| 180 | } | |
| 181 | 181 | |
| 182 | if ( pendingPrimitive==GL_NO_PRIMITIVE ) | |
| 183 | { | |
| 184 | set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); | |
| 185 | } | |
| 182 | if ( pendingPrimitive==GL_NO_PRIMITIVE ) | |
| 183 | { | |
| 184 | set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); | |
| 185 | } | |
| 186 | 186 | |
| 187 | ||
| 187 | glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); | |
| 188 | 188 | |
| 189 | if(pendingPrimitive!=curPrimitive) | |
| 190 | { | |
| 191 | glBegin(curPrimitive); | |
| 192 | pendingPrimitive=curPrimitive; | |
| 193 | } | |
| 189 | if(pendingPrimitive!=curPrimitive) | |
| 190 | { | |
| 191 | glBegin(curPrimitive); | |
| 192 | pendingPrimitive=curPrimitive; | |
| 193 | } | |
| 194 | 194 | |
| 195 | // check if it's really a point | |
| 196 | if (curPrimitive==GL_POINTS) | |
| 197 | { | |
| 198 | glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); | |
| 199 | } | |
| 200 | else | |
| 201 | { | |
| 202 | glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); | |
| 203 | glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs); | |
| 204 | }*/ | |
| 195 | // check if it's really a point | |
| 196 | if (curPrimitive==GL_POINTS) | |
| 197 | { | |
| 198 | glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); | |
| 199 | } | |
| 200 | else | |
| 201 | { | |
| 202 | glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); | |
| 203 | glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs); | |
| 204 | }*/ | |
| 205 | 205 | break; |
| 206 | 206 | |
| 207 | 207 | case render_primitive::QUAD: |
| 208 | 208 | /* |
| 209 | if(pendingPrimitive!=GL_NO_PRIMITIVE) | |
| 210 | { | |
| 211 | glEnd(); | |
| 212 | pendingPrimitive=GL_NO_PRIMITIVE; | |
| 213 | } | |
| 209 | if(pendingPrimitive!=GL_NO_PRIMITIVE) | |
| 210 | { | |
| 211 | glEnd(); | |
| 212 | pendingPrimitive=GL_NO_PRIMITIVE; | |
| 213 | } | |
| 214 | 214 | |
| 215 | ||
| 215 | glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); | |
| 216 | 216 | |
| 217 | ||
| 217 | set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); | |
| 218 | 218 | |
| 219 | ||
| 219 | texture = texture_update(window, prim, 0); | |
| 220 | 220 | |
| 221 | ||
| 222 | sdl->texVerticex[0]=prim->bounds.x0 + hofs; | |
| 223 | sdl->texVerticex[1]=prim->bounds.y0 + vofs; | |
| 224 | sdl->texVerticex[2]=prim->bounds.x1 + hofs; | |
| 225 | sdl->texVerticex[3]=prim->bounds.y0 + vofs; | |
| 226 | sdl->texVerticex[4]=prim->bounds.x1 + hofs; | |
| 227 | sdl->texVerticex[5]=prim->bounds.y1 + vofs; | |
| 228 | sdl->texVerticex[6]=prim->bounds.x0 + hofs; | |
| 229 | sdl->texVerticex[7]=prim->bounds.y1 + vofs; | |
| 230 | 221 | |
| 231 | glDrawArrays(GL_QUADS, 0, 4); | |
| 222 | sdl->texVerticex[0]=prim->bounds.x0 + hofs; | |
| 223 | sdl->texVerticex[1]=prim->bounds.y0 + vofs; | |
| 224 | sdl->texVerticex[2]=prim->bounds.x1 + hofs; | |
| 225 | sdl->texVerticex[3]=prim->bounds.y0 + vofs; | |
| 226 | sdl->texVerticex[4]=prim->bounds.x1 + hofs; | |
| 227 | sdl->texVerticex[5]=prim->bounds.y1 + vofs; | |
| 228 | sdl->texVerticex[6]=prim->bounds.x0 + hofs; | |
| 229 | sdl->texVerticex[7]=prim->bounds.y1 + vofs; | |
| 230 | ||
| 231 | glDrawArrays(GL_QUADS, 0, 4); | |
| 232 | 232 | */ |
| 233 | 233 | break; |
| 234 | 234 | |
| r244614 | r244615 | |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | window().m_primlist->release_lock(); |
| 241 | // Advance to next frame. Rendering thread will be kicked to | |
| 241 | // Advance to next frame. Rendering thread will be kicked to | |
| 242 | 242 | // process submitted rendering primitives. |
| 243 | 243 | bgfx::frame(); |
| 244 | 244 |
| r244614 | r244615 | |
|---|---|---|
| 140 | 140 | /* mode_enum_info holds information during a display mode enumeration */ |
| 141 | 141 | struct mode_enum_info |
| 142 | 142 | { |
| 143 | renderer_dd * renderer; | |
| 144 | osd_window * window; | |
| 143 | renderer_dd * renderer; | |
| 144 | osd_window * window; | |
| 145 | 145 | INT32 minimum_width, minimum_height; |
| 146 | 146 | INT32 target_width, target_height; |
| 147 | 147 | double target_refresh; |
| r244614 | r244615 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | int renderer_gdi::create() |
| 96 | 96 | { |
| 97 | ||
| 98 | 97 | // fill in the bitmap info header |
| 99 | 98 | bminfo.bmiHeader.biSize = sizeof(bminfo.bmiHeader); |
| 100 | 99 | bminfo.bmiHeader.biPlanes = 1; |
| r244614 | r244615 | |
| 117 | 116 | |
| 118 | 117 | void renderer_gdi::destroy() |
| 119 | 118 | { |
| 120 | ||
| 121 | 119 | // free the bitmap memory |
| 122 | 120 | if (bmdata != NULL) |
| 123 | 121 | global_free_array(bmdata); |
| r244614 | r244615 | |
|---|---|---|
| 64 | 64 | MONITORINFOEX m_info; // most recently retrieved info |
| 65 | 65 | |
| 66 | 66 | float m_aspect; // computed/configured aspect ratio of the physical device |
| 67 | char * | |
| 67 | char * m_name; | |
| 68 | 68 | }; |
| 69 | 69 | |
| 70 | 70 |
| r244614 | r244615 | |
|---|---|---|
| 53 | 53 | #endif |
| 54 | 54 | m_prescale(1), |
| 55 | 55 | m_primlist(NULL) |
| 56 | ||
| 56 | {} | |
| 57 | 57 | virtual ~osd_window() { } |
| 58 | 58 | |
| 59 | 59 | virtual render_target *target() = 0; |
| r244614 | r244615 | |
| 81 | 81 | virtual win_monitor_info *winwindow_video_window_monitor(const RECT *proposed) = 0; |
| 82 | 82 | |
| 83 | 83 | // window handle and info |
| 84 | HWND m_hwnd; | |
| 85 | HDC m_dc; // only used by GDI renderer! | |
| 84 | HWND m_hwnd; | |
| 85 | HDC m_dc; // only used by GDI renderer! | |
| 86 | 86 | // FIXME: this is the same as win_window_list->m_hwnd, i.e. first window. |
| 87 | 87 | // During modularization, this should be passed in differently |
| 88 | HWND | |
| 88 | HWND m_focus_hwnd; | |
| 89 | 89 | |
| 90 | int | |
| 90 | int m_resize_state; | |
| 91 | 91 | #endif |
| 92 | 92 | |
| 93 | osd_window_config m_win_config; | |
| 94 | int m_prescale; | |
| 95 | render_primitive_list * m_primlist; | |
| 93 | osd_window_config m_win_config; | |
| 94 | int m_prescale; | |
| 95 | render_primitive_list * m_primlist; | |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | 98 | class osd_renderer |
| r244614 | r244615 | |
| 100 | 100 | public: |
| 101 | 101 | |
| 102 | 102 | /* Generic flags */ |
| 103 | static const int FLAG_NONE = 0x0000; | |
| 104 | static const int FLAG_NEEDS_OPENGL = 0x0001; | |
| 105 | static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; | |
| 103 | static const int FLAG_NONE = 0x0000; | |
| 104 | static const int FLAG_NEEDS_OPENGL = 0x0001; | |
| 105 | static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; | |
| 106 | 106 | |
| 107 | 107 | /* SDL 1.2 flags */ |
| 108 | static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; | |
| 109 | static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; | |
| 108 | static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; | |
| 109 | static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; | |
| 110 | 110 | |
| 111 | 111 | osd_renderer(osd_window *window, const int flags) |
| 112 | 112 | : m_window(window), m_flags(flags) { } |
| r244614 | r244615 | |
| 139 | 139 | |
| 140 | 140 | protected: |
| 141 | 141 | /* Internal flags */ |
| 142 | static const int FI_CHANGED | |
| 142 | static const int FI_CHANGED = 0x010000; | |
| 143 | 143 | |
| 144 | 144 | private: |
| 145 | 145 | |
| 146 | osd_window | |
| 146 | osd_window *m_window; | |
| 147 | 147 | int m_flags; |
| 148 | 148 | }; |
| 149 | 149 |
| r244614 | r244615 | |
|---|---|---|
| 399 | 399 | $(OSDOBJ)/modules/netdev/none.o \ |
| 400 | 400 | |
| 401 | 401 | ifdef USE_OPENGL |
| 402 | OSDOBJS += | |
| 402 | OSDOBJS += $(WINOBJ)/../sdl/drawogl.o $(WINOBJ)/../sdl/gl_shader_tool.o $(WINOBJ)/../sdl/gl_shader_mgr.o | |
| 403 | 403 | OBJDIRS += $(WINOBJ)/../sdl |
| 404 | 404 | |
| 405 | 405 | DEFS += -DUSE_OPENGL=1 |
| r244614 | r244615 | |
| 414 | 414 | endif |
| 415 | 415 | |
| 416 | 416 | ifndef DONT_USE_NETWORK |
| 417 | DEFS += | |
| 417 | DEFS += -DSDLMAME_NET_PCAP | |
| 418 | 418 | endif |
| 419 | 419 | |
| 420 | 420 | CCOMFLAGS += -DDIRECT3D_VERSION=0x0900 |
| r244614 | r244615 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | #define BARE_BUILD_VERSION "0.15 | |
| 11 | #define BARE_BUILD_VERSION "0.159" | |
| 12 | 12 | |
| 13 | 13 | extern const char bare_build_version[]; |
| 14 | 14 | extern const char build_version[]; |
| https://github.com/mamedev/mame/commit/6ae44e46f91aa2bd74d9895e6bfd345baebd3d22 |
| Previous | 199869 Revisions | Next |