mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
Merge remote-tracking branch 'upstream/master' into mui
This commit is contained in:
commit
b3578a6ec8
@ -10,7 +10,7 @@
|
||||
<info name="serial" value="09845-65516" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x091000" />
|
||||
<feature name="base" value="0x091000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65516-11_10-revb-mass_storage.bin" size="0x2000" crc="1cc55094" sha1="d0ffa8e5da9483f3ab2802a1a7092eddd40cddc0" offset="0x0000" />
|
||||
<rom name="09845-65516-11_20-revb-mass_storage.bin" size="0x2000" crc="b95ac9de" sha1="6263f5849f7789d3d47cbbf4c249c256d2d50b7b" offset="0x2000" />
|
||||
@ -25,7 +25,7 @@
|
||||
<info name="serial" value="09845-65516" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x091000" />
|
||||
<feature name="base" value="0x091000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65516-11_10-revc-mass_storage.bin" size="0x2000" crc="1cc55094" sha1="d0ffa8e5da9483f3ab2802a1a7092eddd40cddc0" offset="0x0000" />
|
||||
<rom name="09845-65516-11_20-revc-mass_storage.bin" size="0x2000" crc="20025674" sha1="84adabc8b620c208cac1b9e7a88cf20f4fbf83a3" offset="0x2000" />
|
||||
@ -40,7 +40,7 @@
|
||||
<info name="serial" value="09845-65516" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x091000" />
|
||||
<feature name="base" value="0x091000" />
|
||||
<dataarea name="rom" size="0x6000" width="16" endianness="big">
|
||||
<rom name="09845-65516-11_10-revd-mass_storage.bin" size="0x2000" crc="1cc55094" sha1="d0ffa8e5da9483f3ab2802a1a7092eddd40cddc0" offset="0x0000" />
|
||||
<rom name="09845-65516-11_20-revd-mass_storage.bin" size="0x2000" crc="20025674" sha1="84adabc8b620c208cac1b9e7a88cf20f4fbf83a3" offset="0x2000" />
|
||||
@ -56,7 +56,7 @@
|
||||
<info name="serial" value="09845-65517" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x073000" />
|
||||
<feature name="base" value="0x073000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65517-07_30-revb-graphics.bin" size="0x2000" crc="00f49b6e" sha1="81bcab408ea72e0ab3756226184adbb5966e2e65" offset="0x0000" />
|
||||
<rom name="09845-65517-07_40-revb-graphics.bin" size="0x2000" crc="511d6c82" sha1="4546767a92d3059dc47fe6a9ca8a5db0fdcda904" offset="0x2000" />
|
||||
@ -71,8 +71,8 @@
|
||||
<info name="serial" value="09845-65518" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<!-- Correct BSC is probably 0x0b (or ROM wouldn't belong to LPU)-->
|
||||
<feature name="base" value="0x0b5000" />
|
||||
<!-- Correct BSC is probably 0x0b (or ROM wouldn't belong to LPU)-->
|
||||
<feature name="base" value="0x0b5000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65518-11_50-reva-io_lpu.bin" size="0x2000" crc="98bd769e" sha1="8c28f838982d1b77f5b5dfd0923869bcff755a78" offset="0x0000" />
|
||||
<rom name="09845-65518-11_60-reva-io_lpu.bin" size="0x2000" crc="4fc249f8" sha1="cb80e382eb456d6bead110077536564c1a170071" offset="0x2000" />
|
||||
@ -87,7 +87,7 @@
|
||||
<info name="serial" value="09845-65518" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x0b5000" />
|
||||
<feature name="base" value="0x0b5000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65518-13_50-revb-io_lpu.bin" size="0x2000" crc="3d642769" sha1="18e41b9d6c39c26f42d197ef455b4085b936b3da" offset="0x0000" />
|
||||
<rom name="09845-65518-13_60-revb-io_lpu.bin" size="0x2000" crc="4fc249f8" sha1="cb80e382eb456d6bead110077536564c1a170071" offset="0x2000" />
|
||||
@ -102,7 +102,7 @@
|
||||
<info name="serial" value="09845-65519" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x094000" />
|
||||
<feature name="base" value="0x094000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65519-09_40-revb-io_ppu.bin" size="0x2000" crc="fb49c7d8" sha1="f2e4f196a4fb3859081495e1be7062afc7769544" offset="0x0000" />
|
||||
<rom name="09845-65519-09_50-revb-io_ppu.bin" size="0x2000" crc="861a77c6" sha1="6f419275d2cf13daa9345ea55e03d5ad15e438a7" offset="0x2000" />
|
||||
@ -117,7 +117,7 @@
|
||||
<info name="serial" value="09845-65519" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x094000" />
|
||||
<feature name="base" value="0x094000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65519-11_40-revc-io_ppu.bin" size="0x2000" crc="de2d5b1e" sha1="1b14e77de85eba555f576bddc5f5a84ae741875b" offset="0x0000" />
|
||||
<rom name="09845-65519-11_50-revc-io_ppu.bin" size="0x2000" crc="861a77c6" sha1="6f419275d2cf13daa9345ea55e03d5ad15e438a7" offset="0x2000" />
|
||||
@ -132,7 +132,7 @@
|
||||
<info name="serial" value="09845-65521" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x0b1000" />
|
||||
<feature name="base" value="0x0b1000" />
|
||||
<dataarea name="rom" size="0x2000" width="16" endianness="big">
|
||||
<rom name="09845-65521-13_10-reva-advanced_programming.bin" size="0x2000" crc="c39a193e" sha1="0193fa7308c58469517973b1425c966460283b37" offset="0x0000" />
|
||||
</dataarea>
|
||||
@ -146,7 +146,7 @@
|
||||
<info name="serial" value="09845-65524" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x0f4000" />
|
||||
<feature name="base" value="0x0f4000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-65524-17_40-reva-assembly_execution.bin" size="0x2000" crc="ff91e559" sha1="52d8d1d535cf1cd39a1e794115f94dced545d1af" offset="0x0000" />
|
||||
<rom name="09845-65524-17_50-reva-assembly_execution.bin" size="0x2000" crc="52d8c5b4" sha1="c015fbdc14d9dd2eb5f23cb9e03412fb05b81e42" offset="0x2000" />
|
||||
@ -161,7 +161,7 @@
|
||||
<info name="serial" value="09845-65525" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x0f4000" />
|
||||
<feature name="base" value="0x0f4000" />
|
||||
<dataarea name="rom" size="0x8000" width="16" endianness="big" >
|
||||
<rom name="09845-65525-17_40-reva-assembly_execution_and_development.bin" size="0x2000" crc="ff91e559" sha1="52d8d1d535cf1cd39a1e794115f94dced545d1af" offset="0x0000" />
|
||||
<rom name="09845-65525-17_50-reva-assembly_execution_and_development.bin" size="0x2000" crc="52d8c5b4" sha1="c015fbdc14d9dd2eb5f23cb9e03412fb05b81e42" offset="0x2000" />
|
||||
@ -171,7 +171,7 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- To be fixed, cannot be used as is -->
|
||||
<!-- To be fixed, cannot be used as is -->
|
||||
<software name="image45">
|
||||
<description>IMAGE/45 Database Manager (Rev B)</description>
|
||||
<year>198?</year>
|
||||
@ -192,7 +192,7 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- To be fixed, cannot be used as is -->
|
||||
<!-- To be fixed, cannot be used as is -->
|
||||
<software name="image45c" cloneof="image45">
|
||||
<description>IMAGE/45 Database Manager (Rev C)</description>
|
||||
<year>198?</year>
|
||||
@ -220,14 +220,14 @@
|
||||
<info name="serial" value="09845-65528" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x0f3000" />
|
||||
<feature name="base" value="0x0f3000" />
|
||||
<dataarea name="rom" size="0x2000" width="16" endianness="big">
|
||||
<rom name="09845-65528-17_30-reva-structured_programming.bin" size="0x2000" crc="f2829f93" sha1="74d760eb1ff57e3c9e8deee131d4d56bf4ef0b05" offset="0x0000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- To be fixed, cannot be used as is -->
|
||||
<!-- To be fixed, cannot be used as is -->
|
||||
<software name="resmgmt">
|
||||
<description>Resource Management</description>
|
||||
<year>198?</year>
|
||||
@ -253,7 +253,7 @@
|
||||
<info name="serial" value="09845-66520" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x250000" />
|
||||
<feature name="base" value="0x250000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big" >
|
||||
<rom name="09845-66520-45_00-test_rom.bin" size="0x2000" crc="95a5b299" sha1="ef362f8fe0049ba4bb483aca873812ceaa4c8d7c" offset="0x0000" />
|
||||
<rom name="09845-66520-45_10-test_rom.bin" size="0x2000" crc="257e4c66" sha1="4443ca1e7b9565c290e3c2f743602bdf64d0cae0" offset="0x2000" />
|
||||
@ -268,7 +268,7 @@
|
||||
<info name="serial" value="09845-67965" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x110000" />
|
||||
<feature name="base" value="0x110000" />
|
||||
<dataarea name="rom" size="0x8000" width="16" endianness="big">
|
||||
<rom name="09845-67965-21_00-reva-basic_data_comm_async.bin" size="0x2000" crc="cc82edcd" sha1="cb89c3e31609c73db5c4d9d99d91acd914b1f11f" offset="0x0000" />
|
||||
<rom name="09845-67965-21_10-reva-basic_data_comm_async.bin" size="0x2000" crc="f0dda2fb" sha1="46e0330215a20a281b66b16140dcfbef37510519" offset="0x2000" />
|
||||
@ -285,7 +285,7 @@
|
||||
<info name="serial" value="09845-67986" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x114000" />
|
||||
<feature name="base" value="0x114000" />
|
||||
<dataarea name="rom" size="0x4000" width="16" endianness="big">
|
||||
<rom name="09845-67986-21_40_rje_datacom_bisync.bin" size="0x2000" crc="59123e07" sha1="3baf9066bca2307633dabac4b4873c6f2030c529" offset="0x0000" />
|
||||
<rom name="09845-67986-21_50_rje_datacom_bisync.bin" size="0x2000" crc="a753991a" sha1="33a8a059d212a4ee3a656f3c11a0d8cdaeb64c3a" offset="0x2000" />
|
||||
@ -300,7 +300,7 @@
|
||||
<info name="serial" value="98770-65501" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x073000" />
|
||||
<feature name="base" value="0x073000" />
|
||||
<dataarea name="rom" size="0x8000" width="16" endianness="big">
|
||||
<rom name="98770-65501-07_30-revd-color_graphics.bin" size="0x2000" crc="012d729e" sha1="f2a6a25bfaff7aecabdc608bc07613a10641ccce" offset="0x0000" />
|
||||
<rom name="98770-65501-07_40-revd-color_graphics.bin" size="0x2000" crc="656799f5" sha1="0ba3f9018eed8c385f600fc78b70e4ce903e5233" offset="0x2000" />
|
||||
@ -317,7 +317,7 @@
|
||||
<info name="serial" value="98770-65501" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x072000" />
|
||||
<feature name="base" value="0x072000" />
|
||||
<dataarea name="rom" size="0xa000" width="16" endianness="big">
|
||||
<rom name="98780-65501-07_20-reva-enhancend_graphics.bin" size="0x2000" crc="57598821" sha1="cb6e46d7226bee5c3cbe33176c44adc64477e5c2" offset="0x0000" />
|
||||
<rom name="98780-65501-07_30-reva-enhancend_graphics.bin" size="0x2000" crc="19278727" sha1="3321cf18005f90db39992b31224697b62ab4682b" offset="0x2000" />
|
||||
@ -335,7 +335,7 @@
|
||||
<info name="serial" value="98780-65501" />
|
||||
|
||||
<part name="rom" interface="hp9845b_rom">
|
||||
<feature name="base" value="0x072000" />
|
||||
<feature name="base" value="0x072000" />
|
||||
<dataarea name="rom" size="0xa000" width="16" endianness="big">
|
||||
<rom name="98780-65501-07_20-revb-enhancend_graphics.bin" size="0x2000" crc="57598821" sha1="cb6e46d7226bee5c3cbe33176c44adc64477e5c2" offset="0x0000" />
|
||||
<rom name="98780-65501-07_30-revb-enhancend_graphics.bin" size="0x2000" crc="19278727" sha1="3321cf18005f90db39992b31224697b62ab4682b" offset="0x2000" />
|
||||
|
@ -1075,26 +1075,26 @@ Known undumped prototypes:
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="zaku">
|
||||
<description>Zaku</description>
|
||||
<year>2009</year>
|
||||
<publisher>Super Fighter Team / Penguinet</publisher>
|
||||
<part name="cart" interface="lynx_cart">
|
||||
<dataarea name="rom" size="0x80000">
|
||||
<rom name="Zaku.bin" size="0x80000" crc="4ea845da" sha1="2723c29b4e00dd76402e9fc4dc50cb59b673b507" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
<software name="zaku">
|
||||
<description>Zaku</description>
|
||||
<year>2009</year>
|
||||
<publisher>Super Fighter Team / Penguinet</publisher>
|
||||
<part name="cart" interface="lynx_cart">
|
||||
<dataarea name="rom" size="0x80000">
|
||||
<rom name="Zaku.bin" size="0x80000" crc="4ea845da" sha1="2723c29b4e00dd76402e9fc4dc50cb59b673b507" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="zakud" cloneof="zaku">
|
||||
<description>Zaku (Demo)</description>
|
||||
<year>2009</year>
|
||||
<publisher>Penguinet</publisher>
|
||||
<part name="cart" interface="lynx_cart">
|
||||
<dataarea name="rom" size="0x40000">
|
||||
<rom name="zakudemo.bin" size="0x40000" crc="b3747c71" sha1="530ea8c0a820746425017cbcc9f766531f5c6333" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
<software name="zakud" cloneof="zaku">
|
||||
<description>Zaku (Demo)</description>
|
||||
<year>2009</year>
|
||||
<publisher>Penguinet</publisher>
|
||||
<part name="cart" interface="lynx_cart">
|
||||
<dataarea name="rom" size="0x40000">
|
||||
<rom name="zakudemo.bin" size="0x40000" crc="b3747c71" sha1="530ea8c0a820746425017cbcc9f766531f5c6333" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
||||
|
5368
hash/neogeo.xml
5368
hash/neogeo.xml
File diff suppressed because it is too large
Load Diff
1008
hash/pce_tourvision.xml
Normal file
1008
hash/pce_tourvision.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,16 +7,16 @@
|
||||
|
||||
<!-- *K : Chuugaku Koumin -->
|
||||
|
||||
<software name="chuukoum" supported="no" >
|
||||
<description>Chuugaku Koumin (1K - 0BE311)</description>
|
||||
<year>2000?</year>
|
||||
<publisher>Benesse Corporation</publisher>
|
||||
<part name="cart" interface="pockchalv1_cart">
|
||||
<dataarea name="rom" size="0x100000">
|
||||
<rom name="0BE311.bin" size="0x100000" crc="bf9da3ea" sha1="423266d16f6fecc367223c45658e3802176f1f7a" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
<software name="chuukoum" supported="no" >
|
||||
<description>Chuugaku Koumin (1K - 0BE311)</description>
|
||||
<year>2000?</year>
|
||||
<publisher>Benesse Corporation</publisher>
|
||||
<part name="cart" interface="pockchalv1_cart">
|
||||
<dataarea name="rom" size="0x100000">
|
||||
<rom name="0BE311.bin" size="0x100000" crc="bf9da3ea" sha1="423266d16f6fecc367223c45658e3802176f1f7a" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
|
||||
</softwarelist>
|
||||
|
@ -39,7 +39,7 @@
|
||||
Fxxxx on the V30 so that it can boot.
|
||||
RAM from 0xB0000-0xBFFFF is the CGA framebuffer as usual.
|
||||
|
||||
C800-CBFF?: RAM, used as scratchpad space by the software
|
||||
C800-CBFF?: RAM, used as scratchpad space by the software
|
||||
CF00: PC memory pointer (bits 0-7)
|
||||
CF01: PC memory pointer (bits 8-15)
|
||||
CF02: PC memory pointer (bits 16-23)
|
||||
@ -53,10 +53,10 @@
|
||||
CF31: control/flags: bit 4 = 1 to assert reset on V30, 5 = 1 to assert halt on V30
|
||||
|
||||
TODO:
|
||||
- Code at $70b0-$70c5 waits for the V30 to answer FPU presence.
|
||||
- Code at $70b0-$70c5 waits for the V30 to answer FPU presence.
|
||||
- What's going on at CF0E/CF0F?
|
||||
- The manual indicates there is no ROM; special drivers installed into ProDOS 8
|
||||
provide the RAMdisk and A2-accessing-PC-drives functionality.
|
||||
- The manual indicates there is no ROM; special drivers installed into ProDOS 8
|
||||
provide the RAMdisk and A2-accessing-PC-drives functionality.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
@ -87,7 +87,7 @@ static ADDRESS_MAP_START(pc_io, AS_IO, 16, a2bus_pcxporter_device )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( pcxporter )
|
||||
MCFG_CPU_ADD("v30", V30, XTAL_14_31818MHz/2) // 7.16 MHz as per manual
|
||||
MCFG_CPU_ADD("v30", V30, XTAL_14_31818MHz/2) // 7.16 MHz as per manual
|
||||
MCFG_CPU_PROGRAM_MAP(pc_map)
|
||||
MCFG_CPU_IO_MAP(pc_io)
|
||||
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
|
||||
@ -372,12 +372,12 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN
|
||||
else if (m_offset >= 0xbc000 && m_offset <= 0xbffff) m_pcmem_space->write_byte(m_offset-0x4000, data);
|
||||
break;
|
||||
|
||||
case 0x72c: // CGA 6845 register select
|
||||
case 0x72c: // CGA 6845 register select
|
||||
m_pcio_space->write_byte(0x3d6, data);
|
||||
m_6845_reg = data;
|
||||
break;
|
||||
|
||||
case 0x72d: // CGA 6845 data read/write
|
||||
case 0x72d: // CGA 6845 data read/write
|
||||
// HACK: adjust the 40 column mode the 6502 sets to
|
||||
// be more within specs.
|
||||
switch (m_6845_reg)
|
||||
@ -407,7 +407,7 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN
|
||||
m_pcio_space->write_byte(0x3d7, data);
|
||||
break;
|
||||
|
||||
case 0x72e: // CGA mode select
|
||||
case 0x72e: // CGA mode select
|
||||
m_pcio_space->write_byte(0x3d8, data);
|
||||
break;
|
||||
|
||||
@ -415,7 +415,7 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN
|
||||
m_pcio_space->write_byte(0x3d9, data);
|
||||
break;
|
||||
|
||||
case 0x730: // control 1
|
||||
case 0x730: // control 1
|
||||
if (data & 0x10) { m_v30->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); m_reset_during_halt = true; }
|
||||
if (data & 0x20)
|
||||
{
|
||||
@ -430,13 +430,13 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x731: // control 2
|
||||
case 0x731: // control 2
|
||||
if (data & 0x10) m_v30->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
if (data & 0x20) m_v30->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
break;
|
||||
|
||||
default:
|
||||
// printf("%02x to C800 at %x\n", data, offset + 0xc800);
|
||||
// printf("%02x to C800 at %x\n", data, offset + 0xc800);
|
||||
m_regs[offset] = data;
|
||||
break;
|
||||
}
|
||||
@ -703,7 +703,7 @@ READ8_MEMBER (a2bus_pcxporter_device::pc_ppi_porta_r)
|
||||
{
|
||||
data = m_ppi_shift_register;
|
||||
}
|
||||
// PIO_LOG(1,"PIO_A_r",("$%02x\n", data));
|
||||
// PIO_LOG(1,"PIO_A_r",("$%02x\n", data));
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -719,13 +719,13 @@ READ8_MEMBER ( a2bus_pcxporter_device::pc_ppi_portc_r )
|
||||
{
|
||||
/* read hi nibble of S2 */
|
||||
data = (data & 0xf0) | ((0x3) & 0x0f);
|
||||
// PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data));
|
||||
// PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* read lo nibble of S2 */
|
||||
data = (data & 0xf0) | (0x0 & 0x0f);
|
||||
// PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data));
|
||||
// PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data));
|
||||
}
|
||||
|
||||
if ( m_ppi_portb & 0x01 )
|
||||
@ -773,6 +773,3 @@ WRITE8_MEMBER( a2bus_pcxporter_device::nmi_enable_w )
|
||||
m_nmi_enabled = BIT(data,7);
|
||||
m_isabus->set_nmi_state(m_nmi_enabled);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ device_generic_cart_interface::device_generic_cart_interface(const machine_confi
|
||||
: device_slot_card_interface(mconfig, device),
|
||||
m_rom(nullptr),
|
||||
m_rom_size(0),
|
||||
m_region(*this, DEVICE_SELF)
|
||||
m_region(*this, DEVICE_SELF)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,8 @@ public:
|
||||
virtual void rom_alloc(size_t size, int width, endianness_t end, const char *tag);
|
||||
virtual void ram_alloc(UINT32 size);
|
||||
|
||||
UINT8* get_rom_base() { return m_rom; }
|
||||
UINT32 get_rom_size() { return m_rom_size; }
|
||||
UINT8* get_rom_base() { return m_rom; }
|
||||
UINT32 get_rom_size() { return m_rom_size; }
|
||||
|
||||
UINT8* get_region_base() { if (m_region.found()) return m_region->base(); return nullptr; }
|
||||
UINT32 get_region_size() { if (m_region.found()) return m_region->bytes(); return 0; }
|
||||
@ -44,8 +44,8 @@ public:
|
||||
UINT32 m_rom_size;
|
||||
dynamic_buffer m_ram;
|
||||
|
||||
// this replaces m_rom for non-user configurable carts!
|
||||
optional_memory_region m_region;
|
||||
// this replaces m_rom for non-user configurable carts!
|
||||
optional_memory_region m_region;
|
||||
};
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ public:
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
UINT32 get_rom_size() {
|
||||
UINT32 get_rom_size() {
|
||||
if (m_cart)
|
||||
{
|
||||
if (!user_loadable())
|
||||
@ -199,7 +199,7 @@ extern const device_type GENERIC_SOCKET;
|
||||
MCFG_GENERIC_INTERFACE(_dev_intf)
|
||||
|
||||
#define MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT(_tag, _slot_intf, _dev_intf, _default) \
|
||||
MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _default, false) \
|
||||
MCFG_GENERIC_INTERFACE(_dev_intf)
|
||||
MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _default, false) \
|
||||
MCFG_GENERIC_INTERFACE(_dev_intf)
|
||||
#endif
|
||||
|
@ -19,14 +19,14 @@ const device_type HP_OPTROM_SLOT = &device_creator<hp_optrom_slot_device>;
|
||||
// |hp_optrom_cart_device|
|
||||
// +---------------------+
|
||||
hp_optrom_cart_device::hp_optrom_cart_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_slot_card_interface(mconfig, *this)
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_slot_card_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
hp_optrom_cart_device::hp_optrom_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, HP_OPTROM_CART, "HP9845 optional ROM cartridge", tag, owner, clock, "hp_optrom_cart", __FILE__),
|
||||
device_slot_card_interface(mconfig, *this)
|
||||
device_t(mconfig, HP_OPTROM_CART, "HP9845 optional ROM cartridge", tag, owner, clock, "hp_optrom_cart", __FILE__),
|
||||
device_slot_card_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
@ -34,12 +34,12 @@ hp_optrom_cart_device::hp_optrom_cart_device(const machine_config &mconfig, cons
|
||||
// |hp_optrom_slot_device|
|
||||
// +---------------------+
|
||||
hp_optrom_slot_device::hp_optrom_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, HP_OPTROM_SLOT, "HP9845 optional ROM Slot", tag, owner, clock, "hp_optrom_slot", __FILE__),
|
||||
device_image_interface(mconfig, *this),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_cart(nullptr),
|
||||
m_base_addr(0),
|
||||
m_end_addr(0)
|
||||
device_t(mconfig, HP_OPTROM_SLOT, "HP9845 optional ROM Slot", tag, owner, clock, "hp_optrom_slot", __FILE__),
|
||||
device_image_interface(mconfig, *this),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_cart(nullptr),
|
||||
m_base_addr(0),
|
||||
m_end_addr(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -49,95 +49,95 @@ hp_optrom_slot_device::~hp_optrom_slot_device()
|
||||
|
||||
void hp_optrom_slot_device::device_start()
|
||||
{
|
||||
m_cart = dynamic_cast<hp_optrom_cart_device *>(get_card_device());
|
||||
m_cart = dynamic_cast<hp_optrom_cart_device *>(get_card_device());
|
||||
}
|
||||
|
||||
void hp_optrom_slot_device::device_config_complete()
|
||||
{
|
||||
update_names(HP_OPTROM_SLOT , "optional_rom" , "optrom");
|
||||
update_names(HP_OPTROM_SLOT , "optional_rom" , "optrom");
|
||||
}
|
||||
|
||||
bool hp_optrom_slot_device::call_load()
|
||||
{
|
||||
logerror("hp_optrom: call_load\n");
|
||||
if (m_cart == nullptr || !m_from_swlist) {
|
||||
logerror("hp_optrom: must be loaded from sw list\n");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
logerror("hp_optrom: call_load\n");
|
||||
if (m_cart == nullptr || !m_from_swlist) {
|
||||
logerror("hp_optrom: must be loaded from sw list\n");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
const char *base_feature = get_feature("base");
|
||||
if (base_feature == nullptr) {
|
||||
logerror("hp_optrom: no 'base' feature\n");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
const char *base_feature = get_feature("base");
|
||||
if (base_feature == nullptr) {
|
||||
logerror("hp_optrom: no 'base' feature\n");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
offs_t base_addr;
|
||||
if (base_feature[ 0 ] != '0' || base_feature[ 1 ] != 'x' || sscanf(&base_feature[ 2 ] , "%x" , &base_addr) != 1) {
|
||||
logerror("hp_optrom: can't parse 'base' feature\n");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
offs_t base_addr;
|
||||
if (base_feature[ 0 ] != '0' || base_feature[ 1 ] != 'x' || sscanf(&base_feature[ 2 ] , "%x" , &base_addr) != 1) {
|
||||
logerror("hp_optrom: can't parse 'base' feature\n");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
// Valid BSC values for ROMs on LPU drawer: 0x07 0x0b .... 0x3b
|
||||
// Valid BSC values for ROMs on PPU drawer: 0x09 0x0d .... 0x3d
|
||||
// (BSC is field in bits 16..21 of base address)
|
||||
// Bit 15 of base address must be 0
|
||||
// Base address must be multiple of 0x1000
|
||||
if ((base_addr & ~0x3f7000UL) != 0 || ((base_addr & 0x30000) != 0x10000 && (base_addr & 0x30000) != 0x30000) || base_addr < 0x70000) {
|
||||
logerror("hp_optrom: illegal base address (%x)\n" , base_addr);
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
// Valid BSC values for ROMs on LPU drawer: 0x07 0x0b .... 0x3b
|
||||
// Valid BSC values for ROMs on PPU drawer: 0x09 0x0d .... 0x3d
|
||||
// (BSC is field in bits 16..21 of base address)
|
||||
// Bit 15 of base address must be 0
|
||||
// Base address must be multiple of 0x1000
|
||||
if ((base_addr & ~0x3f7000UL) != 0 || ((base_addr & 0x30000) != 0x10000 && (base_addr & 0x30000) != 0x30000) || base_addr < 0x70000) {
|
||||
logerror("hp_optrom: illegal base address (%x)\n" , base_addr);
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
auto length = get_software_region_length("rom") / 2;
|
||||
auto length = get_software_region_length("rom") / 2;
|
||||
|
||||
if (length < 0x1000 || length > 0x8000 || (length & 0xfff) != 0 || ((base_addr & 0x7000) + length) > 0x8000) {
|
||||
logerror("hp_optrom: illegal region length (%x)\n" , length);
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
if (length < 0x1000 || length > 0x8000 || (length & 0xfff) != 0 || ((base_addr & 0x7000) + length) > 0x8000) {
|
||||
logerror("hp_optrom: illegal region length (%x)\n" , length);
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
offs_t end_addr = base_addr + length - 1;
|
||||
logerror("hp_optrom: base_addr = %06x end_addr = %06x\n" , base_addr , end_addr);
|
||||
offs_t end_addr = base_addr + length - 1;
|
||||
logerror("hp_optrom: base_addr = %06x end_addr = %06x\n" , base_addr , end_addr);
|
||||
|
||||
m_content.resize(length * 2);
|
||||
UINT8 *buffer = m_content.data();
|
||||
memcpy(buffer , get_software_region("rom") , length * 2);
|
||||
m_content.resize(length * 2);
|
||||
UINT8 *buffer = m_content.data();
|
||||
memcpy(buffer , get_software_region("rom") , length * 2);
|
||||
|
||||
// Install ROM in address space of every CPU
|
||||
for (hp_hybrid_cpu_device& cpu : device_interface_iterator<hp_hybrid_cpu_device>(machine().root_device())) {
|
||||
logerror("hp_optrom: install in %s AS\n" , cpu.tag());
|
||||
cpu.space(AS_PROGRAM).install_rom(base_addr , end_addr , buffer);
|
||||
}
|
||||
// Install ROM in address space of every CPU
|
||||
for (hp_hybrid_cpu_device& cpu : device_interface_iterator<hp_hybrid_cpu_device>(machine().root_device())) {
|
||||
logerror("hp_optrom: install in %s AS\n" , cpu.tag());
|
||||
cpu.space(AS_PROGRAM).install_rom(base_addr , end_addr , buffer);
|
||||
}
|
||||
|
||||
m_base_addr = base_addr;
|
||||
m_end_addr = end_addr;
|
||||
m_base_addr = base_addr;
|
||||
m_end_addr = end_addr;
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
|
||||
void hp_optrom_slot_device::call_unload()
|
||||
{
|
||||
logerror("hp_optrom: call_unload\n");
|
||||
if (m_cart != nullptr && m_base_addr != 0 && m_end_addr != 0) {
|
||||
for (hp_hybrid_cpu_device& cpu : device_interface_iterator<hp_hybrid_cpu_device>(machine().root_device())) {
|
||||
cpu.space(AS_PROGRAM).unmap_read(m_base_addr , m_end_addr);
|
||||
}
|
||||
m_content.resize(0);
|
||||
m_base_addr = 0;
|
||||
m_end_addr = 0;
|
||||
}
|
||||
logerror("hp_optrom: call_unload\n");
|
||||
if (m_cart != nullptr && m_base_addr != 0 && m_end_addr != 0) {
|
||||
for (hp_hybrid_cpu_device& cpu : device_interface_iterator<hp_hybrid_cpu_device>(machine().root_device())) {
|
||||
cpu.space(AS_PROGRAM).unmap_read(m_base_addr , m_end_addr);
|
||||
}
|
||||
m_content.resize(0);
|
||||
m_base_addr = 0;
|
||||
m_end_addr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool hp_optrom_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry)
|
||||
{
|
||||
logerror("hp_optrom: call_softlist_load\n");
|
||||
machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry);
|
||||
return TRUE;
|
||||
logerror("hp_optrom: call_softlist_load\n");
|
||||
machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
std::string hp_optrom_slot_device::get_default_card_software()
|
||||
{
|
||||
return software_get_default_slot("rom");
|
||||
return software_get_default_slot("rom");
|
||||
}
|
||||
|
||||
SLOT_INTERFACE_START(hp_optrom_slot_device)
|
||||
SLOT_INTERFACE_INTERNAL("rom", HP_OPTROM_CART)
|
||||
SLOT_INTERFACE_INTERNAL("rom", HP_OPTROM_CART)
|
||||
SLOT_INTERFACE_END
|
||||
|
@ -16,53 +16,53 @@
|
||||
#include "emu.h"
|
||||
|
||||
class hp_optrom_cart_device : public device_t,
|
||||
public device_slot_card_interface
|
||||
public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
hp_optrom_cart_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
hp_optrom_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
// construction/destruction
|
||||
hp_optrom_cart_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
hp_optrom_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override {}
|
||||
// device-level overrides
|
||||
virtual void device_start() override {}
|
||||
};
|
||||
|
||||
class hp_optrom_slot_device : public device_t,
|
||||
public device_image_interface,
|
||||
public device_slot_interface
|
||||
public device_image_interface,
|
||||
public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
hp_optrom_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~hp_optrom_slot_device();
|
||||
// construction/destruction
|
||||
hp_optrom_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~hp_optrom_slot_device();
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_config_complete() override;
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_config_complete() override;
|
||||
|
||||
// image-level overrides
|
||||
virtual bool call_load() override;
|
||||
virtual void call_unload() override;
|
||||
virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override;
|
||||
// image-level overrides
|
||||
virtual bool call_load() override;
|
||||
virtual void call_unload() override;
|
||||
virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override;
|
||||
|
||||
virtual iodevice_t image_type() const override { return IO_CARTSLOT; }
|
||||
virtual bool is_readable() const override { return true; }
|
||||
virtual bool is_writeable() const override { return false; }
|
||||
virtual bool is_creatable() const override { return false; }
|
||||
virtual bool must_be_loaded() const override { return false; }
|
||||
virtual bool is_reset_on_load() const override { return true; }
|
||||
virtual const option_guide *create_option_guide() const override { return nullptr; }
|
||||
virtual const char *image_interface() const override { return "hp9845b_rom"; }
|
||||
virtual const char *file_extensions() const override { return "bin"; }
|
||||
virtual iodevice_t image_type() const override { return IO_CARTSLOT; }
|
||||
virtual bool is_readable() const override { return true; }
|
||||
virtual bool is_writeable() const override { return false; }
|
||||
virtual bool is_creatable() const override { return false; }
|
||||
virtual bool must_be_loaded() const override { return false; }
|
||||
virtual bool is_reset_on_load() const override { return true; }
|
||||
virtual const option_guide *create_option_guide() const override { return nullptr; }
|
||||
virtual const char *image_interface() const override { return "hp9845b_rom"; }
|
||||
virtual const char *file_extensions() const override { return "bin"; }
|
||||
|
||||
// slot interface overrides
|
||||
virtual std::string get_default_card_software() override;
|
||||
// slot interface overrides
|
||||
virtual std::string get_default_card_software() override;
|
||||
|
||||
protected:
|
||||
hp_optrom_cart_device *m_cart;
|
||||
dynamic_buffer m_content;
|
||||
offs_t m_base_addr;
|
||||
offs_t m_end_addr;
|
||||
hp_optrom_cart_device *m_cart;
|
||||
dynamic_buffer m_content;
|
||||
offs_t m_base_addr;
|
||||
offs_t m_end_addr;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
@ -102,7 +102,7 @@ static MACHINE_CONFIG_FRAGMENT( sub_slot )
|
||||
MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("ctrl_port", intvecs_control_port_device, portA_w))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono_ecs", 0.33)
|
||||
|
||||
MCFG_INTVECS_CONTROL_PORT_ADD("ctrl_port", intvecs_control_port_devices, "keybd")
|
||||
MCFG_INTVECS_CONTROL_PORT_ADD("ctrl_port", intvecs_control_port_devices, "keybd")
|
||||
MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, nullptr)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -92,4 +92,3 @@ UINT8 intv_control_port_device::read_ctrl()
|
||||
SLOT_INTERFACE_START( intv_control_port_devices )
|
||||
SLOT_INTERFACE("handctrl", INTV_HANDCTRL)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
@ -45,8 +45,8 @@ public:
|
||||
intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~intv_control_port_device();
|
||||
|
||||
DECLARE_READ8_MEMBER( ctrl_r ) { return read_ctrl(); }
|
||||
UINT8 read_ctrl();
|
||||
DECLARE_READ8_MEMBER( ctrl_r ) { return read_ctrl(); }
|
||||
UINT8 read_ctrl();
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -100,16 +100,16 @@ UINT8 intvecs_control_port_device::read_portA()
|
||||
|
||||
UINT8 intvecs_control_port_device::read_portB()
|
||||
{
|
||||
UINT8 data = 0;
|
||||
if (m_device)
|
||||
data |= m_device->read_portB();
|
||||
return data;
|
||||
UINT8 data = 0;
|
||||
if (m_device)
|
||||
data |= m_device->read_portB();
|
||||
return data;
|
||||
}
|
||||
|
||||
void intvecs_control_port_device::write_portA(UINT8 data)
|
||||
{
|
||||
if (m_device)
|
||||
m_device->write_portA(data);
|
||||
if (m_device)
|
||||
m_device->write_portA(data);
|
||||
}
|
||||
|
||||
|
||||
@ -119,8 +119,8 @@ void intvecs_control_port_device::write_portA(UINT8 data)
|
||||
|
||||
SLOT_INTERFACE_START( intvecs_control_port_devices )
|
||||
SLOT_INTERFACE("ctrls", ECS_CTRLS)
|
||||
SLOT_INTERFACE("keybd", ECS_KEYBD)
|
||||
SLOT_INTERFACE("synth", ECS_SYNTH)
|
||||
SLOT_INTERFACE("keybd", ECS_KEYBD)
|
||||
SLOT_INTERFACE("synth", ECS_SYNTH)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
||||
@ -139,25 +139,25 @@ SLOT_INTERFACE_END
|
||||
const device_type ECS_CTRLS = &device_creator<intvecs_ctrls_device>;
|
||||
|
||||
static SLOT_INTERFACE_START( intvecs_controller )
|
||||
SLOT_INTERFACE("handctrl", INTV_HANDCTRL)
|
||||
SLOT_INTERFACE("handctrl", INTV_HANDCTRL)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( intvecs_ctrls )
|
||||
MCFG_INTV_CONTROL_PORT_ADD("port1", intvecs_controller, "handctrl")
|
||||
MCFG_INTV_CONTROL_PORT_ADD("port2", intvecs_controller, "handctrl")
|
||||
MCFG_INTV_CONTROL_PORT_ADD("port1", intvecs_controller, "handctrl")
|
||||
MCFG_INTV_CONTROL_PORT_ADD("port2", intvecs_controller, "handctrl")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
machine_config_constructor intvecs_ctrls_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( intvecs_ctrls );
|
||||
return MACHINE_CONFIG_NAME( intvecs_ctrls );
|
||||
}
|
||||
|
||||
intvecs_ctrls_device::intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, ECS_CTRLS, "Mattel Intellivision ECS Hand Controller x2 (HACK)", tag, owner, clock, "intvecs_ctrls", __FILE__),
|
||||
device_intvecs_control_port_interface(mconfig, *this),
|
||||
m_hand1(*this, "port1"),
|
||||
m_hand2(*this, "port2")
|
||||
device_t(mconfig, ECS_CTRLS, "Mattel Intellivision ECS Hand Controller x2 (HACK)", tag, owner, clock, "intvecs_ctrls", __FILE__),
|
||||
device_intvecs_control_port_interface(mconfig, *this),
|
||||
m_hand1(*this, "port1"),
|
||||
m_hand2(*this, "port2")
|
||||
{
|
||||
}
|
||||
|
||||
@ -171,12 +171,12 @@ void intvecs_ctrls_device::device_reset()
|
||||
|
||||
UINT8 intvecs_ctrls_device::read_portA()
|
||||
{
|
||||
return m_hand1->read_ctrl();
|
||||
return m_hand1->read_ctrl();
|
||||
}
|
||||
|
||||
UINT8 intvecs_ctrls_device::read_portB()
|
||||
{
|
||||
return m_hand2->read_ctrl();
|
||||
return m_hand2->read_ctrl();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -203,114 +203,114 @@ static INPUT_PORTS_START( intvecs_keybd )
|
||||
Shift + key: = " + - / % ' ^ ?
|
||||
*/
|
||||
|
||||
PORT_START("ROW.0")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RTN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('%')
|
||||
PORT_START("ROW.0")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RTN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('%')
|
||||
|
||||
PORT_START("ROW.1")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
|
||||
PORT_START("ROW.1")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
|
||||
|
||||
PORT_START("ROW.2")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('-')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
|
||||
PORT_START("ROW.2")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('-')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
|
||||
|
||||
PORT_START("ROW.3")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
|
||||
PORT_START("ROW.3")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
|
||||
|
||||
PORT_START("ROW.4")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
|
||||
PORT_START("ROW.4")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
|
||||
|
||||
PORT_START("ROW.5")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('\'')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('=')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('^')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('?')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_START("ROW.5")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('\'')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('=')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('^')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('?')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
|
||||
PORT_START("ROW.6")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_START("ROW.6")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor intvecs_keybd_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( intvecs_keybd );
|
||||
return INPUT_PORTS_NAME( intvecs_keybd );
|
||||
}
|
||||
|
||||
intvecs_keybd_device::intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, ECS_KEYBD, "Mattel Intellivision ECS Keyboard", tag, owner, clock, "intvecs_keybd", __FILE__),
|
||||
device_intvecs_control_port_interface(mconfig, *this),
|
||||
m_keybd(*this, "ROW")
|
||||
device_t(mconfig, ECS_KEYBD, "Mattel Intellivision ECS Keyboard", tag, owner, clock, "intvecs_keybd", __FILE__),
|
||||
device_intvecs_control_port_interface(mconfig, *this),
|
||||
m_keybd(*this, "ROW")
|
||||
{
|
||||
}
|
||||
|
||||
void intvecs_keybd_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_psg_portA));
|
||||
save_item(NAME(m_psg_portA));
|
||||
}
|
||||
|
||||
void intvecs_keybd_device::device_reset()
|
||||
{
|
||||
m_psg_portA = 0;
|
||||
m_psg_portA = 0;
|
||||
}
|
||||
|
||||
UINT8 intvecs_keybd_device::read_portB()
|
||||
{
|
||||
UINT8 val = 0xff;
|
||||
// return correct result if more than one bit of 0xFE is set
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
if (BIT(m_psg_portA, i))
|
||||
val &= m_keybd[i]->read();
|
||||
}
|
||||
return val;
|
||||
UINT8 val = 0xff;
|
||||
// return correct result if more than one bit of 0xFE is set
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
if (BIT(m_psg_portA, i))
|
||||
val &= m_keybd[i]->read();
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
void intvecs_keybd_device::write_portA(UINT8 data)
|
||||
{
|
||||
m_psg_portA = (~data) & 0xff;
|
||||
m_psg_portA = (~data) & 0xff;
|
||||
}
|
||||
|
||||
|
||||
@ -334,115 +334,114 @@ static INPUT_PORTS_START( intvecs_synth )
|
||||
Bit 5 B5 Bb5 A5 Ab5 G5 Gb5 F5 E5
|
||||
Bit 6 C6 NC NC NC NC NC NC NC
|
||||
*/
|
||||
PORT_START("SYNTH.0")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G2")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb2")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E2")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb2")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D2")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C2")
|
||||
PORT_START("SYNTH.0")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G2")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb2")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E2")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb2")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D2")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C2")
|
||||
|
||||
PORT_START("SYNTH.1")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb3")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D3")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db3")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb2")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab2")
|
||||
PORT_START("SYNTH.1")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb3")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D3")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db3")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb2")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab2")
|
||||
|
||||
PORT_START("SYNTH.2")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B3")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb3")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A3")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab3")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G3")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb3")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E3")
|
||||
PORT_START("SYNTH.2")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B3")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb3")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A3")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab3")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G3")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb3")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E3")
|
||||
|
||||
PORT_START("SYNTH.3")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G4")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb4")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E4")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb4")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D4")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C4")
|
||||
PORT_START("SYNTH.3")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G4")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb4")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E4")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb4")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D4")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C4")
|
||||
|
||||
PORT_START("SYNTH.4")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb5")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D5")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db5")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C5")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B4")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb4")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab4")
|
||||
PORT_START("SYNTH.4")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb5")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D5")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db5")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C5")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B4")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb4")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab4")
|
||||
|
||||
PORT_START("SYNTH.5")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B5")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb5")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A5")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab5")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G5")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb5")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5")
|
||||
PORT_START("SYNTH.5")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B5")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb5")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A5")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab5")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G5")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb5")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5")
|
||||
|
||||
PORT_START("SYNTH.6")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C6")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_START("SYNTH.6")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C6")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
ioport_constructor intvecs_synth_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( intvecs_synth );
|
||||
return INPUT_PORTS_NAME( intvecs_synth );
|
||||
}
|
||||
|
||||
|
||||
intvecs_synth_device::intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, ECS_SYNTH, "Mattel Intellivision ECS Synthetizer", tag, owner, clock, "intvecs_synth", __FILE__),
|
||||
device_intvecs_control_port_interface(mconfig, *this),
|
||||
m_synth(*this, "SYNTH")
|
||||
device_t(mconfig, ECS_SYNTH, "Mattel Intellivision ECS Synthetizer", tag, owner, clock, "intvecs_synth", __FILE__),
|
||||
device_intvecs_control_port_interface(mconfig, *this),
|
||||
m_synth(*this, "SYNTH")
|
||||
{
|
||||
}
|
||||
|
||||
void intvecs_synth_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_psg_portA));
|
||||
save_item(NAME(m_psg_portA));
|
||||
}
|
||||
|
||||
void intvecs_synth_device::device_reset()
|
||||
{
|
||||
m_psg_portA = 0;
|
||||
m_psg_portA = 0;
|
||||
}
|
||||
|
||||
UINT8 intvecs_synth_device::read_portB()
|
||||
{
|
||||
UINT8 val = 0xff;
|
||||
// return correct result if more than one bit of 0xFE is set
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
if (BIT(m_psg_portA, i))
|
||||
val &= m_synth[i]->read();
|
||||
}
|
||||
return val;
|
||||
UINT8 val = 0xff;
|
||||
// return correct result if more than one bit of 0xFE is set
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
if (BIT(m_psg_portA, i))
|
||||
val &= m_synth[i]->read();
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
void intvecs_synth_device::write_portA(UINT8 data)
|
||||
{
|
||||
m_psg_portA = (~data) & 0xff;
|
||||
m_psg_portA = (~data) & 0xff;
|
||||
}
|
||||
|
||||
|
@ -32,8 +32,8 @@ public:
|
||||
virtual ~device_intvecs_control_port_interface();
|
||||
|
||||
virtual UINT8 read_portA() { return 0xff; };
|
||||
virtual UINT8 read_portB() { return 0xff; };
|
||||
virtual void write_portA(UINT8 data) { };
|
||||
virtual UINT8 read_portB() { return 0xff; };
|
||||
virtual void write_portA(UINT8 data) { };
|
||||
|
||||
protected:
|
||||
intvecs_control_port_device *m_port;
|
||||
@ -49,16 +49,16 @@ public:
|
||||
intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~intvecs_control_port_device();
|
||||
|
||||
DECLARE_READ8_MEMBER( portA_r ) { return read_portA(); }
|
||||
DECLARE_READ8_MEMBER( portB_r ) { return read_portB(); }
|
||||
DECLARE_WRITE8_MEMBER( portA_w ) { return write_portA(data); }
|
||||
DECLARE_READ8_MEMBER( portA_r ) { return read_portA(); }
|
||||
DECLARE_READ8_MEMBER( portB_r ) { return read_portB(); }
|
||||
DECLARE_WRITE8_MEMBER( portA_w ) { return write_portA(data); }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
UINT8 read_portA();
|
||||
UINT8 read_portB();
|
||||
void write_portA(UINT8 data);
|
||||
UINT8 read_portA();
|
||||
UINT8 read_portB();
|
||||
void write_portA(UINT8 data);
|
||||
|
||||
device_intvecs_control_port_interface *m_device;
|
||||
};
|
||||
@ -88,76 +88,76 @@ SLOT_INTERFACE_EXTERN( intvecs_control_port_devices );
|
||||
// ======================> intvecs_ctrls_device
|
||||
|
||||
class intvecs_ctrls_device : public device_t,
|
||||
public device_intvecs_control_port_interface
|
||||
public device_intvecs_control_port_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
// construction/destruction
|
||||
intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual UINT8 read_portA() override;
|
||||
virtual UINT8 read_portB() override;
|
||||
virtual UINT8 read_portA() override;
|
||||
virtual UINT8 read_portB() override;
|
||||
|
||||
private:
|
||||
required_device<intv_control_port_device> m_hand1;
|
||||
required_device<intv_control_port_device> m_hand2;
|
||||
required_device<intv_control_port_device> m_hand1;
|
||||
required_device<intv_control_port_device> m_hand2;
|
||||
};
|
||||
|
||||
// ======================> intvecs_keybd_device
|
||||
|
||||
class intvecs_keybd_device : public device_t,
|
||||
public device_intvecs_control_port_interface
|
||||
public device_intvecs_control_port_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
// construction/destruction
|
||||
intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual UINT8 read_portB() override;
|
||||
virtual void write_portA(UINT8 data) override;
|
||||
virtual UINT8 read_portB() override;
|
||||
virtual void write_portA(UINT8 data) override;
|
||||
|
||||
private:
|
||||
UINT8 m_psg_portA;
|
||||
required_ioport_array<7> m_keybd;
|
||||
UINT8 m_psg_portA;
|
||||
required_ioport_array<7> m_keybd;
|
||||
};
|
||||
|
||||
// ======================> intvecs_synth_device
|
||||
|
||||
class intvecs_synth_device : public device_t,
|
||||
public device_intvecs_control_port_interface
|
||||
public device_intvecs_control_port_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
// construction/destruction
|
||||
intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual UINT8 read_portB() override;
|
||||
virtual void write_portA(UINT8 data) override;
|
||||
virtual UINT8 read_portB() override;
|
||||
virtual void write_portA(UINT8 data) override;
|
||||
|
||||
private:
|
||||
UINT8 m_psg_portA;
|
||||
required_ioport_array<7> m_synth;
|
||||
UINT8 m_psg_portA;
|
||||
required_ioport_array<7> m_synth;
|
||||
};
|
||||
|
||||
|
||||
|
@ -16,53 +16,53 @@ const device_type INTV_HANDCTRL = &device_creator<intv_handctrl_device>;
|
||||
|
||||
|
||||
static INPUT_PORTS_START( intv_handctrl )
|
||||
PORT_START("KEYPAD")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("7") PORT_CODE(KEYCODE_7_PAD)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("8") PORT_CODE(KEYCODE_8_PAD)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Clear") PORT_CODE(KEYCODE_DEL_PAD)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("0") PORT_CODE(KEYCODE_0_PAD)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER_PAD)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Upper") PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Lower-Left") PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Lower-Right") PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_START("KEYPAD")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("7") PORT_CODE(KEYCODE_7_PAD)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("8") PORT_CODE(KEYCODE_8_PAD)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Clear") PORT_CODE(KEYCODE_DEL_PAD)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("0") PORT_CODE(KEYCODE_0_PAD)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER_PAD)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Upper") PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Lower-Left") PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Lower-Right") PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("DISC_DG")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Up") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Down") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Left") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_START("DISC_DG")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Up") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Down") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Left") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00)
|
||||
|
||||
PORT_START("DISC_AN_X")
|
||||
PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
|
||||
PORT_START("DISC_AN_X")
|
||||
PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
|
||||
|
||||
PORT_START("DISC_AN_Y")
|
||||
PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
|
||||
PORT_START("DISC_AN_Y")
|
||||
PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x01)
|
||||
|
||||
|
||||
PORT_START("OPTIONS")
|
||||
PORT_CONFNAME( 0x01, 0x01, "Controller Disc Emulation" )
|
||||
PORT_CONFSETTING( 0x00, "Digital" )
|
||||
PORT_CONFSETTING( 0x01, "Analog" )
|
||||
PORT_START("OPTIONS")
|
||||
PORT_CONFNAME( 0x01, 0x01, "Controller Disc Emulation" )
|
||||
PORT_CONFSETTING( 0x00, "Digital" )
|
||||
PORT_CONFSETTING( 0x01, "Analog" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -89,10 +89,10 @@ intv_handctrl_device::intv_handctrl_device(const machine_config &mconfig, const
|
||||
device_t(mconfig, INTV_HANDCTRL, "Mattel Intellivision Hand Controller", tag, owner, clock, "intv_hand", __FILE__),
|
||||
device_intv_control_port_interface(mconfig, *this),
|
||||
m_cfg(*this, "OPTIONS"),
|
||||
m_keypad(*this, "KEYPAD"),
|
||||
m_disc_dig(*this, "DISC_DG"),
|
||||
m_disc_anx(*this, "DISC_AN_X"),
|
||||
m_disc_any(*this, "DISC_AN_Y")
|
||||
m_keypad(*this, "KEYPAD"),
|
||||
m_disc_dig(*this, "DISC_DG"),
|
||||
m_disc_anx(*this, "DISC_AN_X"),
|
||||
m_disc_any(*this, "DISC_AN_Y")
|
||||
{
|
||||
}
|
||||
|
||||
@ -121,59 +121,58 @@ void intv_handctrl_device::device_reset()
|
||||
|
||||
UINT8 intv_handctrl_device::read_ctrl()
|
||||
{
|
||||
static const UINT8 keypad_table[] =
|
||||
{
|
||||
0xff, 0x3f, 0x9f, 0x5f, 0xd7, 0xb7, 0x77, 0xdb,
|
||||
0xbb, 0x7b, 0xdd, 0xbd, 0x7d, 0xde, 0xbe, 0x7e
|
||||
};
|
||||
static const UINT8 keypad_table[] =
|
||||
{
|
||||
0xff, 0x3f, 0x9f, 0x5f, 0xd7, 0xb7, 0x77, 0xdb,
|
||||
0xbb, 0x7b, 0xdd, 0xbd, 0x7d, 0xde, 0xbe, 0x7e
|
||||
};
|
||||
|
||||
static const UINT8 disc_table[] =
|
||||
{
|
||||
0xf3, 0xe3, 0xe7, 0xf7, 0xf6, 0xe6, 0xee, 0xfe,
|
||||
0xfc, 0xec, 0xed, 0xfd, 0xf9, 0xe9, 0xeb, 0xfb
|
||||
};
|
||||
static const UINT8 disc_table[] =
|
||||
{
|
||||
0xf3, 0xe3, 0xe7, 0xf7, 0xf6, 0xe6, 0xee, 0xfe,
|
||||
0xfc, 0xec, 0xed, 0xfd, 0xf9, 0xe9, 0xeb, 0xfb
|
||||
};
|
||||
|
||||
static const UINT8 discyx_table[5][5] =
|
||||
{
|
||||
{ 0xe3, 0xf3, 0xfb, 0xeb, 0xe9 },
|
||||
{ 0xe7, 0xe3, 0xfb, 0xe9, 0xf9 },
|
||||
{ 0xf7, 0xf7, 0xff, 0xfd, 0xfd },
|
||||
{ 0xf6, 0xe6, 0xfe, 0xec, 0xed },
|
||||
{ 0xe6, 0xee, 0xfe, 0xfc, 0xec }
|
||||
};
|
||||
static const UINT8 discyx_table[5][5] =
|
||||
{
|
||||
{ 0xe3, 0xf3, 0xfb, 0xeb, 0xe9 },
|
||||
{ 0xe7, 0xe3, 0xfb, 0xe9, 0xf9 },
|
||||
{ 0xf7, 0xf7, 0xff, 0xfd, 0xfd },
|
||||
{ 0xf6, 0xe6, 0xfe, 0xec, 0xed },
|
||||
{ 0xe6, 0xee, 0xfe, 0xfc, 0xec }
|
||||
};
|
||||
|
||||
int x, y;
|
||||
UINT8 res = 0xff;
|
||||
int x, y;
|
||||
UINT8 res = 0xff;
|
||||
|
||||
/* keypad */
|
||||
x = m_keypad->read();
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
if (BIT(x, i))
|
||||
res &= keypad_table[i];
|
||||
}
|
||||
/* keypad */
|
||||
x = m_keypad->read();
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
if (BIT(x, i))
|
||||
res &= keypad_table[i];
|
||||
}
|
||||
|
||||
switch (m_cfg->read() & 1)
|
||||
{
|
||||
/* disc == digital */
|
||||
case 0:
|
||||
default:
|
||||
x = m_disc_dig->read();
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
if (BIT(x, i))
|
||||
res &= disc_table[i];
|
||||
}
|
||||
break;
|
||||
switch (m_cfg->read() & 1)
|
||||
{
|
||||
/* disc == digital */
|
||||
case 0:
|
||||
default:
|
||||
x = m_disc_dig->read();
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
if (BIT(x, i))
|
||||
res &= disc_table[i];
|
||||
}
|
||||
break;
|
||||
|
||||
/* disc == _fake_ analog */
|
||||
case 1:
|
||||
x = m_disc_anx->read();
|
||||
y = m_disc_any->read();
|
||||
res &= discyx_table[y / 32][x / 32];
|
||||
break;
|
||||
}
|
||||
/* disc == _fake_ analog */
|
||||
case 1:
|
||||
x = m_disc_anx->read();
|
||||
y = m_disc_any->read();
|
||||
res &= discyx_table[y / 32][x / 32];
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ protected:
|
||||
|
||||
private:
|
||||
required_ioport m_cfg;
|
||||
required_ioport m_keypad;
|
||||
required_ioport m_disc_dig;
|
||||
required_ioport m_disc_anx;
|
||||
required_ioport m_disc_any;
|
||||
required_ioport m_keypad;
|
||||
required_ioport m_disc_dig;
|
||||
required_ioport m_disc_anx;
|
||||
required_ioport m_disc_any;
|
||||
};
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
SNK Neo Geo Controller Port emulation
|
||||
|
||||
This actually covers two separate piece of hardware of Neo Geo system:
|
||||
- The 15-pin controller ports that are used for controllers in the
|
||||
- The 15-pin controller ports that are used for controllers in the
|
||||
AES home system and for mahjong controllers in the MVS arcade PCB
|
||||
- The controller part of the main edge connector that is used for
|
||||
joystick inputs in the MVS arcade PCB
|
||||
@ -219,4 +219,3 @@ SLOT_INTERFACE_END
|
||||
SLOT_INTERFACE_START( neogeo_arc_pin15 )
|
||||
SLOT_INTERFACE("mahjong", NEOGEO_MJCTRL)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
neogeo_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~neogeo_control_port_device();
|
||||
|
||||
UINT8 read_ctrl();
|
||||
UINT8 read_ctrl();
|
||||
UINT8 read_start_sel();
|
||||
void write_ctrlsel(UINT8 data);
|
||||
DECLARE_READ8_MEMBER( ctrl_r ) { return read_ctrl(); }
|
||||
|
@ -129,4 +129,3 @@ void neogeo_dial_device::write_ctrlsel(UINT8 data)
|
||||
{
|
||||
m_ctrl_sel = data;
|
||||
}
|
||||
|
||||
|
@ -111,4 +111,3 @@ void neogeo_irrmaze_device::write_ctrlsel(UINT8 data)
|
||||
{
|
||||
m_ctrl_sel = data;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ void neogeo_joystick_device::device_reset()
|
||||
|
||||
UINT8 neogeo_joystick_device::read_ctrl()
|
||||
{
|
||||
return m_joy->read();
|
||||
return m_joy->read();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -203,4 +203,3 @@ READ8_MEMBER(neogeo_joy_ac_device::in1_r)
|
||||
{
|
||||
return m_joy2->read();
|
||||
}
|
||||
|
||||
|
@ -171,4 +171,3 @@ UINT8 neogeo_mjctrl_device::read_start_sel()
|
||||
{
|
||||
return m_ss->read();
|
||||
}
|
||||
|
||||
|
@ -120,4 +120,3 @@ UINT8 saturn_analog_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ SLOT_INTERFACE_START( saturn_controls )
|
||||
SLOT_INTERFACE("joypad", SATURN_JOY)
|
||||
SLOT_INTERFACE("racing", SATURN_WHEEL)
|
||||
SLOT_INTERFACE("analog", SATURN_ANALOG)
|
||||
// SLOT_INTERFACE("lightgun", SATURN_LIGHTGUN)
|
||||
// SLOT_INTERFACE("lightgun", SATURN_LIGHTGUN)
|
||||
SLOT_INTERFACE("trackball", SATURN_TRACK)
|
||||
SLOT_INTERFACE("keyboard", SATURN_KEYBD)
|
||||
SLOT_INTERFACE("joy_md3", SATURN_JOYMD3B)
|
||||
@ -140,4 +140,3 @@ SLOT_INTERFACE_END
|
||||
SLOT_INTERFACE_START( saturn_joys )
|
||||
SLOT_INTERFACE("joypad", SATURN_JOY)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
virtual ~saturn_control_port_device();
|
||||
|
||||
UINT16 read_direct();
|
||||
UINT8 read_ctrl(UINT8 offset);
|
||||
UINT8 read_ctrl(UINT8 offset);
|
||||
UINT8 read_status();
|
||||
UINT8 read_id(int idx);
|
||||
|
||||
|
@ -108,4 +108,3 @@ UINT16 saturn_joy_device::read_direct()
|
||||
{
|
||||
return m_joy->read();
|
||||
}
|
||||
|
||||
|
@ -119,4 +119,3 @@ UINT8 saturn_joymd6b_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -329,4 +329,3 @@ UINT8 saturn_keybd_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Sega Saturn Mouse emulation
|
||||
|
||||
This is basically the same as a pointing controller, but it uses a different ID
|
||||
This is basically the same as a pointing controller, but it uses a different ID
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
@ -117,4 +117,3 @@ UINT8 saturn_mouse_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Sega Saturn Pointing Controller / Trackball emulation
|
||||
|
||||
This is basically the same as a mouse, but it uses a different ID
|
||||
This is basically the same as a mouse, but it uses a different ID
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
@ -117,4 +117,3 @@ UINT8 saturn_track_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -106,4 +106,3 @@ UINT8 saturn_wheel_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -6756,12 +6756,12 @@ void drcbe_x64::op_fcopyi(x86code *&dst, const instruction &inst)
|
||||
{
|
||||
if (dstp.is_memory())
|
||||
{
|
||||
emit_mov_p32_r32(dst, dstp, srcp.ireg()); // mov dstp,srcp
|
||||
emit_mov_p32_r32(dst, dstp, srcp.ireg()); // mov dstp,srcp
|
||||
}
|
||||
else
|
||||
{
|
||||
emit_movd_r128_r32(dst, dstreg, srcp.ireg()); // movd dstreg,srcp
|
||||
emit_movss_p32_r128(dst, dstp, dstreg); // movss dstp,dstreg
|
||||
emit_movd_r128_r32(dst, dstreg, srcp.ireg()); // movd dstreg,srcp
|
||||
emit_movss_p32_r128(dst, dstp, dstreg); // movss dstp,dstreg
|
||||
}
|
||||
}
|
||||
|
||||
@ -6770,7 +6770,6 @@ void drcbe_x64::op_fcopyi(x86code *&dst, const instruction &inst)
|
||||
// 64-bit form
|
||||
else if (inst.size() == 8)
|
||||
{
|
||||
|
||||
if (srcp.is_memory())
|
||||
{
|
||||
emit_movq_r128_m64(dst, dstreg, MABS(srcp.memory())); // movq dstreg,[srcp]
|
||||
@ -6780,12 +6779,12 @@ void drcbe_x64::op_fcopyi(x86code *&dst, const instruction &inst)
|
||||
{
|
||||
if (dstp.is_memory())
|
||||
{
|
||||
emit_mov_p64_r64(dst, dstp, srcp.ireg()); // mov dstp,srcp
|
||||
emit_mov_p64_r64(dst, dstp, srcp.ireg()); // mov dstp,srcp
|
||||
}
|
||||
else
|
||||
{
|
||||
emit_movq_r128_r64(dst, dstreg, srcp.ireg()); // movq dstreg,srcp
|
||||
emit_movsd_p64_r128(dst, dstp, dstreg); // movsd dstp,dstreg
|
||||
emit_movq_r128_r64(dst, dstreg, srcp.ireg()); // movq dstreg,srcp
|
||||
emit_movsd_p64_r128(dst, dstp, dstreg); // movsd dstp,dstreg
|
||||
}
|
||||
}
|
||||
|
||||
@ -6821,11 +6820,11 @@ void drcbe_x64::op_icopyf(x86code *&dst, const instruction &inst)
|
||||
{
|
||||
if (dstp.is_memory())
|
||||
{
|
||||
emit_movd_m32_r128(dst, MABS(dstp.memory()), srcp.freg()); // movd dstp,srcp
|
||||
emit_movd_m32_r128(dst, MABS(dstp.memory()), srcp.freg()); // movd dstp,srcp
|
||||
}
|
||||
else
|
||||
{
|
||||
emit_movd_r32_r128(dst, dstp.ireg(), srcp.freg()); // movd dstp,srcp
|
||||
emit_movd_r32_r128(dst, dstp.ireg(), srcp.freg()); // movd dstp,srcp
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6843,11 +6842,11 @@ void drcbe_x64::op_icopyf(x86code *&dst, const instruction &inst)
|
||||
{
|
||||
if (dstp.is_memory())
|
||||
{
|
||||
emit_movq_m64_r128(dst, MABS(dstp.memory()), srcp.freg()); // movq dstp,srcp
|
||||
emit_movq_m64_r128(dst, MABS(dstp.memory()), srcp.freg()); // movq dstp,srcp
|
||||
}
|
||||
else
|
||||
{
|
||||
emit_movq_r64_r128(dst, dstp.ireg(), srcp.freg()); // movq dstp,srcp
|
||||
emit_movq_r64_r128(dst, dstp.ireg(), srcp.freg()); // movq dstp,srcp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -272,8 +272,8 @@ const drcbe_x86::opcode_table_entry drcbe_x86::s_opcode_table_source[] =
|
||||
{ uml::OP_FSQRT, &drcbe_x86::op_fsqrt }, // FSQRT dst,src1
|
||||
{ uml::OP_FRECIP, &drcbe_x86::op_frecip }, // FRECIP dst,src1
|
||||
{ uml::OP_FRSQRT, &drcbe_x86::op_frsqrt }, // FRSQRT dst,src1
|
||||
{ uml::OP_FCOPYI, &drcbe_x86::op_fcopyi }, // FCOPYI dst,src
|
||||
{ uml::OP_ICOPYF, &drcbe_x86::op_icopyf }, // ICOPYF dst,src
|
||||
{ uml::OP_FCOPYI, &drcbe_x86::op_fcopyi }, // FCOPYI dst,src
|
||||
{ uml::OP_ICOPYF, &drcbe_x86::op_icopyf }, // ICOPYF dst,src
|
||||
};
|
||||
|
||||
|
||||
@ -6471,12 +6471,12 @@ void drcbe_x86::op_fcopyi(x86code *&dst, const instruction &inst)
|
||||
{
|
||||
if (srcp.is_memory())
|
||||
{
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
}
|
||||
else if (srcp.is_int_register())
|
||||
{
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), srcp.ireg()); // mov [dstp],srcp
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), srcp.ireg()); // mov [dstp],srcp
|
||||
}
|
||||
}
|
||||
|
||||
@ -6485,17 +6485,17 @@ void drcbe_x86::op_fcopyi(x86code *&dst, const instruction &inst)
|
||||
{
|
||||
if (srcp.is_memory())
|
||||
{
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4]
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4]
|
||||
}
|
||||
else if (srcp.is_int_register())
|
||||
{
|
||||
emit_mov_r32_m32(dst, REG_EDX, MABS(m_reghi[srcp.ireg()])); // mov edx,[reghi[srcp]]
|
||||
emit_mov_r32_r32(dst, REG_EAX, srcp.ireg()); // mov eax,srcp
|
||||
emit_mov_r32_m32(dst, REG_EDX, MABS(m_reghi[srcp.ireg()])); // mov edx,[reghi[srcp]]
|
||||
emit_mov_r32_r32(dst, REG_EAX, srcp.ireg()); // mov eax,srcp
|
||||
}
|
||||
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx
|
||||
}
|
||||
}
|
||||
|
||||
@ -6518,33 +6518,33 @@ void drcbe_x86::op_icopyf(x86code *&dst, const instruction &inst)
|
||||
// 32-bit case
|
||||
if (inst.size() == 4)
|
||||
{
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
|
||||
if (dstp.is_memory())
|
||||
{
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
}
|
||||
else if (dstp.is_int_register())
|
||||
{
|
||||
emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax
|
||||
emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax
|
||||
}
|
||||
}
|
||||
|
||||
// 64-bit case
|
||||
else if (inst.size() == 8)
|
||||
{
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4]
|
||||
emit_mov_r32_m32(dst, REG_EAX, MABS(srcp.memory())); // mov eax,[srcp]
|
||||
emit_mov_r32_m32(dst, REG_EDX, MABS(srcp.memory(4))); // mov edx,[srcp+4]
|
||||
|
||||
if (dstp.is_memory())
|
||||
{
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory()), REG_EAX); // mov [dstp],eax
|
||||
emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp+4],edx
|
||||
}
|
||||
else
|
||||
{
|
||||
emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi[dstp]],edx
|
||||
emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax
|
||||
emit_mov_m32_r32(dst, MABS(m_reghi[dstp.ireg()]), REG_EDX); // mov [reghi[dstp]],edx
|
||||
emit_mov_r32_r32(dst, dstp.ireg(), REG_EAX); // mov dstp,eax
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ UINT16 hp_hybrid_cpu_device::execute_one_sub(UINT16 opcode)
|
||||
memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS);
|
||||
m_pa_changed_func((UINT8)CURRENT_PA);
|
||||
}
|
||||
BIT_CLR(m_flags, HPHYBRID_IM_BIT);
|
||||
BIT_CLR(m_flags, HPHYBRID_IM_BIT);
|
||||
}
|
||||
tmp = RM(AEC_CASE_C , m_reg_R--) + (opcode & 0x1f);
|
||||
return BIT(opcode , 5) ? tmp - 0x20 : tmp;
|
||||
@ -903,17 +903,17 @@ UINT16 hp_hybrid_cpu_device::get_skip_addr_sc(UINT16 opcode , UINT16& v , unsign
|
||||
|
||||
UINT16 hp_hybrid_cpu_device::get_skip_addr_sc(UINT16 opcode , UINT32& v , unsigned n)
|
||||
{
|
||||
bool val = BIT(v , n);
|
||||
bool val = BIT(v , n);
|
||||
|
||||
if (BIT(opcode , 7)) {
|
||||
if (BIT(opcode , 6)) {
|
||||
BIT_SET(v , n);
|
||||
} else {
|
||||
BIT_CLR(v , n);
|
||||
}
|
||||
}
|
||||
if (BIT(opcode , 7)) {
|
||||
if (BIT(opcode , 6)) {
|
||||
BIT_SET(v , n);
|
||||
} else {
|
||||
BIT_CLR(v , n);
|
||||
}
|
||||
}
|
||||
|
||||
return get_skip_addr(opcode , val);
|
||||
return get_skip_addr(opcode , val);
|
||||
}
|
||||
|
||||
void hp_hybrid_cpu_device::do_pw(UINT16 opcode)
|
||||
@ -1007,7 +1007,7 @@ void hp_hybrid_cpu_device::do_pw(UINT16 opcode)
|
||||
|
||||
void hp_hybrid_cpu_device::check_for_interrupts(void)
|
||||
{
|
||||
if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT) || BIT(m_flags , HPHYBRID_IM_BIT)) {
|
||||
if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT) || BIT(m_flags , HPHYBRID_IM_BIT)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1017,9 +1017,9 @@ void hp_hybrid_cpu_device::check_for_interrupts(void)
|
||||
// Service high-level interrupt
|
||||
BIT_SET(m_flags , HPHYBRID_IRH_SVC_BIT);
|
||||
irqline = HPHYBRID_IRH;
|
||||
if (BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
|
||||
logerror("H pre-empted L @ %06x\n" , m_genpc);
|
||||
}
|
||||
if (BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
|
||||
logerror("H pre-empted L @ %06x\n" , m_genpc);
|
||||
}
|
||||
} else if (BIT(m_flags , HPHYBRID_IRL_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
|
||||
// Service low-level interrupt
|
||||
BIT_SET(m_flags , HPHYBRID_IRL_SVC_BIT);
|
||||
@ -1055,8 +1055,8 @@ void hp_hybrid_cpu_device::check_for_interrupts(void)
|
||||
// lasts for 32 cycles
|
||||
m_icount -= 32;
|
||||
|
||||
// Allow special processing in 5061-3001
|
||||
enter_isr();
|
||||
// Allow special processing in 5061-3001
|
||||
enter_isr();
|
||||
|
||||
// Do a double-indirect JSM IV,I instruction
|
||||
WM(AEC_CASE_C , ++m_reg_R , m_reg_P);
|
||||
@ -1066,7 +1066,7 @@ void hp_hybrid_cpu_device::check_for_interrupts(void)
|
||||
|
||||
void hp_hybrid_cpu_device::enter_isr(void)
|
||||
{
|
||||
// Do nothing special
|
||||
// Do nothing special
|
||||
}
|
||||
|
||||
void hp_hybrid_cpu_device::handle_dma(void)
|
||||
@ -1477,33 +1477,33 @@ UINT16 hp_5061_3001_cpu_device::execute_no_bpc_ioc(UINT16 opcode)
|
||||
do_mpy();
|
||||
break;
|
||||
|
||||
case 0x7026:
|
||||
// CIM
|
||||
// Undocumented instruction, see beginning of this file
|
||||
// Probably "Clear Interrupt Mask"
|
||||
// No idea at all about exec. time: make it 9 cycles
|
||||
m_icount -= 9;
|
||||
case 0x7026:
|
||||
// CIM
|
||||
// Undocumented instruction, see beginning of this file
|
||||
// Probably "Clear Interrupt Mask"
|
||||
// No idea at all about exec. time: make it 9 cycles
|
||||
m_icount -= 9;
|
||||
#ifndef NO_ISR_WITH_IM_CLEARED
|
||||
BIT_CLR(m_flags, HPHYBRID_IM_BIT);
|
||||
BIT_CLR(m_flags, HPHYBRID_IM_BIT);
|
||||
#else
|
||||
BIT_SET(m_flags, HPHYBRID_IM_BIT);
|
||||
BIT_SET(m_flags, HPHYBRID_IM_BIT);
|
||||
#endif
|
||||
logerror("hp-5061-3001: CIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
|
||||
break;
|
||||
logerror("hp-5061-3001: CIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
|
||||
break;
|
||||
|
||||
case 0x7027:
|
||||
// SIM
|
||||
// Undocumented instruction, see beginning of this file
|
||||
// Probably "Set Interrupt Mask"
|
||||
// No idea at all about exec. time: make it 9 cycles
|
||||
m_icount -= 9;
|
||||
case 0x7027:
|
||||
// SIM
|
||||
// Undocumented instruction, see beginning of this file
|
||||
// Probably "Set Interrupt Mask"
|
||||
// No idea at all about exec. time: make it 9 cycles
|
||||
m_icount -= 9;
|
||||
#ifndef NO_ISR_WITH_IM_CLEARED
|
||||
BIT_SET(m_flags, HPHYBRID_IM_BIT);
|
||||
BIT_SET(m_flags, HPHYBRID_IM_BIT);
|
||||
#else
|
||||
BIT_CLR(m_flags, HPHYBRID_IM_BIT);
|
||||
BIT_CLR(m_flags, HPHYBRID_IM_BIT);
|
||||
#endif
|
||||
logerror("hp-5061-3001: SIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
|
||||
break;
|
||||
logerror("hp-5061-3001: SIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((opcode & 0xfec0) == 0x74c0) {
|
||||
@ -1655,9 +1655,9 @@ void hp_5061_3001_cpu_device::write_non_common_reg(UINT16 addr , UINT16 v)
|
||||
|
||||
void hp_5061_3001_cpu_device::enter_isr(void)
|
||||
{
|
||||
// Set interrupt mask when entering an ISR
|
||||
// Set interrupt mask when entering an ISR
|
||||
#ifndef NO_ISR_WITH_IM_CLEARED
|
||||
BIT_SET(m_flags, HPHYBRID_IM_BIT);
|
||||
BIT_SET(m_flags, HPHYBRID_IM_BIT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ private:
|
||||
UINT16 get_skip_addr_sc(UINT16 opcode , UINT32& v , unsigned n);
|
||||
void do_pw(UINT16 opcode);
|
||||
void check_for_interrupts(void);
|
||||
virtual void enter_isr(void);
|
||||
virtual void enter_isr(void);
|
||||
void handle_dma(void);
|
||||
|
||||
UINT16 RIO(UINT8 pa , UINT8 ic);
|
||||
@ -228,7 +228,7 @@ private:
|
||||
UINT16 m_reg_r27; // R27 register
|
||||
UINT16 m_reg_aec[ HP_REG_R37_ADDR - HP_REG_R32_ADDR + 1 ]; // AEC registers R32-R37
|
||||
|
||||
virtual void enter_isr(void) override;
|
||||
virtual void enter_isr(void) override;
|
||||
};
|
||||
|
||||
class hp_5061_3011_cpu_device : public hp_hybrid_cpu_device
|
||||
|
@ -355,9 +355,9 @@ static const dis_entry_t dis_table_emc[] = {
|
||||
{0xffff , 0x7b40 , "MRY" , param_none , 0 },
|
||||
{0xffff , 0x7b61 , "MLY" , param_none , 0 },
|
||||
{0xffff , 0x7b8f , "MPY" , param_none , 0 },
|
||||
// *** Undocumented instructions of 5061-3001 ***
|
||||
{0xffff , 0x7026 , "CIM" , param_none , 0 },
|
||||
{0xffff , 0x7027 , "SIM" , param_none , 0 },
|
||||
// *** Undocumented instructions of 5061-3001 ***
|
||||
{0xffff , 0x7026 , "CIM" , param_none , 0 },
|
||||
{0xffff , 0x7027 , "SIM" , param_none , 0 },
|
||||
// *** END ***
|
||||
{0 , 0 , nullptr , nullptr , 0 }
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -92,4 +92,3 @@ void sm500_device::op_comcn()
|
||||
}
|
||||
|
||||
// Test instructions
|
||||
|
||||
|
@ -1337,4 +1337,3 @@ void pcxport_dmac_device::end_of_process()
|
||||
|
||||
m_state = STATE_SI;
|
||||
}
|
||||
|
||||
|
@ -171,5 +171,3 @@ void generic_latch_16_device::device_start()
|
||||
save_item(NAME(m_latched_value));
|
||||
save_item(NAME(m_latch_read));
|
||||
}
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -72,116 +72,116 @@ protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
private:
|
||||
// Storage of tracks: mapping from a tape position to word stored there
|
||||
typedef std::map<tape_pos_t , tape_word_t> tape_track_t;
|
||||
// Storage of tracks: mapping from a tape position to word stored there
|
||||
typedef std::map<tape_pos_t , tape_word_t> tape_track_t;
|
||||
|
||||
devcb_write_line m_irq_handler;
|
||||
devcb_write_line m_flg_handler;
|
||||
devcb_write_line m_sts_handler;
|
||||
devcb_write_line m_irq_handler;
|
||||
devcb_write_line m_flg_handler;
|
||||
devcb_write_line m_sts_handler;
|
||||
|
||||
// Registers
|
||||
UINT16 m_data_reg;
|
||||
bool m_data_reg_full;
|
||||
UINT16 m_cmd_reg;
|
||||
UINT16 m_status_reg;
|
||||
UINT16 m_tach_reg;
|
||||
tape_pos_t m_tach_reg_ref;
|
||||
bool m_tach_reg_frozen;
|
||||
UINT16 m_checksum_reg;
|
||||
bool m_clear_checksum_reg;
|
||||
UINT16 m_timing_reg;
|
||||
// Registers
|
||||
UINT16 m_data_reg;
|
||||
bool m_data_reg_full;
|
||||
UINT16 m_cmd_reg;
|
||||
UINT16 m_status_reg;
|
||||
UINT16 m_tach_reg;
|
||||
tape_pos_t m_tach_reg_ref;
|
||||
bool m_tach_reg_frozen;
|
||||
UINT16 m_checksum_reg;
|
||||
bool m_clear_checksum_reg;
|
||||
UINT16 m_timing_reg;
|
||||
|
||||
// State
|
||||
bool m_irq;
|
||||
bool m_flg;
|
||||
bool m_sts;
|
||||
// State
|
||||
bool m_irq;
|
||||
bool m_flg;
|
||||
bool m_sts;
|
||||
|
||||
// Command FSM state
|
||||
typedef enum {
|
||||
CMD_IDLE,
|
||||
CMD_INVERTING,
|
||||
CMD_PH0,
|
||||
CMD_PH1,
|
||||
CMD_PH2,
|
||||
CMD_PH3,
|
||||
CMD_END,
|
||||
CMD_STOPPING
|
||||
} cmd_state_t;
|
||||
cmd_state_t m_cmd_state;
|
||||
// Command FSM state
|
||||
typedef enum {
|
||||
CMD_IDLE,
|
||||
CMD_INVERTING,
|
||||
CMD_PH0,
|
||||
CMD_PH1,
|
||||
CMD_PH2,
|
||||
CMD_PH3,
|
||||
CMD_END,
|
||||
CMD_STOPPING
|
||||
} cmd_state_t;
|
||||
cmd_state_t m_cmd_state;
|
||||
|
||||
// Tape position & motion
|
||||
tape_pos_t m_tape_pos;
|
||||
attotime m_start_time; // Tape moving if != never
|
||||
bool m_tape_fwd;
|
||||
bool m_tape_fast;
|
||||
// Tape position & motion
|
||||
tape_pos_t m_tape_pos;
|
||||
attotime m_start_time; // Tape moving if != never
|
||||
bool m_tape_fwd;
|
||||
bool m_tape_fast;
|
||||
|
||||
// Timers
|
||||
emu_timer *m_tape_timer;
|
||||
emu_timer *m_hole_timer;
|
||||
// Timers
|
||||
emu_timer *m_tape_timer;
|
||||
emu_timer *m_hole_timer;
|
||||
|
||||
// Content of tape tracks
|
||||
tape_track_t m_tracks[ 2 ];
|
||||
bool m_image_dirty;
|
||||
// Content of tape tracks
|
||||
tape_track_t m_tracks[ 2 ];
|
||||
bool m_image_dirty;
|
||||
|
||||
// Reading & writing
|
||||
bool m_tape_wr;
|
||||
tape_pos_t m_rw_pos;
|
||||
UINT16 m_next_word;
|
||||
tape_track_t::iterator m_rd_it;
|
||||
bool m_rd_it_valid;
|
||||
// Reading & writing
|
||||
bool m_tape_wr;
|
||||
tape_pos_t m_rw_pos;
|
||||
UINT16 m_next_word;
|
||||
tape_track_t::iterator m_rd_it;
|
||||
bool m_rd_it_valid;
|
||||
|
||||
// Gap detection
|
||||
tape_pos_t m_gap_detect_start;
|
||||
// Gap detection
|
||||
tape_pos_t m_gap_detect_start;
|
||||
|
||||
typedef enum {
|
||||
ADV_NO_MORE_DATA,
|
||||
ADV_CONT_DATA,
|
||||
ADV_DISCONT_DATA
|
||||
} adv_res_t;
|
||||
typedef enum {
|
||||
ADV_NO_MORE_DATA,
|
||||
ADV_CONT_DATA,
|
||||
ADV_DISCONT_DATA
|
||||
} adv_res_t;
|
||||
|
||||
void clear_state(void);
|
||||
void irq_w(bool state);
|
||||
void set_error(bool state);
|
||||
bool is_braking(void) const;
|
||||
unsigned speed_to_tick_freq(void) const;
|
||||
bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const;
|
||||
tape_pos_t current_tape_pos(void) const;
|
||||
void update_tape_pos(void);
|
||||
void update_tach_reg(void);
|
||||
void freeze_tach_reg(bool freeze);
|
||||
static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b);
|
||||
tape_pos_t next_hole(void) const;
|
||||
attotime time_to_distance(tape_pos_t distance) const;
|
||||
attotime time_to_target(tape_pos_t target) const;
|
||||
attotime time_to_stopping_pos(void) const;
|
||||
bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
|
||||
void stop_tape(void);
|
||||
tape_track_t& current_track(void);
|
||||
static tape_pos_t word_length(tape_word_t w);
|
||||
static tape_pos_t word_end_pos(const tape_track_t::iterator& it);
|
||||
static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos);
|
||||
void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length);
|
||||
void write_gap(tape_pos_t a , tape_pos_t b);
|
||||
bool just_gap(tape_pos_t a , tape_pos_t b);
|
||||
tape_pos_t farthest_end(const tape_track_t::iterator& it) const;
|
||||
bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive);
|
||||
adv_res_t adv_it(tape_track_t::iterator& it);
|
||||
attotime fetch_next_wr_word(void);
|
||||
attotime time_to_rd_next_word(tape_pos_t& word_rd_pos);
|
||||
tape_pos_t min_gap_size(void) const;
|
||||
bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap);
|
||||
bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap);
|
||||
void clear_tape(void);
|
||||
void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words);
|
||||
void save_tape(void);
|
||||
bool load_track(tape_track_t& track);
|
||||
bool load_tape(void);
|
||||
void set_tape_present(bool present);
|
||||
attotime time_to_next_hole(void) const;
|
||||
attotime time_to_tach_pulses(void) const;
|
||||
void terminate_cmd_now(void);
|
||||
void cmd_fsm(void);
|
||||
void start_cmd_exec(UINT16 new_cmd_reg);
|
||||
void clear_state(void);
|
||||
void irq_w(bool state);
|
||||
void set_error(bool state);
|
||||
bool is_braking(void) const;
|
||||
unsigned speed_to_tick_freq(void) const;
|
||||
bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const;
|
||||
tape_pos_t current_tape_pos(void) const;
|
||||
void update_tape_pos(void);
|
||||
void update_tach_reg(void);
|
||||
void freeze_tach_reg(bool freeze);
|
||||
static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b);
|
||||
tape_pos_t next_hole(void) const;
|
||||
attotime time_to_distance(tape_pos_t distance) const;
|
||||
attotime time_to_target(tape_pos_t target) const;
|
||||
attotime time_to_stopping_pos(void) const;
|
||||
bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
|
||||
void stop_tape(void);
|
||||
tape_track_t& current_track(void);
|
||||
static tape_pos_t word_length(tape_word_t w);
|
||||
static tape_pos_t word_end_pos(const tape_track_t::iterator& it);
|
||||
static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos);
|
||||
void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length);
|
||||
void write_gap(tape_pos_t a , tape_pos_t b);
|
||||
bool just_gap(tape_pos_t a , tape_pos_t b);
|
||||
tape_pos_t farthest_end(const tape_track_t::iterator& it) const;
|
||||
bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive);
|
||||
adv_res_t adv_it(tape_track_t::iterator& it);
|
||||
attotime fetch_next_wr_word(void);
|
||||
attotime time_to_rd_next_word(tape_pos_t& word_rd_pos);
|
||||
tape_pos_t min_gap_size(void) const;
|
||||
bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap);
|
||||
bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap);
|
||||
void clear_tape(void);
|
||||
void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words);
|
||||
void save_tape(void);
|
||||
bool load_track(tape_track_t& track);
|
||||
bool load_tape(void);
|
||||
void set_tape_present(bool present);
|
||||
attotime time_to_next_hole(void) const;
|
||||
attotime time_to_tach_pulses(void) const;
|
||||
void terminate_cmd_now(void);
|
||||
void cmd_fsm(void);
|
||||
void start_cmd_exec(UINT16 new_cmd_reg);
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
@ -345,16 +345,16 @@ TIMER_CALLBACK_MEMBER( saturn_state::stv_smpc_intback )
|
||||
}
|
||||
|
||||
/*
|
||||
[0] port status:
|
||||
0x04 Sega-tap
|
||||
0x16 Multi-tap
|
||||
0x2x clock serial peripheral
|
||||
0xf0 peripheral isn't connected
|
||||
0xf1 peripheral is connected
|
||||
[1] Peripheral ID (note: lowest four bits determines the size of the input packet)
|
||||
0x02 digital pad
|
||||
0x25 (tested by Game Basic?)
|
||||
0x34 keyboard
|
||||
[0] port status:
|
||||
0x04 Sega-tap
|
||||
0x16 Multi-tap
|
||||
0x2x clock serial peripheral
|
||||
0xf0 peripheral isn't connected
|
||||
0xf1 peripheral is connected
|
||||
[1] Peripheral ID (note: lowest four bits determines the size of the input packet)
|
||||
0x02 digital pad
|
||||
0x25 (tested by Game Basic?)
|
||||
0x34 keyboard
|
||||
|
||||
Lower 4 bits of the port status tell the number of controllers to check for the port
|
||||
Lower 4 bits of the peripheral ID tell the number of registers used by each controller
|
||||
@ -386,8 +386,8 @@ TIMER_CALLBACK_MEMBER( saturn_state::intback_peripheral )
|
||||
UINT8 status2 = m_ctrl2 ? m_ctrl2->read_status() : 0xf0;
|
||||
|
||||
UINT8 reg_offset = 0;
|
||||
UINT8 ctrl1_offset = 0; // this is used when there is segatap or multitap connected
|
||||
UINT8 ctrl2_offset = 0; // this is used when there is segatap or multitap connected
|
||||
UINT8 ctrl1_offset = 0; // this is used when there is segatap or multitap connected
|
||||
UINT8 ctrl2_offset = 0; // this is used when there is segatap or multitap connected
|
||||
|
||||
m_smpc.OREG[reg_offset++] = status1;
|
||||
// read ctrl1
|
||||
|
@ -359,7 +359,7 @@ class optional_region_ptr : public region_ptr_finder<_PointerType, false>
|
||||
{
|
||||
public:
|
||||
optional_region_ptr(device_t &base, const char *tag, size_t length = 0) : region_ptr_finder<_PointerType, false>(base, tag, length) { }
|
||||
optional_region_ptr(device_t &base, size_t length = 0) : region_ptr_finder<_PointerType, false>(base, FINDER_DUMMY_TAG, length) { }
|
||||
optional_region_ptr(device_t &base, size_t length = 0) : region_ptr_finder<_PointerType, false>(base, FINDER_DUMMY_TAG, length) { }
|
||||
};
|
||||
|
||||
// required region pointer finder
|
||||
@ -368,7 +368,7 @@ class required_region_ptr : public region_ptr_finder<_PointerType, true>
|
||||
{
|
||||
public:
|
||||
required_region_ptr(device_t &base, const char *tag, size_t length = 0) : region_ptr_finder<_PointerType, true>(base, tag, length) { }
|
||||
required_region_ptr(device_t &base, size_t length = 0) : region_ptr_finder<_PointerType, true>(base, FINDER_DUMMY_TAG, length) { }
|
||||
required_region_ptr(device_t &base, size_t length = 0) : region_ptr_finder<_PointerType, true>(base, FINDER_DUMMY_TAG, length) { }
|
||||
};
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ device_image_interface::device_image_interface(const machine_config &mconfig, de
|
||||
m_from_swlist(false),
|
||||
m_create_format(0),
|
||||
m_create_args(nullptr),
|
||||
m_user_loadable(TRUE),
|
||||
m_user_loadable(TRUE),
|
||||
m_is_loading(FALSE)
|
||||
{
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ typedef void (*device_image_partialhash_func)(hash_collection &, const unsigned
|
||||
#define DEVICE_IMAGE_UNLOAD_DELEGATE(_class,_name) device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_name),#_class "::device_image_unload_" #_name, downcast<_class *>(device->owner()))
|
||||
|
||||
#define MCFG_SET_IMAGE_LOADABLE(_usrload) \
|
||||
device_image_interface::static_set_user_loadable(*device, _usrload);
|
||||
device_image_interface::static_set_user_loadable(*device, _usrload);
|
||||
|
||||
|
||||
// ======================> device_image_interface
|
||||
@ -237,15 +237,15 @@ public:
|
||||
int reopen_for_write(const char *path);
|
||||
|
||||
static void software_name_split(const char *swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart);
|
||||
static void static_set_user_loadable(device_t &device, bool user_loadable) {
|
||||
device_image_interface *img;
|
||||
if (!device.interface(img))
|
||||
throw emu_fatalerror("MCFG_SET_IMAGE_LOADABLE called on device '%s' with no image interface\n", device.tag());
|
||||
static void static_set_user_loadable(device_t &device, bool user_loadable) {
|
||||
device_image_interface *img;
|
||||
if (!device.interface(img))
|
||||
throw emu_fatalerror("MCFG_SET_IMAGE_LOADABLE called on device '%s' with no image interface\n", device.tag());
|
||||
|
||||
img->m_user_loadable = user_loadable;
|
||||
}
|
||||
img->m_user_loadable = user_loadable;
|
||||
}
|
||||
|
||||
bool user_loadable() const { return m_user_loadable; }
|
||||
bool user_loadable() const { return m_user_loadable; }
|
||||
|
||||
protected:
|
||||
bool load_internal(const char *path, bool is_create, int create_format, option_resolution *create_args, bool just_load);
|
||||
@ -322,9 +322,9 @@ protected:
|
||||
/* creation info */
|
||||
simple_list<image_device_format> m_formatlist;
|
||||
|
||||
/* in the case of arcade cabinet with fixed carts inserted,
|
||||
we want to disable command line cart loading... */
|
||||
bool m_user_loadable;
|
||||
/* in the case of arcade cabinet with fixed carts inserted,
|
||||
we want to disable command line cart loading... */
|
||||
bool m_user_loadable;
|
||||
|
||||
bool m_is_loading;
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "options.h"
|
||||
|
||||
#define OPTION_PRIORITY_CMDLINE OPTION_PRIORITY_HIGH + 1
|
||||
#define OPTION_PRIORITY_CMDLINE OPTION_PRIORITY_HIGH + 1
|
||||
// core options
|
||||
#define OPTION_SYSTEMNAME core_options::unadorned(0)
|
||||
#define OPTION_SOFTWARENAME core_options::unadorned(1)
|
||||
|
@ -289,7 +289,7 @@ private:
|
||||
std::unique_ptr<input_manager> m_input; // internal data from input.cpp
|
||||
std::unique_ptr<sound_manager> m_sound; // internal data from sound.cpp
|
||||
std::unique_ptr<video_manager> m_video; // internal data from video.cpp
|
||||
ui_manager *m_ui; // internal data from ui.cpp
|
||||
ui_manager *m_ui; // internal data from ui.cpp
|
||||
std::unique_ptr<ui_input_manager> m_ui_input; // internal data from uiinput.cpp
|
||||
std::unique_ptr<tilemap_manager> m_tilemap; // internal data from tilemap.cpp
|
||||
std::unique_ptr<debug_view_manager> m_debug_view; // internal data from debugvw.cpp
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
protected:
|
||||
osd_interface & m_osd; // reference to OSD system
|
||||
emu_options & m_options; // reference to options
|
||||
running_machine * m_machine;
|
||||
running_machine * m_machine;
|
||||
};
|
||||
|
||||
|
||||
|
@ -424,7 +424,7 @@ float render_font::string_width(float height, float aspect, const char *string)
|
||||
// loop over characters
|
||||
while (*s != 0)
|
||||
{
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
totwidth += get_char(schar).width;
|
||||
s += scharcount;
|
||||
}
|
||||
|
@ -954,7 +954,7 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_argb3
|
||||
// loop over characters
|
||||
while (*s != 0)
|
||||
{
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
|
||||
if (scharcount == -1)
|
||||
break;
|
||||
@ -1124,7 +1124,7 @@ void layout_element::component::draw_reel(running_machine &machine, bitmap_argb3
|
||||
// loop over characters
|
||||
while (*s != 0)
|
||||
{
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
|
||||
if (scharcount == -1)
|
||||
break;
|
||||
@ -1285,7 +1285,7 @@ void layout_element::component::draw_beltreel(running_machine &machine, bitmap_a
|
||||
// loop over characters
|
||||
while (*s != 0)
|
||||
{
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
int scharcount = uchar_from_utf8(&schar, s, ends - s);
|
||||
|
||||
if (scharcount == -1)
|
||||
break;
|
||||
|
@ -57,11 +57,11 @@ enum class ui_menu_item_type
|
||||
class ui_menu_item
|
||||
{
|
||||
public:
|
||||
const char *text;
|
||||
const char *subtext;
|
||||
UINT32 flags;
|
||||
void *ref;
|
||||
ui_menu_item_type type; // item type (eventually will go away when itemref is proper ui_menu_item class rather than void*)
|
||||
const char *text;
|
||||
const char *subtext;
|
||||
UINT32 flags;
|
||||
void *ref;
|
||||
ui_menu_item_type type; // item type (eventually will go away when itemref is proper ui_menu_item class rather than void*)
|
||||
|
||||
inline bool is_selectable() const;
|
||||
};
|
||||
@ -83,7 +83,7 @@ public:
|
||||
void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; }
|
||||
|
||||
bool show_timecode_counter() const { return m_show_timecode_counter; }
|
||||
bool show_timecode_total() const { return m_show_timecode_total; }
|
||||
bool show_timecode_total() const { return m_show_timecode_total; }
|
||||
|
||||
virtual void popup_time_string(int seconds, std::string message) { }
|
||||
|
||||
|
@ -112,7 +112,7 @@ private:
|
||||
const char * m_current_ioport;
|
||||
int_map m_region_map;
|
||||
std::unordered_set<std::string> m_already_checked;
|
||||
bool m_validate_all;
|
||||
bool m_validate_all;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -818,472 +818,471 @@ void info_xml_creator::output_sound(device_t &device)
|
||||
|
||||
void info_xml_creator::output_input(const ioport_list &portlist)
|
||||
{
|
||||
// enumerated list of control types
|
||||
// NOTE: the order is chosen so that 'spare' button inputs are assigned to the
|
||||
// most-likely-correct input device when info is output (you can think of it as
|
||||
// a sort of likelihood order of having buttons)
|
||||
enum
|
||||
{
|
||||
CTRL_DIGITAL_BUTTONS,
|
||||
CTRL_DIGITAL_JOYSTICK,
|
||||
CTRL_ANALOG_JOYSTICK,
|
||||
CTRL_ANALOG_LIGHTGUN,
|
||||
CTRL_ANALOG_DIAL,
|
||||
CTRL_ANALOG_POSITIONAL,
|
||||
CTRL_ANALOG_TRACKBALL,
|
||||
CTRL_ANALOG_MOUSE,
|
||||
CTRL_ANALOG_PADDLE,
|
||||
CTRL_ANALOG_PEDAL,
|
||||
CTRL_DIGITAL_KEYPAD,
|
||||
CTRL_DIGITAL_KEYBOARD,
|
||||
CTRL_DIGITAL_MAHJONG,
|
||||
CTRL_DIGITAL_HANAFUDA,
|
||||
CTRL_DIGITAL_GAMBLING,
|
||||
CTRL_COUNT
|
||||
};
|
||||
// enumerated list of control types
|
||||
// NOTE: the order is chosen so that 'spare' button inputs are assigned to the
|
||||
// most-likely-correct input device when info is output (you can think of it as
|
||||
// a sort of likelihood order of having buttons)
|
||||
enum
|
||||
{
|
||||
CTRL_DIGITAL_BUTTONS,
|
||||
CTRL_DIGITAL_JOYSTICK,
|
||||
CTRL_ANALOG_JOYSTICK,
|
||||
CTRL_ANALOG_LIGHTGUN,
|
||||
CTRL_ANALOG_DIAL,
|
||||
CTRL_ANALOG_POSITIONAL,
|
||||
CTRL_ANALOG_TRACKBALL,
|
||||
CTRL_ANALOG_MOUSE,
|
||||
CTRL_ANALOG_PADDLE,
|
||||
CTRL_ANALOG_PEDAL,
|
||||
CTRL_DIGITAL_KEYPAD,
|
||||
CTRL_DIGITAL_KEYBOARD,
|
||||
CTRL_DIGITAL_MAHJONG,
|
||||
CTRL_DIGITAL_HANAFUDA,
|
||||
CTRL_DIGITAL_GAMBLING,
|
||||
CTRL_COUNT
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CTRL_P1,
|
||||
CTRL_P2,
|
||||
CTRL_P3,
|
||||
CTRL_P4,
|
||||
CTRL_P5,
|
||||
CTRL_P6,
|
||||
CTRL_P7,
|
||||
CTRL_P8,
|
||||
enum
|
||||
{
|
||||
CTRL_P1,
|
||||
CTRL_P2,
|
||||
CTRL_P3,
|
||||
CTRL_P4,
|
||||
CTRL_P5,
|
||||
CTRL_P6,
|
||||
CTRL_P7,
|
||||
CTRL_P8,
|
||||
CTRL_P9,
|
||||
CTRL_P10,
|
||||
CTRL_PCOUNT
|
||||
};
|
||||
CTRL_PCOUNT
|
||||
};
|
||||
|
||||
// directions
|
||||
const UINT8 DIR_UP = 0x01;
|
||||
const UINT8 DIR_DOWN = 0x02;
|
||||
const UINT8 DIR_LEFT = 0x04;
|
||||
const UINT8 DIR_RIGHT = 0x08;
|
||||
// directions
|
||||
const UINT8 DIR_UP = 0x01;
|
||||
const UINT8 DIR_DOWN = 0x02;
|
||||
const UINT8 DIR_LEFT = 0x04;
|
||||
const UINT8 DIR_RIGHT = 0x08;
|
||||
|
||||
// initialize the list of control types
|
||||
struct
|
||||
{
|
||||
const char * type; // general type of input
|
||||
int player; // player which the input belongs to
|
||||
int nbuttons; // total number of buttons
|
||||
int maxbuttons; // max index of buttons (using IPT_BUTTONn) [probably to be removed soonish]
|
||||
int ways; // directions for joystick
|
||||
bool analog; // is analog input?
|
||||
UINT8 helper[3]; // for dual joysticks [possibly to be removed soonish]
|
||||
INT32 min; // analog minimum value
|
||||
INT32 max; // analog maximum value
|
||||
INT32 sensitivity; // default analog sensitivity
|
||||
INT32 keydelta; // default analog keydelta
|
||||
bool reverse; // default analog reverse setting
|
||||
} control_info[CTRL_COUNT * CTRL_PCOUNT];
|
||||
// initialize the list of control types
|
||||
struct
|
||||
{
|
||||
const char * type; // general type of input
|
||||
int player; // player which the input belongs to
|
||||
int nbuttons; // total number of buttons
|
||||
int maxbuttons; // max index of buttons (using IPT_BUTTONn) [probably to be removed soonish]
|
||||
int ways; // directions for joystick
|
||||
bool analog; // is analog input?
|
||||
UINT8 helper[3]; // for dual joysticks [possibly to be removed soonish]
|
||||
INT32 min; // analog minimum value
|
||||
INT32 max; // analog maximum value
|
||||
INT32 sensitivity; // default analog sensitivity
|
||||
INT32 keydelta; // default analog keydelta
|
||||
bool reverse; // default analog reverse setting
|
||||
} control_info[CTRL_COUNT * CTRL_PCOUNT];
|
||||
|
||||
memset(&control_info, 0, sizeof(control_info));
|
||||
memset(&control_info, 0, sizeof(control_info));
|
||||
|
||||
// tracking info as we iterate
|
||||
int nplayer = 0;
|
||||
int ncoin = 0;
|
||||
bool service = false;
|
||||
bool tilt = false;
|
||||
// tracking info as we iterate
|
||||
int nplayer = 0;
|
||||
int ncoin = 0;
|
||||
bool service = false;
|
||||
bool tilt = false;
|
||||
|
||||
// iterate over the ports
|
||||
for (ioport_port &port : portlist)
|
||||
{
|
||||
int ctrl_type = CTRL_DIGITAL_BUTTONS;
|
||||
bool ctrl_analog = FALSE;
|
||||
for (ioport_field &field : port.fields())
|
||||
{
|
||||
// iterate over the ports
|
||||
for (ioport_port &port : portlist)
|
||||
{
|
||||
int ctrl_type = CTRL_DIGITAL_BUTTONS;
|
||||
bool ctrl_analog = FALSE;
|
||||
for (ioport_field &field : port.fields())
|
||||
{
|
||||
// track the highest player number
|
||||
if (nplayer < field.player() + 1)
|
||||
nplayer = field.player() + 1;
|
||||
|
||||
// track the highest player number
|
||||
if (nplayer < field.player() + 1)
|
||||
nplayer = field.player() + 1;
|
||||
// switch off of the type
|
||||
switch (field.type())
|
||||
{
|
||||
// map joysticks
|
||||
case IPT_JOYSTICK_UP:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_UP;
|
||||
break;
|
||||
case IPT_JOYSTICK_DOWN:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_DOWN;
|
||||
break;
|
||||
case IPT_JOYSTICK_LEFT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_LEFT;
|
||||
break;
|
||||
case IPT_JOYSTICK_RIGHT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_RIGHT;
|
||||
break;
|
||||
|
||||
// switch off of the type
|
||||
switch (field.type())
|
||||
{
|
||||
// map joysticks
|
||||
case IPT_JOYSTICK_UP:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_UP;
|
||||
break;
|
||||
case IPT_JOYSTICK_DOWN:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_DOWN;
|
||||
break;
|
||||
case IPT_JOYSTICK_LEFT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_LEFT;
|
||||
break;
|
||||
case IPT_JOYSTICK_RIGHT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_RIGHT;
|
||||
break;
|
||||
case IPT_JOYSTICKLEFT_UP:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_UP;
|
||||
break;
|
||||
case IPT_JOYSTICKLEFT_DOWN:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_DOWN;
|
||||
break;
|
||||
case IPT_JOYSTICKLEFT_LEFT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_LEFT;
|
||||
break;
|
||||
case IPT_JOYSTICKLEFT_RIGHT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_RIGHT;
|
||||
break;
|
||||
|
||||
case IPT_JOYSTICKLEFT_UP:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_UP;
|
||||
break;
|
||||
case IPT_JOYSTICKLEFT_DOWN:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_DOWN;
|
||||
break;
|
||||
case IPT_JOYSTICKLEFT_LEFT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_LEFT;
|
||||
break;
|
||||
case IPT_JOYSTICKLEFT_RIGHT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_RIGHT;
|
||||
break;
|
||||
case IPT_JOYSTICKRIGHT_UP:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_UP;
|
||||
break;
|
||||
case IPT_JOYSTICKRIGHT_DOWN:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_DOWN;
|
||||
break;
|
||||
case IPT_JOYSTICKRIGHT_LEFT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_LEFT;
|
||||
break;
|
||||
case IPT_JOYSTICKRIGHT_RIGHT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_RIGHT;
|
||||
break;
|
||||
|
||||
case IPT_JOYSTICKRIGHT_UP:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_UP;
|
||||
break;
|
||||
case IPT_JOYSTICKRIGHT_DOWN:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_DOWN;
|
||||
break;
|
||||
case IPT_JOYSTICKRIGHT_LEFT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_LEFT;
|
||||
break;
|
||||
case IPT_JOYSTICKRIGHT_RIGHT:
|
||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_RIGHT;
|
||||
break;
|
||||
// map analog inputs
|
||||
case IPT_AD_STICK_X:
|
||||
case IPT_AD_STICK_Y:
|
||||
case IPT_AD_STICK_Z:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "stick";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
// map analog inputs
|
||||
case IPT_AD_STICK_X:
|
||||
case IPT_AD_STICK_Y:
|
||||
case IPT_AD_STICK_Z:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "stick";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
case IPT_PADDLE:
|
||||
case IPT_PADDLE_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_PADDLE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "paddle";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
case IPT_PADDLE:
|
||||
case IPT_PADDLE_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_PADDLE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "paddle";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
case IPT_PEDAL:
|
||||
case IPT_PEDAL2:
|
||||
case IPT_PEDAL3:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_PEDAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "pedal";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
case IPT_PEDAL:
|
||||
case IPT_PEDAL2:
|
||||
case IPT_PEDAL3:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_PEDAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "pedal";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
case IPT_LIGHTGUN_X:
|
||||
case IPT_LIGHTGUN_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_LIGHTGUN;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "lightgun";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
case IPT_LIGHTGUN_X:
|
||||
case IPT_LIGHTGUN_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_LIGHTGUN;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "lightgun";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
case IPT_POSITIONAL:
|
||||
case IPT_POSITIONAL_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_POSITIONAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "positional";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
case IPT_POSITIONAL:
|
||||
case IPT_POSITIONAL_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_POSITIONAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "positional";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
case IPT_DIAL:
|
||||
case IPT_DIAL_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_DIAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "dial";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
case IPT_DIAL:
|
||||
case IPT_DIAL_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_DIAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "dial";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
case IPT_TRACKBALL_X:
|
||||
case IPT_TRACKBALL_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_TRACKBALL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "trackball";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
case IPT_TRACKBALL_X:
|
||||
case IPT_TRACKBALL_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_TRACKBALL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "trackball";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
case IPT_MOUSE_X:
|
||||
case IPT_MOUSE_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_MOUSE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mouse";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
|
||||
case IPT_MOUSE_X:
|
||||
case IPT_MOUSE_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_type = CTRL_ANALOG_MOUSE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mouse";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
break;
|
||||
// map buttons
|
||||
case IPT_BUTTON1:
|
||||
case IPT_BUTTON2:
|
||||
case IPT_BUTTON3:
|
||||
case IPT_BUTTON4:
|
||||
case IPT_BUTTON5:
|
||||
case IPT_BUTTON6:
|
||||
case IPT_BUTTON7:
|
||||
case IPT_BUTTON8:
|
||||
case IPT_BUTTON9:
|
||||
case IPT_BUTTON10:
|
||||
case IPT_BUTTON11:
|
||||
case IPT_BUTTON12:
|
||||
case IPT_BUTTON13:
|
||||
case IPT_BUTTON14:
|
||||
case IPT_BUTTON15:
|
||||
case IPT_BUTTON16:
|
||||
ctrl_analog = FALSE;
|
||||
if (control_info[field.player() * CTRL_COUNT + ctrl_type].type == nullptr)
|
||||
{
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "only_buttons";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = FALSE;
|
||||
}
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons = MAX(control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons, field.type() - IPT_BUTTON1 + 1);
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
break;
|
||||
|
||||
// map buttons
|
||||
case IPT_BUTTON1:
|
||||
case IPT_BUTTON2:
|
||||
case IPT_BUTTON3:
|
||||
case IPT_BUTTON4:
|
||||
case IPT_BUTTON5:
|
||||
case IPT_BUTTON6:
|
||||
case IPT_BUTTON7:
|
||||
case IPT_BUTTON8:
|
||||
case IPT_BUTTON9:
|
||||
case IPT_BUTTON10:
|
||||
case IPT_BUTTON11:
|
||||
case IPT_BUTTON12:
|
||||
case IPT_BUTTON13:
|
||||
case IPT_BUTTON14:
|
||||
case IPT_BUTTON15:
|
||||
case IPT_BUTTON16:
|
||||
ctrl_analog = FALSE;
|
||||
if (control_info[field.player() * CTRL_COUNT + ctrl_type].type == nullptr)
|
||||
{
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "only_buttons";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = FALSE;
|
||||
}
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons = MAX(control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons, field.type() - IPT_BUTTON1 + 1);
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
break;
|
||||
|
||||
// track maximum coin index
|
||||
case IPT_COIN1:
|
||||
case IPT_COIN2:
|
||||
case IPT_COIN3:
|
||||
case IPT_COIN4:
|
||||
case IPT_COIN5:
|
||||
case IPT_COIN6:
|
||||
case IPT_COIN7:
|
||||
case IPT_COIN8:
|
||||
// track maximum coin index
|
||||
case IPT_COIN1:
|
||||
case IPT_COIN2:
|
||||
case IPT_COIN3:
|
||||
case IPT_COIN4:
|
||||
case IPT_COIN5:
|
||||
case IPT_COIN6:
|
||||
case IPT_COIN7:
|
||||
case IPT_COIN8:
|
||||
case IPT_COIN9:
|
||||
case IPT_COIN10:
|
||||
case IPT_COIN11:
|
||||
case IPT_COIN12:
|
||||
ncoin = MAX(ncoin, field.type() - IPT_COIN1 + 1);
|
||||
break;
|
||||
ncoin = MAX(ncoin, field.type() - IPT_COIN1 + 1);
|
||||
break;
|
||||
|
||||
// track presence of keypads and keyboards
|
||||
case IPT_KEYPAD:
|
||||
ctrl_type = CTRL_DIGITAL_KEYPAD;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keypad";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
break;
|
||||
// track presence of keypads and keyboards
|
||||
case IPT_KEYPAD:
|
||||
ctrl_type = CTRL_DIGITAL_KEYPAD;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keypad";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
break;
|
||||
|
||||
case IPT_KEYBOARD:
|
||||
ctrl_type = CTRL_DIGITAL_KEYBOARD;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keyboard";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
break;
|
||||
case IPT_KEYBOARD:
|
||||
ctrl_type = CTRL_DIGITAL_KEYBOARD;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keyboard";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
break;
|
||||
|
||||
// additional types
|
||||
case IPT_SERVICE:
|
||||
service = true;
|
||||
break;
|
||||
// additional types
|
||||
case IPT_SERVICE:
|
||||
service = true;
|
||||
break;
|
||||
|
||||
case IPT_TILT:
|
||||
tilt = true;
|
||||
break;
|
||||
case IPT_TILT:
|
||||
tilt = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (field.type() > IPT_MAHJONG_FIRST && field.type() < IPT_MAHJONG_LAST)
|
||||
{
|
||||
ctrl_type = CTRL_DIGITAL_MAHJONG;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mahjong";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
}
|
||||
else if (field.type() > IPT_HANAFUDA_FIRST && field.type() < IPT_HANAFUDA_LAST)
|
||||
{
|
||||
ctrl_type = CTRL_DIGITAL_HANAFUDA;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "hanafuda";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
}
|
||||
else if (field.type() > IPT_GAMBLING_FIRST && field.type() < IPT_GAMBLING_LAST)
|
||||
{
|
||||
ctrl_type = CTRL_DIGITAL_GAMBLING;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "gambling";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (field.type() > IPT_MAHJONG_FIRST && field.type() < IPT_MAHJONG_LAST)
|
||||
{
|
||||
ctrl_type = CTRL_DIGITAL_MAHJONG;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mahjong";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
}
|
||||
else if (field.type() > IPT_HANAFUDA_FIRST && field.type() < IPT_HANAFUDA_LAST)
|
||||
{
|
||||
ctrl_type = CTRL_DIGITAL_HANAFUDA;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "hanafuda";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
}
|
||||
else if (field.type() > IPT_GAMBLING_FIRST && field.type() < IPT_GAMBLING_LAST)
|
||||
{
|
||||
ctrl_type = CTRL_DIGITAL_GAMBLING;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "gambling";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (ctrl_analog)
|
||||
{
|
||||
// get the analog stats
|
||||
if (field.minval() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].min = field.minval();
|
||||
if (field.maxval() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].max = field.maxval();
|
||||
if (field.sensitivity() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].sensitivity = field.sensitivity();
|
||||
if (field.delta() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].keydelta = field.delta();
|
||||
if (field.analog_reverse() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reverse = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ctrl_analog)
|
||||
{
|
||||
// get the analog stats
|
||||
if (field.minval() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].min = field.minval();
|
||||
if (field.maxval() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].max = field.maxval();
|
||||
if (field.sensitivity() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].sensitivity = field.sensitivity();
|
||||
if (field.delta() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].keydelta = field.delta();
|
||||
if (field.analog_reverse() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reverse = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clean-up those entries, if any, where buttons were defined in a separate port than the actual controller they belong to.
|
||||
// This is quite often the case, especially for arcades where controls can be easily mapped to separate input ports on PCB.
|
||||
// If such situation would only happen for joystick, it would be possible to work it around by initializing differently
|
||||
// ctrl_type above, but it is quite common among analog inputs as well (for instance, this is the tipical situation
|
||||
// for lightguns) and therefore we really need this separate loop.
|
||||
for (int i = 0; i < CTRL_PCOUNT; i++)
|
||||
{
|
||||
bool fix_done = FALSE;
|
||||
for (int j = 1; j < CTRL_COUNT; j++)
|
||||
if (control_info[i * CTRL_COUNT].type != nullptr && control_info[i * CTRL_COUNT + j].type != nullptr && !fix_done)
|
||||
{
|
||||
control_info[i * CTRL_COUNT + j].nbuttons += control_info[i * CTRL_COUNT].nbuttons;
|
||||
control_info[i * CTRL_COUNT + j].maxbuttons = MAX(control_info[i * CTRL_COUNT + j].maxbuttons, control_info[i * CTRL_COUNT].maxbuttons);
|
||||
// Clean-up those entries, if any, where buttons were defined in a separate port than the actual controller they belong to.
|
||||
// This is quite often the case, especially for arcades where controls can be easily mapped to separate input ports on PCB.
|
||||
// If such situation would only happen for joystick, it would be possible to work it around by initializing differently
|
||||
// ctrl_type above, but it is quite common among analog inputs as well (for instance, this is the tipical situation
|
||||
// for lightguns) and therefore we really need this separate loop.
|
||||
for (int i = 0; i < CTRL_PCOUNT; i++)
|
||||
{
|
||||
bool fix_done = FALSE;
|
||||
for (int j = 1; j < CTRL_COUNT; j++)
|
||||
if (control_info[i * CTRL_COUNT].type != nullptr && control_info[i * CTRL_COUNT + j].type != nullptr && !fix_done)
|
||||
{
|
||||
control_info[i * CTRL_COUNT + j].nbuttons += control_info[i * CTRL_COUNT].nbuttons;
|
||||
control_info[i * CTRL_COUNT + j].maxbuttons = MAX(control_info[i * CTRL_COUNT + j].maxbuttons, control_info[i * CTRL_COUNT].maxbuttons);
|
||||
|
||||
memset(&control_info[i * CTRL_COUNT], 0, sizeof(control_info[0]));
|
||||
fix_done = TRUE;
|
||||
}
|
||||
}
|
||||
memset(&control_info[i * CTRL_COUNT], 0, sizeof(control_info[0]));
|
||||
fix_done = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Output the input info
|
||||
// First basic info
|
||||
fprintf(m_output, "\t\t<input");
|
||||
fprintf(m_output, " players=\"%d\"", nplayer);
|
||||
if (ncoin != 0)
|
||||
fprintf(m_output, " coins=\"%d\"", ncoin);
|
||||
if (service)
|
||||
fprintf(m_output, " service=\"yes\"");
|
||||
if (tilt)
|
||||
fprintf(m_output, " tilt=\"yes\"");
|
||||
fprintf(m_output, ">\n");
|
||||
// Output the input info
|
||||
// First basic info
|
||||
fprintf(m_output, "\t\t<input");
|
||||
fprintf(m_output, " players=\"%d\"", nplayer);
|
||||
if (ncoin != 0)
|
||||
fprintf(m_output, " coins=\"%d\"", ncoin);
|
||||
if (service)
|
||||
fprintf(m_output, " service=\"yes\"");
|
||||
if (tilt)
|
||||
fprintf(m_output, " tilt=\"yes\"");
|
||||
fprintf(m_output, ">\n");
|
||||
|
||||
// Then controller specific ones
|
||||
for (auto & elem : control_info)
|
||||
if (elem.type != nullptr)
|
||||
{
|
||||
//printf("type %s - player %d - buttons %d\n", elem.type, elem.player, elem.nbuttons);
|
||||
if (elem.analog)
|
||||
{
|
||||
fprintf(m_output, "\t\t\t<control type=\"%s\"", xml_normalize_string(elem.type));
|
||||
if (nplayer > 1)
|
||||
fprintf(m_output, " player=\"%d\"", elem.player);
|
||||
if (elem.nbuttons > 0)
|
||||
fprintf(m_output, " buttons=\"%d\"", strcmp(elem.type, "stick") ? elem.nbuttons : elem.maxbuttons);
|
||||
if (elem.min != 0 || elem.max != 0)
|
||||
{
|
||||
fprintf(m_output, " minimum=\"%d\"", elem.min);
|
||||
fprintf(m_output, " maximum=\"%d\"", elem.max);
|
||||
}
|
||||
if (elem.sensitivity != 0)
|
||||
fprintf(m_output, " sensitivity=\"%d\"", elem.sensitivity);
|
||||
if (elem.keydelta != 0)
|
||||
fprintf(m_output, " keydelta=\"%d\"", elem.keydelta);
|
||||
if (elem.reverse)
|
||||
fprintf(m_output, " reverse=\"yes\"");
|
||||
// Then controller specific ones
|
||||
for (auto & elem : control_info)
|
||||
if (elem.type != nullptr)
|
||||
{
|
||||
//printf("type %s - player %d - buttons %d\n", elem.type, elem.player, elem.nbuttons);
|
||||
if (elem.analog)
|
||||
{
|
||||
fprintf(m_output, "\t\t\t<control type=\"%s\"", xml_normalize_string(elem.type));
|
||||
if (nplayer > 1)
|
||||
fprintf(m_output, " player=\"%d\"", elem.player);
|
||||
if (elem.nbuttons > 0)
|
||||
fprintf(m_output, " buttons=\"%d\"", strcmp(elem.type, "stick") ? elem.nbuttons : elem.maxbuttons);
|
||||
if (elem.min != 0 || elem.max != 0)
|
||||
{
|
||||
fprintf(m_output, " minimum=\"%d\"", elem.min);
|
||||
fprintf(m_output, " maximum=\"%d\"", elem.max);
|
||||
}
|
||||
if (elem.sensitivity != 0)
|
||||
fprintf(m_output, " sensitivity=\"%d\"", elem.sensitivity);
|
||||
if (elem.keydelta != 0)
|
||||
fprintf(m_output, " keydelta=\"%d\"", elem.keydelta);
|
||||
if (elem.reverse)
|
||||
fprintf(m_output, " reverse=\"yes\"");
|
||||
|
||||
fprintf(m_output, "/>\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (elem.helper[1] == 0 && elem.helper[2] != 0) { elem.helper[1] = elem.helper[2]; elem.helper[2] = 0; }
|
||||
if (elem.helper[0] == 0 && elem.helper[1] != 0) { elem.helper[0] = elem.helper[1]; elem.helper[1] = 0; }
|
||||
if (elem.helper[1] == 0 && elem.helper[2] != 0) { elem.helper[1] = elem.helper[2]; elem.helper[2] = 0; }
|
||||
const char *joys = (elem.helper[2] != 0) ? "triple" : (elem.helper[1] != 0) ? "double" : "";
|
||||
fprintf(m_output, "\t\t\t<control type=\"%s%s\"", joys, xml_normalize_string(elem.type));
|
||||
if (nplayer > 1)
|
||||
fprintf(m_output, " player=\"%d\"", elem.player);
|
||||
if (elem.nbuttons > 0)
|
||||
fprintf(m_output, " buttons=\"%d\"", strcmp(elem.type, "joy") ? elem.nbuttons : elem.maxbuttons);
|
||||
for (int lp = 0; lp < 3 && elem.helper[lp] != 0; lp++)
|
||||
{
|
||||
const char *plural = (lp==2) ? "3" : (lp==1) ? "2" : "";
|
||||
const char *ways;
|
||||
std::string helper;
|
||||
switch (elem.helper[lp] & (DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT))
|
||||
{
|
||||
case DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT:
|
||||
helper = string_format("%d", (elem.ways == 0) ? 8 : elem.ways);
|
||||
ways = helper.c_str();
|
||||
break;
|
||||
case DIR_LEFT | DIR_RIGHT:
|
||||
ways = "2";
|
||||
break;
|
||||
case DIR_UP | DIR_DOWN:
|
||||
ways = "vertical2";
|
||||
break;
|
||||
case DIR_UP:
|
||||
case DIR_DOWN:
|
||||
case DIR_LEFT:
|
||||
case DIR_RIGHT:
|
||||
ways = "1";
|
||||
break;
|
||||
case DIR_UP | DIR_DOWN | DIR_LEFT:
|
||||
case DIR_UP | DIR_DOWN | DIR_RIGHT:
|
||||
case DIR_UP | DIR_LEFT | DIR_RIGHT:
|
||||
case DIR_DOWN | DIR_LEFT | DIR_RIGHT:
|
||||
ways = (elem.ways == 4) ? "3 (half4)" : "5 (half8)";
|
||||
break;
|
||||
default:
|
||||
ways = "strange2";
|
||||
break;
|
||||
}
|
||||
fprintf(m_output, " ways%s=\"%s\"", plural, ways);
|
||||
}
|
||||
fprintf(m_output, "/>\n");
|
||||
}
|
||||
}
|
||||
fprintf(m_output, "/>\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (elem.helper[1] == 0 && elem.helper[2] != 0) { elem.helper[1] = elem.helper[2]; elem.helper[2] = 0; }
|
||||
if (elem.helper[0] == 0 && elem.helper[1] != 0) { elem.helper[0] = elem.helper[1]; elem.helper[1] = 0; }
|
||||
if (elem.helper[1] == 0 && elem.helper[2] != 0) { elem.helper[1] = elem.helper[2]; elem.helper[2] = 0; }
|
||||
const char *joys = (elem.helper[2] != 0) ? "triple" : (elem.helper[1] != 0) ? "double" : "";
|
||||
fprintf(m_output, "\t\t\t<control type=\"%s%s\"", joys, xml_normalize_string(elem.type));
|
||||
if (nplayer > 1)
|
||||
fprintf(m_output, " player=\"%d\"", elem.player);
|
||||
if (elem.nbuttons > 0)
|
||||
fprintf(m_output, " buttons=\"%d\"", strcmp(elem.type, "joy") ? elem.nbuttons : elem.maxbuttons);
|
||||
for (int lp = 0; lp < 3 && elem.helper[lp] != 0; lp++)
|
||||
{
|
||||
const char *plural = (lp==2) ? "3" : (lp==1) ? "2" : "";
|
||||
const char *ways;
|
||||
std::string helper;
|
||||
switch (elem.helper[lp] & (DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT))
|
||||
{
|
||||
case DIR_UP | DIR_DOWN | DIR_LEFT | DIR_RIGHT:
|
||||
helper = string_format("%d", (elem.ways == 0) ? 8 : elem.ways);
|
||||
ways = helper.c_str();
|
||||
break;
|
||||
case DIR_LEFT | DIR_RIGHT:
|
||||
ways = "2";
|
||||
break;
|
||||
case DIR_UP | DIR_DOWN:
|
||||
ways = "vertical2";
|
||||
break;
|
||||
case DIR_UP:
|
||||
case DIR_DOWN:
|
||||
case DIR_LEFT:
|
||||
case DIR_RIGHT:
|
||||
ways = "1";
|
||||
break;
|
||||
case DIR_UP | DIR_DOWN | DIR_LEFT:
|
||||
case DIR_UP | DIR_DOWN | DIR_RIGHT:
|
||||
case DIR_UP | DIR_LEFT | DIR_RIGHT:
|
||||
case DIR_DOWN | DIR_LEFT | DIR_RIGHT:
|
||||
ways = (elem.ways == 4) ? "3 (half4)" : "5 (half8)";
|
||||
break;
|
||||
default:
|
||||
ways = "strange2";
|
||||
break;
|
||||
}
|
||||
fprintf(m_output, " ways%s=\"%s\"", plural, ways);
|
||||
}
|
||||
fprintf(m_output, "/>\n");
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(m_output, "\t\t</input>\n");
|
||||
fprintf(m_output, "\t\t</input>\n");
|
||||
}
|
||||
|
||||
|
||||
@ -1446,9 +1445,9 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
|
||||
if (!loadable)
|
||||
fprintf(m_output, " fixed_image=\"1\"");
|
||||
|
||||
// is this device mandatory?
|
||||
if (imagedev.must_be_loaded())
|
||||
fprintf(m_output, " mandatory=\"1\"");
|
||||
// is this device mandatory?
|
||||
if (imagedev.must_be_loaded())
|
||||
fprintf(m_output, " mandatory=\"1\"");
|
||||
|
||||
if (imagedev.image_interface() && imagedev.image_interface()[0])
|
||||
fprintf(m_output, " interface=\"%s\"", xml_normalize_string(imagedev.image_interface()));
|
||||
@ -1456,27 +1455,27 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
|
||||
// close the XML tag
|
||||
fprintf(m_output, ">\n");
|
||||
|
||||
if (loadable)
|
||||
{
|
||||
const char *name = imagedev.instance_name();
|
||||
const char *shortname = imagedev.brief_instance_name();
|
||||
if (loadable)
|
||||
{
|
||||
const char *name = imagedev.instance_name();
|
||||
const char *shortname = imagedev.brief_instance_name();
|
||||
|
||||
fprintf(m_output, "\t\t\t<instance");
|
||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(name));
|
||||
fprintf(m_output, " briefname=\"%s\"", xml_normalize_string(shortname));
|
||||
fprintf(m_output, "/>\n");
|
||||
fprintf(m_output, "\t\t\t<instance");
|
||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(name));
|
||||
fprintf(m_output, " briefname=\"%s\"", xml_normalize_string(shortname));
|
||||
fprintf(m_output, "/>\n");
|
||||
|
||||
std::string extensions(imagedev.file_extensions());
|
||||
std::string extensions(imagedev.file_extensions());
|
||||
|
||||
char *ext = strtok((char *)extensions.c_str(), ",");
|
||||
while (ext != nullptr)
|
||||
{
|
||||
fprintf(m_output, "\t\t\t<extension");
|
||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(ext));
|
||||
fprintf(m_output, "/>\n");
|
||||
ext = strtok(nullptr, ",");
|
||||
}
|
||||
}
|
||||
char *ext = strtok((char *)extensions.c_str(), ",");
|
||||
while (ext != nullptr)
|
||||
{
|
||||
fprintf(m_output, "\t\t\t<extension");
|
||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(ext));
|
||||
fprintf(m_output, "/>\n");
|
||||
ext = strtok(nullptr, ",");
|
||||
}
|
||||
}
|
||||
fprintf(m_output, "\t\t</device>\n");
|
||||
}
|
||||
}
|
||||
|
@ -1469,7 +1469,7 @@ int lua_engine::lua_screen::l_draw_line(lua_State *L)
|
||||
|
||||
//-------------------------------------------------
|
||||
// draw_text - draw text on a screen container
|
||||
// if x is a position, then y is a pixel position, otherwise x and y are screen size relative
|
||||
// if x is a position, then y is a pixel position, otherwise x and y are screen size relative
|
||||
// -> manager:machine().screens[":screen"]:draw_text(x, y, message)
|
||||
//-------------------------------------------------
|
||||
|
||||
@ -2094,26 +2094,26 @@ int lua_engine::lua_machine::l_logerror(lua_State *L)
|
||||
|
||||
std::string lua_engine::get_print_buffer(lua_State *L)
|
||||
{
|
||||
int nargs = lua_gettop(L);
|
||||
int nargs = lua_gettop(L);
|
||||
|
||||
const std::string sep = " ";
|
||||
const std::string sep = " ";
|
||||
|
||||
std::ostringstream ss;
|
||||
bool first = true;
|
||||
std::ostringstream ss;
|
||||
bool first = true;
|
||||
|
||||
for (int i = 1; i <= nargs; i++) {
|
||||
const char* c = lua_tostring(L, i);
|
||||
const std::string str = c ? c : "<nil>";
|
||||
if (first) first = false;
|
||||
else ss << sep;
|
||||
ss << str;
|
||||
}
|
||||
for (int i = 1; i <= nargs; i++) {
|
||||
const char* c = lua_tostring(L, i);
|
||||
const std::string str = c ? c : "<nil>";
|
||||
if (first) first = false;
|
||||
else ss << sep;
|
||||
ss << str;
|
||||
}
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
int lua_engine::l_osd_printf_verbose(lua_State *L)
|
||||
{
|
||||
osd_printf_verbose("%s\n",get_print_buffer(L).c_str());
|
||||
osd_printf_verbose("%s\n",get_print_buffer(L).c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ mame_machine_manager::mame_machine_manager(emu_options &options,osd_interface &o
|
||||
m_lua(global_alloc(lua_engine)),
|
||||
m_new_driver_pending(nullptr),
|
||||
m_firstrun(true),
|
||||
m_autoboot_timer(nullptr)
|
||||
m_autoboot_timer(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -423,4 +423,3 @@ bool mame_options::parse_one_ini(emu_options &options, const char *basename, int
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,6 @@ void ui_menu_file_manager::handle()
|
||||
selected_device = (device_image_interface *) event->itemref;
|
||||
if (selected_device != nullptr)
|
||||
{
|
||||
|
||||
m_curr_selected = TRUE;
|
||||
floppy_image_device *floppy_device = dynamic_cast<floppy_image_device *>(selected_device);
|
||||
if (floppy_device != nullptr)
|
||||
|
@ -558,37 +558,37 @@ void ui_menu::draw(UINT32 flags, float origx0, float origy0)
|
||||
float visible_left = (1.0f - visible_width) * 0.5f;
|
||||
float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
|
||||
|
||||
/* float visible_left;
|
||||
float visible_top;
|
||||
if (origx0 == 0.0f && origy0 == 0.0f)
|
||||
{
|
||||
visible_left = (1.0f - visible_width) * 0.5f;
|
||||
visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
INT32 mouse_target_x, mouse_target_y;
|
||||
float m_x, m_y;
|
||||
render_target *mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
|
||||
if (mouse_target != nullptr)
|
||||
{
|
||||
if (mouse_target->map_point_container(origx0, origy0, *container, m_x, m_y))
|
||||
{
|
||||
visible_left = m_x;
|
||||
visible_top = m_y;
|
||||
}
|
||||
else
|
||||
{
|
||||
visible_left = (1.0f - visible_width) * 0.5f;
|
||||
visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
visible_left = (1.0f - visible_width) * 0.5f;
|
||||
visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
|
||||
}
|
||||
}
|
||||
/* float visible_left;
|
||||
float visible_top;
|
||||
if (origx0 == 0.0f && origy0 == 0.0f)
|
||||
{
|
||||
visible_left = (1.0f - visible_width) * 0.5f;
|
||||
visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
INT32 mouse_target_x, mouse_target_y;
|
||||
float m_x, m_y;
|
||||
render_target *mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
|
||||
if (mouse_target != nullptr)
|
||||
{
|
||||
if (mouse_target->map_point_container(origx0, origy0, *container, m_x, m_y))
|
||||
{
|
||||
visible_left = m_x;
|
||||
visible_top = m_y;
|
||||
}
|
||||
else
|
||||
{
|
||||
visible_left = (1.0f - visible_width) * 0.5f;
|
||||
visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
visible_left = (1.0f - visible_width) * 0.5f;
|
||||
visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
|
||||
}
|
||||
}
|
||||
*/
|
||||
// if the menu is at the bottom of the extra, adjust
|
||||
visible_top += customtop;
|
||||
|
@ -59,11 +59,11 @@ enum ui_menu_reset_options
|
||||
// menu-related events
|
||||
struct ui_menu_event
|
||||
{
|
||||
void *itemref; // reference for the selected item
|
||||
ui_menu_item_type type; // item type (eventually will go away when itemref is proper ui_menu_item class rather than void*)
|
||||
int iptkey; // one of the IPT_* values from inptport.h
|
||||
unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
|
||||
render_bounds mouse; // mouse position if iptkey == IPT_CUSTOM
|
||||
void *itemref; // reference for the selected item
|
||||
ui_menu_item_type type; // item type (eventually will go away when itemref is proper ui_menu_item class rather than void*)
|
||||
int iptkey; // one of the IPT_* values from inptport.h
|
||||
unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
|
||||
render_bounds mouse; // mouse position if iptkey == IPT_CUSTOM
|
||||
};
|
||||
|
||||
struct ui_menu_pool
|
||||
|
@ -824,7 +824,7 @@ void ui_menu_machine_configure::custom_render(void *selectedref, float top, floa
|
||||
|
||||
// compute our bounds
|
||||
float x1 = 0.5f - 0.5f * maxwidth;
|
||||
// float x1 = origx1;
|
||||
// float x1 = origx1;
|
||||
float x2 = x1 + maxwidth;
|
||||
float y1 = origy1 - top;
|
||||
float y2 = origy1 - UI_BOX_TB_BORDER;
|
||||
|
@ -1023,10 +1023,10 @@ void ui_menu_select_game::inkey_select(const ui_menu_event *m_event)
|
||||
// special case for configure machine
|
||||
else if ((FPTR)driver == CONF_MACHINE)
|
||||
{
|
||||
if (m_prev_selected != nullptr)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_machine_configure>(ui(), container, (const game_driver *)m_prev_selected));
|
||||
else
|
||||
return;
|
||||
if (m_prev_selected != nullptr)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_machine_configure>(ui(), container, (const game_driver *)m_prev_selected));
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
// special case for configure plugins
|
||||
|
@ -142,21 +142,21 @@ void ui_menu_sliders::populate()
|
||||
std::vector<ui_menu_item> ui_sliders = ui().get_slider_list();
|
||||
for (ui_menu_item item : ui_sliders)
|
||||
{
|
||||
if (item.type == ui_menu_item_type::SLIDER)
|
||||
{
|
||||
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
|
||||
INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
|
||||
UINT32 flags = 0;
|
||||
if (curval > slider->minval)
|
||||
flags |= MENU_FLAG_LEFT_ARROW;
|
||||
if (curval < slider->maxval)
|
||||
flags |= MENU_FLAG_RIGHT_ARROW;
|
||||
item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
|
||||
}
|
||||
else
|
||||
{
|
||||
item_append(item);
|
||||
}
|
||||
if (item.type == ui_menu_item_type::SLIDER)
|
||||
{
|
||||
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
|
||||
INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
|
||||
UINT32 flags = 0;
|
||||
if (curval > slider->minval)
|
||||
flags |= MENU_FLAG_LEFT_ARROW;
|
||||
if (curval < slider->maxval)
|
||||
flags |= MENU_FLAG_RIGHT_ARROW;
|
||||
item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
|
||||
}
|
||||
else
|
||||
{
|
||||
item_append(item);
|
||||
}
|
||||
}
|
||||
|
||||
item_append(ui_menu_item_type::SEPARATOR);
|
||||
@ -165,21 +165,21 @@ void ui_menu_sliders::populate()
|
||||
std::vector<ui_menu_item> osd_sliders = machine().osd().get_slider_list();
|
||||
for (ui_menu_item item : osd_sliders)
|
||||
{
|
||||
if (item.type == ui_menu_item_type::SLIDER)
|
||||
{
|
||||
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
|
||||
INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
|
||||
UINT32 flags = 0;
|
||||
if (curval > slider->minval)
|
||||
flags |= MENU_FLAG_LEFT_ARROW;
|
||||
if (curval < slider->maxval)
|
||||
flags |= MENU_FLAG_RIGHT_ARROW;
|
||||
item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
|
||||
}
|
||||
else
|
||||
{
|
||||
item_append(item);
|
||||
}
|
||||
if (item.type == ui_menu_item_type::SLIDER)
|
||||
{
|
||||
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
|
||||
INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
|
||||
UINT32 flags = 0;
|
||||
if (curval > slider->minval)
|
||||
flags |= MENU_FLAG_LEFT_ARROW;
|
||||
if (curval < slider->maxval)
|
||||
flags |= MENU_FLAG_RIGHT_ARROW;
|
||||
item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
|
||||
}
|
||||
else
|
||||
{
|
||||
item_append(item);
|
||||
}
|
||||
}
|
||||
|
||||
custombottom = 2.0f * ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER;
|
||||
|
@ -153,8 +153,8 @@ static std::vector<ui_submenu::option> video_submenu_options = {
|
||||
};
|
||||
|
||||
//static std::vector<ui_submenu::option> export_submenu_options = {
|
||||
// { ui_submenu::COMMAND, __("Export XML format (like -listxml)"), "exportxml" },
|
||||
// { ui_submenu::COMMAND, __("Export TXT format (like -listfull)"), "exporttxt" },
|
||||
// { ui_submenu::COMMAND, __("Export XML format (like -listxml)"), "exportxml" },
|
||||
// { ui_submenu::COMMAND, __("Export TXT format (like -listfull)"), "exporttxt" },
|
||||
//};
|
||||
|
||||
#endif /* __UI_SUBMENU_H__ */
|
||||
|
@ -250,17 +250,17 @@ static const UINT32 mouse_bitmap[32*32] =
|
||||
|
||||
mame_ui_manager::mame_ui_manager(running_machine &machine)
|
||||
: ui_manager(machine),
|
||||
m_font(nullptr),
|
||||
m_handler_callback(nullptr),
|
||||
m_handler_param(0),
|
||||
m_single_step(false),
|
||||
m_showfps(false),
|
||||
m_showfps_end(0),
|
||||
m_show_profiler(false),
|
||||
m_popup_text_end(0),
|
||||
m_mouse_arrow_texture(nullptr),
|
||||
m_mouse_show(false),
|
||||
m_load_save_hold(false)
|
||||
m_font(nullptr),
|
||||
m_handler_callback(nullptr),
|
||||
m_handler_param(0),
|
||||
m_single_step(false),
|
||||
m_showfps(false),
|
||||
m_showfps_end(0),
|
||||
m_show_profiler(false),
|
||||
m_popup_text_end(0),
|
||||
m_mouse_arrow_texture(nullptr),
|
||||
m_mouse_show(false),
|
||||
m_load_save_hold(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -2051,17 +2051,17 @@ std::vector<ui_menu_item> mame_ui_manager::slider_init(running_machine &machine)
|
||||
}
|
||||
#endif
|
||||
|
||||
std::vector<ui_menu_item> items;
|
||||
for (slider_state *slider : sliders)
|
||||
{
|
||||
ui_menu_item item;
|
||||
item.text = slider->description;
|
||||
item.subtext = "";
|
||||
item.flags = 0;
|
||||
item.ref = slider;
|
||||
item.type = ui_menu_item_type::SLIDER;
|
||||
items.push_back(item);
|
||||
}
|
||||
std::vector<ui_menu_item> items;
|
||||
for (slider_state *slider : sliders)
|
||||
{
|
||||
ui_menu_item item;
|
||||
item.text = slider->description;
|
||||
item.subtext = "";
|
||||
item.flags = 0;
|
||||
item.ref = slider;
|
||||
item.type = ui_menu_item_type::SLIDER;
|
||||
items.push_back(item);
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ public:
|
||||
std::string &game_info_astring(std::string &str);
|
||||
|
||||
// slider controls
|
||||
std::vector<ui_menu_item>& get_slider_list(void);
|
||||
std::vector<ui_menu_item>& get_slider_list(void);
|
||||
|
||||
// other
|
||||
void process_natural_keyboard();
|
||||
|
@ -30,7 +30,7 @@ NETLIST_START(TTL_7416_DIP)
|
||||
s3.A, /* A3 |5 10| Y5 */ s5.Q,
|
||||
s3.Q, /* Y3 |6 9| A4 */ s4.A,
|
||||
GND.I, /* GND |7 8| Y4 */ s4.Q
|
||||
/* +--------------+ */
|
||||
/* +--------------+ */
|
||||
)
|
||||
NETLIST_END()
|
||||
|
||||
@ -69,7 +69,7 @@ NETLIST_START(TTL_7400_DIP)
|
||||
s2.B, /* B2 |5 10| B3 */ s3.B,
|
||||
s2.Q, /* Y2 |6 9| A3 */ s3.A,
|
||||
GND.I, /* GND |7 8| Y3 */ s3.Q
|
||||
/* +--------------+ */
|
||||
/* +--------------+ */
|
||||
)
|
||||
NETLIST_END()
|
||||
|
||||
|
@ -1301,7 +1301,7 @@ protected:
|
||||
pstring m_name;
|
||||
setup_t *m_setup;
|
||||
plog_base<NL_DEBUG> m_log;
|
||||
pdynlib *m_lib; // external lib needs to be loaded as long as netlist exists
|
||||
pdynlib *m_lib; // external lib needs to be loaded as long as netlist exists
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -28,18 +28,18 @@ public:
|
||||
static const pstring buildpath(std::initializer_list<pstring> list )
|
||||
{
|
||||
pstring ret = "";
|
||||
for( auto elem : list )
|
||||
{
|
||||
if (ret == "")
|
||||
ret = elem;
|
||||
else
|
||||
for( auto elem : list )
|
||||
{
|
||||
if (ret == "")
|
||||
ret = elem;
|
||||
else
|
||||
#ifdef _WIN32
|
||||
ret = ret + '\\' + elem;
|
||||
ret = ret + '\\' + elem;
|
||||
#else
|
||||
ret = ret + '/' + elem;
|
||||
ret = ret + '/' + elem;
|
||||
#endif
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const pstring environment(const pstring &var, const pstring &default_val = "")
|
||||
|
@ -24,7 +24,7 @@ pdynlib::pdynlib(const pstring libname)
|
||||
if (m_lib != nullptr)
|
||||
m_isLoaded = true;
|
||||
//else
|
||||
// fprintf(stderr, "win: library <%s> not found!\n", libname.cstr());
|
||||
// fprintf(stderr, "win: library <%s> not found!\n", libname.cstr());
|
||||
#else
|
||||
//printf("loading <%s>\n", libname.cstr());
|
||||
if (libname != "")
|
||||
@ -34,7 +34,7 @@ pdynlib::pdynlib(const pstring libname)
|
||||
if (m_lib != nullptr)
|
||||
m_isLoaded = true;
|
||||
//else
|
||||
// printf("library <%s> not found!\n", libname.cstr());
|
||||
// printf("library <%s> not found!\n", libname.cstr());
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -88,4 +88,3 @@ void *pdynlib::getsym_p(const pstring name)
|
||||
return dlsym(m_lib, name.cstr());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ struct ti_t
|
||||
volatile std::atomic<int> lo;
|
||||
thr_intf *intf;
|
||||
void *params;
|
||||
// int _block[29]; /* make it 256 bytes */
|
||||
// int _block[29]; /* make it 256 bytes */
|
||||
};
|
||||
|
||||
static ti_t ti[MAXTHR];
|
||||
@ -287,7 +287,7 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
|
||||
#else
|
||||
vec_add_mult_scalar(kN-i-1,pj,f1,pi);
|
||||
//for (unsigned k = i+1; k < kN; k++)
|
||||
// pj[k] = pj[k] + pi[k] * f1;
|
||||
// pj[k] = pj[k] + pi[k] * f1;
|
||||
//for (unsigned k = i+1; k < kN; k++)
|
||||
//A(j,k) += A(i,k) * f1;
|
||||
RHS(j) += RHS(i) * f1;
|
||||
|
@ -13,9 +13,9 @@
|
||||
* In this specific implementation, u is a unit vector specifying the row which
|
||||
* changed. Thus v contains the changed column.
|
||||
*
|
||||
* Than z = A⁻¹ u , w = transpose(A⁻¹) v , lambda = v z
|
||||
* Than z = A^-1 u , w = transpose(A^-1) v , lambda = v z
|
||||
*
|
||||
* A⁻¹ <- 1.0 / (1.0 + lambda) * (z x w)
|
||||
* A^-1 <- 1.0 / (1.0 + lambda) * (z x w)
|
||||
*
|
||||
* The approach is iterative and applied for each row changed.
|
||||
*
|
||||
|
@ -23,7 +23,6 @@ NETLIB_NAMESPACE_DEVICES_START()
|
||||
template <unsigned m_N, unsigned _storage_N>
|
||||
class matrix_solver_SOR_mat_t: public matrix_solver_direct_t<m_N, _storage_N>
|
||||
{
|
||||
|
||||
friend class matrix_solver_t;
|
||||
|
||||
public:
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Whilst the book proposes to invert the matrix R=(I+transpose(V)*Z) we define
|
||||
*
|
||||
* w = transpose(V)*y
|
||||
* a = R⁻¹ * w
|
||||
* a = R^-1 * w
|
||||
*
|
||||
* and consequently
|
||||
*
|
||||
|
@ -180,7 +180,7 @@ ATTR_COLD void matrix_solver_t::setup_base(analog_net_t::list_t &nets)
|
||||
if (net_proxy_output == nullptr)
|
||||
{
|
||||
//net_proxy_output = palloc(analog_output_t(*this,
|
||||
// this->name() + "." + pfmt("m{1}")(m_inps.size())));
|
||||
// this->name() + "." + pfmt("m{1}")(m_inps.size())));
|
||||
|
||||
net_proxy_output = palloc(analog_output_t);
|
||||
net_proxy_output->init_object(*this, this->name() + "." + pfmt("m{1}")(m_inps.size()));
|
||||
|
@ -277,18 +277,18 @@ FLAC__StreamEncoderWriteStatus flac_encoder::write_callback(const FLAC__byte buf
|
||||
|
||||
flac_decoder::flac_decoder()
|
||||
: m_decoder(FLAC__stream_decoder_new()),
|
||||
m_file(nullptr),
|
||||
m_sample_rate(0),
|
||||
m_channels(0),
|
||||
m_bits_per_sample(0),
|
||||
m_compressed_offset(0),
|
||||
m_compressed_start(nullptr),
|
||||
m_compressed_length(0),
|
||||
m_compressed2_start(nullptr),
|
||||
m_compressed2_length(0),
|
||||
m_uncompressed_offset(0),
|
||||
m_uncompressed_length(0),
|
||||
m_uncompressed_swap(false)
|
||||
m_file(nullptr),
|
||||
m_sample_rate(0),
|
||||
m_channels(0),
|
||||
m_bits_per_sample(0),
|
||||
m_compressed_offset(0),
|
||||
m_compressed_start(nullptr),
|
||||
m_compressed_length(0),
|
||||
m_compressed2_start(nullptr),
|
||||
m_compressed2_length(0),
|
||||
m_uncompressed_offset(0),
|
||||
m_uncompressed_length(0),
|
||||
m_uncompressed_swap(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -516,6 +516,7 @@ igspoker.cpp
|
||||
ikki.cpp
|
||||
imolagp.cpp
|
||||
inder.cpp
|
||||
instantm.cpp
|
||||
intrscti.cpp
|
||||
inufuku.cpp
|
||||
invqix.cpp
|
||||
|
@ -438,7 +438,7 @@ UINT32 napple2_state::screen_update_jp(screen_device &screen, bitmap_ind16 &bitm
|
||||
if (m_video->m_mix)
|
||||
{
|
||||
m_video->hgr_update(screen, bitmap, cliprect, 0, 159);
|
||||
m_video->text_update_jplus(screen, bitmap, cliprect, 160, 191);
|
||||
m_video->text_update_jplus(screen, bitmap, cliprect, 160, 191);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2437,8 +2437,8 @@ static ADDRESS_MAP_START( lcbank_map, AS_PROGRAM, 8, apple2e_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( spectred_keyb_map, AS_PROGRAM, 8, apple2e_state )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_ROM
|
||||
AM_RANGE(0x0800, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x0000, 0x07ff) AM_ROM
|
||||
AM_RANGE(0x0800, 0x0fff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/***************************************************************************
|
||||
@ -3373,8 +3373,8 @@ static MACHINE_CONFIG_DERIVED( spectred, apple2e )
|
||||
MCFG_CPU_ADD("keyb_mcu", I8035, XTAL_4MHz) /* guessed frequency */
|
||||
MCFG_CPU_PROGRAM_MAP(spectred_keyb_map)
|
||||
|
||||
//TODO: implement the actual interfacing to this 8035 MCU and
|
||||
// and then remove the keyb CPU inherited from apple2e
|
||||
//TODO: implement the actual interfacing to this 8035 MCU and
|
||||
// and then remove the keyb CPU inherited from apple2e
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( tk3000, apple2e )
|
||||
@ -3646,17 +3646,17 @@ ROM_END
|
||||
|
||||
|
||||
ROM_START(spectred)
|
||||
ROM_REGION(0x8000,"gfx1",0)
|
||||
ROM_LOAD ( "spm-c_ed_06-08-85.u6", 0x0000, 0x8000, CRC(a1b9ffe4) SHA1(3cb281f19f91372e24685792b7bff778944f99ed) )
|
||||
ROM_REGION(0x8000,"gfx1",0)
|
||||
ROM_LOAD ( "spm-c_ed_06-08-85.u6", 0x0000, 0x8000, CRC(a1b9ffe4) SHA1(3cb281f19f91372e24685792b7bff778944f99ed) )
|
||||
|
||||
ROM_REGION(0x8000,"maincpu",0)
|
||||
ROM_LOAD ( "spm-c_ed_50-09-86.u50.H", 0x0000, 0x4000, CRC(1fccaf24) SHA1(1de1438ee8789f83cbc97f75c0485d1fd0f58a38))
|
||||
ROM_LOAD ( "spm-c_ed_51-09-86.u51.H", 0x4000, 0x4000, CRC(fae8d36c) SHA1(69bed61513482ccb578b89c2fb8e7ba2258e82a5))
|
||||
ROM_REGION(0x8000,"maincpu",0)
|
||||
ROM_LOAD ( "spm-c_ed_50-09-86.u50.H", 0x0000, 0x4000, CRC(1fccaf24) SHA1(1de1438ee8789f83cbc97f75c0485d1fd0f58a38))
|
||||
ROM_LOAD ( "spm-c_ed_51-09-86.u51.H", 0x4000, 0x4000, CRC(fae8d36c) SHA1(69bed61513482ccb578b89c2fb8e7ba2258e82a5))
|
||||
|
||||
ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
|
||||
ROM_LOAD( "342-0132-c.e12", 0x000, 0x800, BAD_DUMP CRC(e47045f4) SHA1(12a2e718f5f4acd69b6c33a45a4a940b1440a481) ) // copied from apple2e
|
||||
ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
|
||||
ROM_LOAD( "342-0132-c.e12", 0x000, 0x800, BAD_DUMP CRC(e47045f4) SHA1(12a2e718f5f4acd69b6c33a45a4a940b1440a481) ) // copied from apple2e
|
||||
|
||||
ROM_REGION(0x1000, "keyb_mcu", 0)
|
||||
ROM_REGION(0x1000, "keyb_mcu", 0)
|
||||
ROM_LOAD( "167_8980.u5", 0x0000, 0x1000, CRC(a501f197) SHA1(136c2b562999a6e340fe0e9a3776cea8c2e3647e) )
|
||||
ROM_END
|
||||
|
||||
|
@ -266,7 +266,7 @@ MACHINE_CONFIG_END
|
||||
ROM_LOAD32_WORD_BIOS( 7, "System 04 Eprom Set -1MB-M27V800 Right", 0x0000000, 0x0100000, CRC(3daefb7a) SHA1(411471713219f4bab5ccf5fe7a12a6c138c8c550) ) \
|
||||
ROM_SYSTEM_BIOS( 8, "bios8", "Aristocrat MK6 Base (05010601)" ) \
|
||||
ROM_LOAD32_WORD_BIOS( 8, "05010601_SYSTEM_EPROM_NSW_LEFT", 0x0000000, 0x0100000, CRC(b3e6b4a0) SHA1(3bf398c9257579f8e51ce716d6ebfa74fa510273) ) /* From Thai Princess & Venetian Nights */ \
|
||||
ROM_LOAD32_WORD_BIOS( 8, "05010601_SYSTEM_EPROM_NSW_RIGHT", 0x0000000, 0x0100000, CRC(c12eac11) SHA1(683b9ddc323865ace7dca37d13b55de6e42759a5) ) \
|
||||
ROM_LOAD32_WORD_BIOS( 8, "05010601_SYSTEM_EPROM_NSW_RIGHT", 0x0000000, 0x0100000, CRC(c12eac11) SHA1(683b9ddc323865ace7dca37d13b55de6e42759a5) ) \
|
||||
ROM_SYSTEM_BIOS( 9, "bios9", "Aristocrat MK6 Base (13012001)" ) \
|
||||
ROM_LOAD32_WORD_BIOS( 9, "System 13012001_left", 0x0000000, 0x0400000, CRC(d346773f) SHA1(baa9103478fd667eecd13064cfa051a06763c6ca) ) /* From Queen of the Nile */ \
|
||||
ROM_LOAD32_WORD_BIOS( 9, "System 13012001_right", 0x0000000, 0x0400000, CRC(4c8bfa18) SHA1(cac4932a5b19ed8c2798693ac387cc1a6f0201c7) ) \
|
||||
@ -3427,6 +3427,3 @@ Sweet Hearts II
|
||||
Venetian Nights MK5 version is possibly rare
|
||||
Wicked Winnings Only seen a Cash Express Hyperlink version so far, not to be confused with the more common 'Wicked Winnings II - Power Pay'
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
// copyright-holders:Tomasz Slanina
|
||||
/***************************************************************************
|
||||
|
||||
"Attack UFO" © 1980 Ryoto Electric Co.
|
||||
"Attack UFO" (c) 1980 Ryoto Electric Co.
|
||||
|
||||
TODO:
|
||||
- Verify I/O chip
|
||||
- Is game speed ok? A bit slow sometimes
|
||||
TODO:
|
||||
- Verify I/O chip
|
||||
- Is game speed ok? A bit slow sometimes
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
@ -2402,4 +2402,3 @@ GAME( 1986, shrike, 0, shrike, shrike, balsente_state, shrike, RO
|
||||
GAME( 1987, rescraida,rescraid, balsente, rescraid, balsente_state, rescraid, ROT0, "Bally Midway", "Rescue Raider (stand-alone)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 198?, grudge, 0, balsente, grudge, balsente_state, grudge, ROT0, "Bally Midway", "Grudge Match (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1985, teamht, 0, balsente, teamht, balsente_state, teamht, ROT0, "Bally/Sente", "Team Hat Trick", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
|
@ -2468,8 +2468,6 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(cclimber_state,yamato)
|
||||
{
|
||||
|
||||
|
||||
save_item(NAME(m_yamato_p0));
|
||||
save_item(NAME(m_yamato_p1));
|
||||
}
|
||||
|
@ -1134,7 +1134,7 @@ static MACHINE_CONFIG_DERIVED_CLASS(chihiro_base, xbox_base, chihiro_state)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED(chihirogd, chihiro_base)
|
||||
MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", "gdrom", "pic", nullptr, NOOP)
|
||||
MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", "^pic", nullptr, NOOP)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
|
||||
|
@ -12340,4 +12340,3 @@ CONS( 1995, sfach, sfzch, 0, cps1_12MHz, sfzch, cps_state, cps1, "Capc
|
||||
CONS( 1995, sfzbch, sfzch, 0, cps1_12MHz, sfzch, cps_state, cps1, "Capcom", "Street Fighter Zero (CPS Changer, Brazil 950727)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
// Ken Sei Mogura: Street Fighter II - see kenseim.c
|
||||
|
||||
|
@ -80,28 +80,28 @@ Stephh's notes (based on the game Z80 code and some tests) :
|
||||
|
||||
/*
|
||||
|
||||
Custom SIMM module placement
|
||||
Custom SIMM module placement
|
||||
|
||||
The Air Raid PCB has 3 custom modules shown
|
||||
in the rough diagram of the PCB below.
|
||||
The Air Raid PCB has 3 custom modules shown
|
||||
in the rough diagram of the PCB below.
|
||||
|
||||
The modules do not appear to be 100%
|
||||
identical based on external shapes visible.
|
||||
The modules do not appear to be 100%
|
||||
identical based on external shapes visible.
|
||||
|
||||
The data they contain is as follows
|
||||
MODULE1
|
||||
Background tilemap graphic data
|
||||
Background tilemap layout data
|
||||
The data they contain is as follows
|
||||
MODULE1
|
||||
Background tilemap graphic data
|
||||
Background tilemap layout data
|
||||
|
||||
MODULE2
|
||||
Foreground tilemap graphic data
|
||||
Foreground tilemap layout data
|
||||
MODULE2
|
||||
Foreground tilemap graphic data
|
||||
Foreground tilemap layout data
|
||||
|
||||
MODULE3
|
||||
Sprite graphic data
|
||||
MODULE3
|
||||
Sprite graphic data
|
||||
|
||||
it's also possible each module contains a
|
||||
0x100 colour look up table for that layer.
|
||||
it's also possible each module contains a
|
||||
0x100 colour look up table for that layer.
|
||||
|
||||
|
||||
|-------------------------------------------------|
|
||||
@ -267,12 +267,11 @@ WRITE8_MEMBER(cshooter_state::cshooter_txram_w)
|
||||
|
||||
void cshooter_state::video_start()
|
||||
{
|
||||
|
||||
// there might actually be 4 banks of 2048 x 16 tilemaps in here as the upper scroll bits are with the rom banking.
|
||||
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::bg_scan),this),16,16,2048, 64);
|
||||
|
||||
// which could in turn mean this is actually 256 x 128, not 256 x 512
|
||||
// m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::fg_scan),this),16,16,256, 512);
|
||||
// m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::fg_scan),this),16,16,256, 512);
|
||||
m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::fg_scan),this),16,16,256, 128);
|
||||
|
||||
m_fg_tilemap->set_transparent_pen(0);
|
||||
@ -304,7 +303,6 @@ void cshooter_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
|
||||
UINT32 cshooter_state::screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
|
||||
UINT16 bgscrolly = DM_GETSCROLL(0x6);
|
||||
// this is more likely to be 'bank' than scroll, like NMK16
|
||||
bgscrolly += ((m_hw & 0xc0) >> 6) * 256;
|
||||
@ -382,7 +380,7 @@ WRITE8_MEMBER(cshooter_state::bank_w)
|
||||
// f = fg layer disable
|
||||
// s = sprite layer enable
|
||||
|
||||
// printf("bankw %02x\n", data & 0xc0);
|
||||
// printf("bankw %02x\n", data & 0xc0);
|
||||
|
||||
m_hw = data;
|
||||
|
||||
@ -419,18 +417,18 @@ static ADDRESS_MAP_START( airraid_map, AS_PROGRAM, 8, cshooter_state )
|
||||
AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xc500, 0xc500) AM_WRITE(cshooter_c500_w)
|
||||
// AM_RANGE(0xc600, 0xc600) AM_WRITE(cshooter_c600_w) // see notes
|
||||
// AM_RANGE(0xc600, 0xc600) AM_WRITE(cshooter_c600_w) // see notes
|
||||
AM_RANGE(0xc700, 0xc700) AM_WRITE(cshooter_c700_w)
|
||||
// AM_RANGE(0xc801, 0xc801) AM_WRITE(cshooter_c801_w) // see notes
|
||||
// AM_RANGE(0xc801, 0xc801) AM_WRITE(cshooter_c801_w) // see notes
|
||||
AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_txram_w) AM_SHARE("txram")
|
||||
AM_RANGE(0xd800, 0xd8ff) AM_RAM AM_SHARE("paletteram")
|
||||
AM_RANGE(0xda00, 0xdaff) AM_RAM AM_SHARE("paletteram2")
|
||||
AM_RANGE(0xdc11, 0xdc11) AM_WRITE(bank_w)
|
||||
AM_RANGE(0xdc00, 0xdc0f) AM_RAM_WRITE(vregs_w) AM_SHARE("vregs")
|
||||
// AM_RANGE(0xdc10, 0xdc10) AM_RAM
|
||||
// AM_RANGE(0xdc19, 0xdc19) AM_RAM
|
||||
// AM_RANGE(0xdc1e, 0xdc1e) AM_RAM
|
||||
// AM_RANGE(0xdc1f, 0xdc1f) AM_RAM
|
||||
// AM_RANGE(0xdc10, 0xdc10) AM_RAM
|
||||
// AM_RANGE(0xdc19, 0xdc19) AM_RAM
|
||||
// AM_RANGE(0xdc1e, 0xdc1e) AM_RAM
|
||||
// AM_RANGE(0xdc1f, 0xdc1f) AM_RAM
|
||||
|
||||
AM_RANGE(0xde00, 0xde0f) AM_READWRITE(seibu_sound_comms_r,seibu_sound_comms_w)
|
||||
AM_RANGE(0xe000, 0xfdff) AM_RAM AM_SHARE("mainram")
|
||||
|
@ -19,10 +19,10 @@
|
||||
Snow Board | 1996 | CG-1V 366 | 960419/1 | Lattice IspLSI 1016-80LJ
|
||||
Bang! | 1998 | CG-1V 388 | 980921/1 | No
|
||||
|
||||
Notes:
|
||||
touchgok:
|
||||
sounds cut out sometimes, others are often missing (sound status reads as busy,
|
||||
so no attempt made to play new sound) probably bug in devices\sound\gaelco.cpp ??
|
||||
Notes:
|
||||
touchgok:
|
||||
sounds cut out sometimes, others are often missing (sound status reads as busy,
|
||||
so no attempt made to play new sound) probably bug in devices\sound\gaelco.cpp ??
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
@ -545,7 +545,7 @@ ROM_END
|
||||
2x DS1230Y-100 (u4, u5) not dumped.
|
||||
|
||||
PLDs:
|
||||
1x A40MX04-PL84 (u29) read protected.
|
||||
1x A40MX04-PL84 (u29) read protected.
|
||||
|
||||
Others:
|
||||
1x 28x2 JAMMA edge connector.
|
||||
|
@ -418,10 +418,10 @@ void hp9845b_state::video_render_buff(unsigned line_in_row, bool buff_idx)
|
||||
const rgb_t *palette = m_palette->palette()->entry_list_raw();
|
||||
|
||||
if (m_video_blanked) {
|
||||
// Blank scanline
|
||||
for (unsigned i = 0; i < (80 * 9); i++) {
|
||||
m_bitmap.pix32(m_video_scanline , i) = palette[ 0 ];
|
||||
}
|
||||
// Blank scanline
|
||||
for (unsigned i = 0; i < (80 * 9); i++) {
|
||||
m_bitmap.pix32(m_video_scanline , i) = palette[ 0 ];
|
||||
}
|
||||
} else {
|
||||
bool cursor_line = line_in_row == 12;
|
||||
bool ul_line = line_in_row == 14;
|
||||
@ -718,15 +718,15 @@ static MACHINE_CONFIG_START( hp9845b, hp9845b_state )
|
||||
MCFG_TACO_FLG_HANDLER(WRITELINE(hp9845b_state , t15_flg_w))
|
||||
MCFG_TACO_STS_HANDLER(WRITELINE(hp9845b_state , t15_sts_w))
|
||||
|
||||
// In real machine there were 8 slots for LPU ROMs and 8 slots for PPU ROMs in
|
||||
// right-hand side and left-hand side drawers, respectively.
|
||||
// Here we do away with the distinction between LPU & PPU ROMs: in the end they
|
||||
// are visible to both CPUs at the same addresses.
|
||||
// For now we define just a couple of slots..
|
||||
MCFG_DEVICE_ADD("drawer1", HP_OPTROM_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(hp_optrom_slot_device, NULL, false)
|
||||
MCFG_DEVICE_ADD("drawer2", HP_OPTROM_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(hp_optrom_slot_device, NULL, false)
|
||||
// In real machine there were 8 slots for LPU ROMs and 8 slots for PPU ROMs in
|
||||
// right-hand side and left-hand side drawers, respectively.
|
||||
// Here we do away with the distinction between LPU & PPU ROMs: in the end they
|
||||
// are visible to both CPUs at the same addresses.
|
||||
// For now we define just a couple of slots..
|
||||
MCFG_DEVICE_ADD("drawer1", HP_OPTROM_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(hp_optrom_slot_device, NULL, false)
|
||||
MCFG_DEVICE_ADD("drawer2", HP_OPTROM_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(hp_optrom_slot_device, NULL, false)
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("optrom_list", "hp9845b_rom")
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -725,7 +725,7 @@ static const gfx_layout layout_8x8x6 =
|
||||
8, 8,
|
||||
RGN_FRAC(1, 3),
|
||||
6,
|
||||
{ RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
|
||||
{ RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
|
||||
RGN_FRAC(1,3)+8,RGN_FRAC(1,3)+0,
|
||||
RGN_FRAC(2,3)+8,RGN_FRAC(2,3)+0 },
|
||||
{ STEP8(0,1) },
|
||||
@ -738,7 +738,7 @@ static const gfx_layout layout_8x32x6 =
|
||||
8, 32,
|
||||
RGN_FRAC(1, 3),
|
||||
6,
|
||||
{ RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
|
||||
{ RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
|
||||
RGN_FRAC(1,3)+8,RGN_FRAC(1,3)+0,
|
||||
RGN_FRAC(2,3)+8,RGN_FRAC(2,3)+0 },
|
||||
{ STEP8(0,1) },
|
||||
@ -794,9 +794,9 @@ void igs009_state::machine_start()
|
||||
|
||||
void igs009_state::machine_reset()
|
||||
{
|
||||
m_nmi_enable = 0;
|
||||
m_hopper = 0;
|
||||
m_video_enable = 1;
|
||||
m_nmi_enable = 0;
|
||||
m_hopper = 0;
|
||||
m_video_enable = 1;
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(igs009_state::interrupt)
|
||||
@ -1159,7 +1159,7 @@ ROM_END
|
||||
|
||||
/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
|
||||
GAME( 1997, jingbell, 0, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (US, V157US)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1997, jingbella, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V155UE)", MACHINE_SUPPORTS_SAVE ) // Shows V154UE in test mode!
|
||||
GAME( 1997, jingbella, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V155UE)", MACHINE_SUPPORTS_SAVE ) // Shows V154UE in test mode!
|
||||
GAME( 1997, jingbellb, jingbell, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (EU, V153UE)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1995, jingbellc, jingbell, jingbell, jingbell, igs009_state, jingbelli, ROT0, "IGS", "Jingle Bell (EU, V141UE)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1995?, jingbelli, jingbell, jingbell, jingbell, igs009_state, jingbelli, ROT0, "IGS", "Jingle Bell (Italy, V133I)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -471,8 +471,8 @@ static MACHINE_CONFIG_START( intv, intv_state )
|
||||
MCFG_PALETTE_INDIRECT_ENTRIES(32)
|
||||
MCFG_PALETTE_INIT_OWNER(intv_state, intv)
|
||||
|
||||
MCFG_INTV_CONTROL_PORT_ADD("iopt_right_ctrl", intv_control_port_devices, "handctrl")
|
||||
MCFG_INTV_CONTROL_PORT_ADD("iopt_left_ctrl", intv_control_port_devices, "handctrl")
|
||||
MCFG_INTV_CONTROL_PORT_ADD("iopt_right_ctrl", intv_control_port_devices, "handctrl")
|
||||
MCFG_INTV_CONTROL_PORT_ADD("iopt_left_ctrl", intv_control_port_devices, "handctrl")
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -499,7 +499,7 @@ static MACHINE_CONFIG_START( jongkyo, jongkyo_state )
|
||||
MCFG_SEGACRPT_SET_SIZE(0x6c00)
|
||||
MCFG_SEGACRPT_SET_NUMBANKS(8)
|
||||
MCFG_SEGACRPT_SET_BANKSIZE(0x400)
|
||||
// sega_decode(rom, opcodes, 0x6c00, convtable, 8, 0x400);
|
||||
// sega_decode(rom, opcodes, 0x6c00, convtable, 8, 0x400);
|
||||
|
||||
|
||||
/* video hardware */
|
||||
@ -557,7 +557,6 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(jongkyo_state,jongkyo)
|
||||
{
|
||||
|
||||
UINT8 *rom = memregion("maincpu")->base();
|
||||
|
||||
/* first of all, do a simple bitswap */
|
||||
@ -595,5 +594,3 @@ DRIVER_INIT_MEMBER(jongkyo_state,jongkyo)
|
||||
*************************************/
|
||||
|
||||
GAME( 1985, jongkyo, 0, jongkyo, jongkyo, jongkyo_state, jongkyo, ROT0, "Kiwako", "Jongkyo", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
|
||||
|
@ -4,24 +4,24 @@
|
||||
/*
|
||||
|
||||
CPUs
|
||||
QTY Type clock position function
|
||||
1x MC68HC000FN10 u3 16/32-bit Microprocessor - main
|
||||
1x u6295 u98 4-Channel Mixing ADCPM Voice Synthesis LSI - sound
|
||||
1x HA17358 u101 Dual Operational Amplifier - sound
|
||||
1x TDA2003 u104 Audio Amplifier - sound
|
||||
1x oscillator 12.000MHz osc1
|
||||
QTY Type clock position function
|
||||
1x MC68HC000FN10 u3 16/32-bit Microprocessor - main
|
||||
1x u6295 u98 4-Channel Mixing ADCPM Voice Synthesis LSI - sound
|
||||
1x HA17358 u101 Dual Operational Amplifier - sound
|
||||
1x TDA2003 u104 Audio Amplifier - sound
|
||||
1x oscillator 12.000MHz osc1
|
||||
ROMs
|
||||
QTY Type position status
|
||||
2x M27C1001 2,3 dumped
|
||||
1x M27C2001 1 dumped
|
||||
3x M27C4001 4,5,6 dumped
|
||||
QTY Type position status
|
||||
2x M27C1001 2,3 dumped
|
||||
1x M27C2001 1 dumped
|
||||
3x M27C4001 4,5,6 dumped
|
||||
RAMs
|
||||
QTY Type position
|
||||
11x LH52B256-10PLL u16a,u17a,u27,u28,u29,u30,u39,u40,u74,u75,u76
|
||||
QTY Type position
|
||||
11x LH52B256-10PLL u16a,u17a,u27,u28,u29,u30,u39,u40,u74,u75,u76
|
||||
PLDs
|
||||
QTY Type position status
|
||||
1x ATF20V8B-15PC u37 read protected
|
||||
2x A40MX04-F-PL84 u83,u86 read protected
|
||||
QTY Type position status
|
||||
1x ATF20V8B-15PC u37 read protected
|
||||
2x A40MX04-F-PL84 u83,u86 read protected
|
||||
Others
|
||||
|
||||
1x 28x2 JAMMA edge connector
|
||||
@ -95,9 +95,9 @@ static const gfx_layout jungleyo16_layout =
|
||||
{ 0,1,2,3,4,5,6,7 },
|
||||
{ 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 },
|
||||
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
|
||||
8*64, 9*64,10*64,11*64,12*64,13*64,14*64,15*64,
|
||||
16*64,17*64,18*64,19*64,20*64,21*64,22*64,23*64,
|
||||
24*64,25*64,26*64,27*64,28*64,29*64,30*64,31*64 },
|
||||
8*64, 9*64,10*64,11*64,12*64,13*64,14*64,15*64,
|
||||
16*64,17*64,18*64,19*64,20*64,21*64,22*64,23*64,
|
||||
24*64,25*64,26*64,27*64,28*64,29*64,30*64,31*64 },
|
||||
8*64*4
|
||||
};
|
||||
|
||||
|
@ -2754,18 +2754,18 @@ static INPUT_PORTS_START( hyperbbc )
|
||||
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER( 3 )
|
||||
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_START3 )
|
||||
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER( 3 )
|
||||
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_MODIFY( "IN3" )
|
||||
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_MODIFY( "IN3" )
|
||||
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( hypbbc2p )
|
||||
|
@ -1746,5 +1746,3 @@ GAME( 1987, buraikenb, avengers, avengersb,avengers, lwings_state, avengersb, RO
|
||||
|
||||
// cloned lwings hardware
|
||||
GAME( 1992, fball, 0, fball, fball, driver_device, 0, ROT0, "FM Work", "Fire Ball (FM Work)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
|
||||
|
@ -70,8 +70,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_ram2(*this, "ram2"),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_cart1(*this, "slot_a"),
|
||||
m_cart2(*this, "slot_b")
|
||||
m_cart1(*this, "slot_a"),
|
||||
m_cart2(*this, "slot_b")
|
||||
{ }
|
||||
|
||||
UINT8 m_mux_data;
|
||||
@ -87,13 +87,13 @@ public:
|
||||
DECLARE_DRIVER_INIT(kisekaem);
|
||||
DECLARE_DRIVER_INIT(macs2);
|
||||
DECLARE_MACHINE_RESET(macs);
|
||||
DECLARE_MACHINE_START(macs);
|
||||
DECLARE_MACHINE_START(macs);
|
||||
|
||||
UINT32 screen_update_macs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
optional_device<st0016_cpu_device> m_maincpu;
|
||||
optional_device<generic_slot_device> m_cart1;
|
||||
optional_device<generic_slot_device> m_cart2;
|
||||
optional_device<generic_slot_device> m_cart1;
|
||||
optional_device<generic_slot_device> m_cart2;
|
||||
|
||||
};
|
||||
|
||||
@ -115,7 +115,7 @@ ADDRESS_MAP_END
|
||||
|
||||
WRITE8_MEMBER(macs_state::rambank_w)
|
||||
{
|
||||
membank("bank3")->set_entry(2 + (data & 1));
|
||||
membank("bank3")->set_entry(2 + (data & 1));
|
||||
}
|
||||
|
||||
READ8_MEMBER(macs_state::macs_input_r)
|
||||
@ -153,12 +153,12 @@ READ8_MEMBER(macs_state::macs_input_r)
|
||||
|
||||
WRITE8_MEMBER(macs_state::macs_rom_bank_w)
|
||||
{
|
||||
membank("bank1")->set_entry(macs_cart_slot * 0x100 + data);
|
||||
membank("bank1")->set_entry(macs_cart_slot * 0x100 + data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(macs_state::macs_output_w)
|
||||
{
|
||||
switch(offset)
|
||||
switch(offset)
|
||||
{
|
||||
case 0:
|
||||
/*
|
||||
@ -169,13 +169,13 @@ WRITE8_MEMBER(macs_state::macs_output_w)
|
||||
|
||||
if(m_rev == 1)
|
||||
{
|
||||
/* FIXME: dunno if this RAM bank is right, DASM tracking made on the POST
|
||||
screens indicates that there's just one RAM bank, but then MACS2 games
|
||||
locks up. */
|
||||
membank("bank3")->set_entry(BIT(data, 5));
|
||||
/* FIXME: dunno if this RAM bank is right, DASM tracking made on the POST
|
||||
screens indicates that there's just one RAM bank, but then MACS2 games
|
||||
locks up. */
|
||||
membank("bank3")->set_entry(BIT(data, 5));
|
||||
|
||||
macs_cart_slot = (data & 0xc) >> 2;
|
||||
membank("bank4")->set_entry(macs_cart_slot * 0x100);
|
||||
membank("bank4")->set_entry(macs_cart_slot * 0x100);
|
||||
}
|
||||
|
||||
membank("bank2")->set_entry(BIT(data, 5));
|
||||
@ -492,7 +492,7 @@ static MACHINE_CONFIG_START( macs, macs_state )
|
||||
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", macs_state, irq0_line_hold)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(macs_state,macs)
|
||||
MCFG_MACHINE_START_OVERRIDE(macs_state,macs)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(macs_state,macs)
|
||||
|
||||
/* video hardware */
|
||||
@ -504,10 +504,10 @@ static MACHINE_CONFIG_START( macs, macs_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(macs_state, screen_update_macs)
|
||||
MCFG_SCREEN_PALETTE("maincpu:palette")
|
||||
|
||||
MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_a", generic_plain_slot, "macs_cart", "rom")
|
||||
MCFG_SET_IMAGE_LOADABLE(FALSE)
|
||||
MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_b", generic_plain_slot, "macs_cart", "rom")
|
||||
MCFG_SET_IMAGE_LOADABLE(FALSE)
|
||||
MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_a", generic_plain_slot, "macs_cart", "rom")
|
||||
MCFG_SET_IMAGE_LOADABLE(FALSE)
|
||||
MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_b", generic_plain_slot, "macs_cart", "rom")
|
||||
MCFG_SET_IMAGE_LOADABLE(FALSE)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -528,8 +528,8 @@ ROM_START( macsbios )
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
|
||||
|
||||
ROM_REGION( 0x400000, "slot_a:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_a:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_END
|
||||
|
||||
ROM_START( mac2bios )
|
||||
@ -538,8 +538,8 @@ ROM_START( mac2bios )
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
|
||||
|
||||
ROM_REGION( 0x400000, "slot_a:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_a:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_END
|
||||
|
||||
ROM_START( kisekaem )
|
||||
@ -548,12 +548,12 @@ ROM_START( kisekaem )
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
|
||||
|
||||
ROM_REGION( 0x400000, "slot_a:rom", 0 )
|
||||
ROM_LOAD16_BYTE( "am-mj.u8", 0x000000, 0x100000, CRC(3cf85151) SHA1(e05400065c384730f04ef565db5ba27eb3973d15) )
|
||||
ROM_LOAD16_BYTE( "am-mj.u7", 0x000001, 0x100000, CRC(4b645354) SHA1(1dbf9141c3724e5dff2cd8066117fb1b94671a80) )
|
||||
ROM_LOAD16_BYTE( "am-mj.u6", 0x200000, 0x100000, CRC(23b3aa24) SHA1(bfabdb16f9b1b60230bb636a944ab46fdfda49d7) )
|
||||
ROM_LOAD16_BYTE( "am-mj.u5", 0x200001, 0x100000, CRC(b4d53e29) SHA1(d7683fdd5531bf1aa0ef1e4e6f517b31e2d5829e) )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_a:rom", 0 )
|
||||
ROM_LOAD16_BYTE( "am-mj.u8", 0x000000, 0x100000, CRC(3cf85151) SHA1(e05400065c384730f04ef565db5ba27eb3973d15) )
|
||||
ROM_LOAD16_BYTE( "am-mj.u7", 0x000001, 0x100000, CRC(4b645354) SHA1(1dbf9141c3724e5dff2cd8066117fb1b94671a80) )
|
||||
ROM_LOAD16_BYTE( "am-mj.u6", 0x200000, 0x100000, CRC(23b3aa24) SHA1(bfabdb16f9b1b60230bb636a944ab46fdfda49d7) )
|
||||
ROM_LOAD16_BYTE( "am-mj.u5", 0x200001, 0x100000, CRC(b4d53e29) SHA1(d7683fdd5531bf1aa0ef1e4e6f517b31e2d5829e) )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_END
|
||||
|
||||
ROM_START( kisekaeh )
|
||||
@ -562,19 +562,19 @@ ROM_START( kisekaeh )
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
|
||||
|
||||
ROM_REGION( 0x400000, "slot_a:rom", 0 )
|
||||
ROM_LOAD16_BYTE( "kh-u8.bin", 0x000000, 0x100000, CRC(601b9e6a) SHA1(54508a6db3928f78897df64ce400791e4789d0f6) )
|
||||
ROM_LOAD16_BYTE( "kh-u7.bin", 0x000001, 0x100000, CRC(8f6e4bb3) SHA1(361545189feeda0887f930727d25655309b84629) )
|
||||
ROM_LOAD16_BYTE( "kh-u6.bin", 0x200000, 0x100000, CRC(8e700204) SHA1(876e5530d749828de077293cb109a71b67cef140) )
|
||||
ROM_LOAD16_BYTE( "kh-u5.bin", 0x200001, 0x100000, CRC(709bf7c8) SHA1(0a93e0c4f9be22a3302a1c5d2a6ec4739b202ea8) )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x400000, "slot_a:rom", 0 )
|
||||
ROM_LOAD16_BYTE( "kh-u8.bin", 0x000000, 0x100000, CRC(601b9e6a) SHA1(54508a6db3928f78897df64ce400791e4789d0f6) )
|
||||
ROM_LOAD16_BYTE( "kh-u7.bin", 0x000001, 0x100000, CRC(8f6e4bb3) SHA1(361545189feeda0887f930727d25655309b84629) )
|
||||
ROM_LOAD16_BYTE( "kh-u6.bin", 0x200000, 0x100000, CRC(8e700204) SHA1(876e5530d749828de077293cb109a71b67cef140) )
|
||||
ROM_LOAD16_BYTE( "kh-u5.bin", 0x200001, 0x100000, CRC(709bf7c8) SHA1(0a93e0c4f9be22a3302a1c5d2a6ec4739b202ea8) )
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
ROM_END
|
||||
|
||||
ROM_START( cultname ) // uses printer - two different games ? (slot a - checks for printer, slot b - not)
|
||||
MACS_BIOS
|
||||
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "bios", 0x000000, 0x000000, 0x400000 )
|
||||
|
||||
ROM_REGION( 0x400000, "slot_a:rom", 0 )
|
||||
ROM_LOAD16_BYTE( "cult-d0.u8", 0x000000, 0x100000, CRC(394bc1a6) SHA1(98df5406862234815b46c7b0ac0b19e4b597d1b6) )
|
||||
@ -602,8 +602,8 @@ ROM_START( yuka )
|
||||
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASE00 )
|
||||
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "slot_a:rom", 0x000000, 0x000000, 0x400000 )
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "slot_a:rom", 0x000000, 0x000000, 0x400000 )
|
||||
ROM_END
|
||||
|
||||
ROM_START( yujan )
|
||||
@ -617,8 +617,8 @@ ROM_START( yujan )
|
||||
|
||||
ROM_REGION( 0x400000, "slot_b:rom", ROMREGION_ERASEFF )
|
||||
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "slot_a:rom", 0x000000, 0x000000, 0x400000 )
|
||||
ROM_REGION( 0x1000000, "maincpu", 0 )
|
||||
ROM_COPY( "slot_a:rom", 0x000000, 0x000000, 0x400000 )
|
||||
ROM_END
|
||||
|
||||
#if 0
|
||||
@ -639,27 +639,27 @@ static const UINT8 ramdata[160]=
|
||||
|
||||
MACHINE_START_MEMBER(macs_state,macs)
|
||||
{
|
||||
membank("bank1")->configure_entries(0 , 256, memregion("maincpu")->base(), 0x4000);
|
||||
membank("bank1")->configure_entries(256, 256, m_cart1->get_rom_base(), 0x4000);
|
||||
membank("bank1")->configure_entries(512, 256, m_cart2->get_rom_base(), 0x4000);
|
||||
membank("bank1")->set_entry(0);
|
||||
membank("bank1")->configure_entries(0 , 256, memregion("maincpu")->base(), 0x4000);
|
||||
membank("bank1")->configure_entries(256, 256, m_cart1->get_rom_base(), 0x4000);
|
||||
membank("bank1")->configure_entries(512, 256, m_cart2->get_rom_base(), 0x4000);
|
||||
membank("bank1")->set_entry(0);
|
||||
|
||||
membank("bank2")->configure_entries(0, 2, m_ram1.get() + 0x2000, 0x800);
|
||||
membank("bank2")->set_entry(0);
|
||||
membank("bank2")->configure_entries(0, 2, m_ram1.get() + 0x2000, 0x800);
|
||||
membank("bank2")->set_entry(0);
|
||||
|
||||
membank("bank3")->configure_entries(0, 4, m_ram1.get(), 0x800);
|
||||
membank("bank3")->set_entry(2);
|
||||
membank("bank3")->configure_entries(0, 4, m_ram1.get(), 0x800);
|
||||
membank("bank3")->set_entry(2);
|
||||
|
||||
membank("bank4")->configure_entries(0 , 256, memregion("maincpu")->base(), 0x4000);
|
||||
membank("bank4")->configure_entries(256, 256, m_cart1->get_rom_base(), 0x4000);
|
||||
membank("bank4")->configure_entries(512, 256, m_cart2->get_rom_base(), 0x4000);
|
||||
membank("bank4")->set_entry(0);
|
||||
membank("bank4")->configure_entries(0 , 256, memregion("maincpu")->base(), 0x4000);
|
||||
membank("bank4")->configure_entries(256, 256, m_cart1->get_rom_base(), 0x4000);
|
||||
membank("bank4")->configure_entries(512, 256, m_cart2->get_rom_base(), 0x4000);
|
||||
membank("bank4")->set_entry(0);
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(macs_state,macs)
|
||||
{
|
||||
#if 0
|
||||
UINT8 *macs_ram1 = m_ram1.get();
|
||||
UINT8 *macs_ram1 = m_ram1.get();
|
||||
UINT8 *macs_ram2 = m_ram2;
|
||||
/*
|
||||
BIOS ram init:
|
||||
|
@ -886,7 +886,7 @@ ROM_END
|
||||
1x TDA2003 (u24) Audio Amplifier (sound).
|
||||
|
||||
1x 20.000MHz. oscillator (OSC1, close to main CPU).
|
||||
1x 30.000MHz. oscillator (OSC2, close to sound).
|
||||
1x 30.000MHz. oscillator (OSC2, close to sound).
|
||||
1x blu resonator 1000J (XTAL1, close to sound).
|
||||
|
||||
ROMs:
|
||||
|
@ -1199,38 +1199,7 @@ ROMEO - Sammy AX0201A01 'ROMEO' 4111-00000501 0250 K13 custom ASIC (TQ
|
||||
315-6267 - SEGA 315-6267 custom ASIC (BGAxxx)
|
||||
TD62064 - Toshiba TD62064 NPN 50V 1.5A Quad Darlington Driver (SOIC16)
|
||||
SH4 - Hitachi SH-4 HD6417091RA CPU (BGA256)
|
||||
BIOS.IC23 - Macronix 29L001MC-10 3.3volt FlashROM (SOP44)
|
||||
This is a little strange, the ROM appears to be a standard SOP44 with reverse pinout but the
|
||||
address lines are shifted one pin out of position compared to industry-standard pinouts.
|
||||
The actual part number doesn't exist on the Macronix web site, even though they have datasheets for
|
||||
everything else! So it's probably a custom design for Sammy and top-secret!
|
||||
The size is assumed to be 1MBit and is 8-bit (D0-D7 only). The pinout appears to be this.....
|
||||
|
||||
+--\/--+
|
||||
tied to WE of BS62LV1023 VCC | 1 44| VCC - tied to a transistor, probably RESET
|
||||
NC | 2 43| NC
|
||||
A9 | 3 42| NC
|
||||
A10 | 4 41| A8
|
||||
A11 | 5 40| A7
|
||||
A12 | 6 39| A6
|
||||
A13 | 7 38| A5
|
||||
A14 | 8 37| A4
|
||||
A15 | 9 36| A3
|
||||
A16 |10 35| A2
|
||||
NC |11 34| A1
|
||||
NC |12 33| CE - tied to 315-6267
|
||||
GND |13 32| GND
|
||||
A0 |14 31| OE
|
||||
D7 |15 30| D0
|
||||
NC |16 29| NC
|
||||
D6 |17 28| D1
|
||||
NC |18 27| NC
|
||||
D5 |19 26| D2
|
||||
NC |20 25| NC
|
||||
D4 |21 24| D3
|
||||
VCC |22 23| NC
|
||||
+------+
|
||||
|
||||
BIOS.IC23 - Macronix 29L001MC-10 3.3volt (1MBit) FlashROM (SOP44, reverse pinout)
|
||||
W129AG - IC Works W129AG Programmable Clock Frequency Generator, clock input of 13.5MHz (SOIC16)
|
||||
SW1 - 2-position Dip Switch
|
||||
VGA - 15 pin VGA out connector @ 31.5kHz
|
||||
@ -2719,7 +2688,7 @@ MACHINE_CONFIG_END
|
||||
*/
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( naomigd, naomi_base )
|
||||
MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", "gdrom", "pic", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
|
||||
MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/*
|
||||
@ -3088,11 +3057,16 @@ Region byte encoding is as follows:
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-23607b.ic27", 0x000000, 0x200000, CRC(f308c5e9) SHA1(5470ab1cee6afecbd8ca8cf40f8fbe4ec2cb1471) ) \
|
||||
ROM_SYSTEM_BIOS( 9, "bios9", "epr-23607 (USA)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 9, "epr-23607.ic27", 0x000000, 0x200000, CRC(2b55add2) SHA1(547de5f97d3183c8cd069c4fa3c09f13d8b637d9) )
|
||||
/* First half is BIOS, second half is game settings and is blanked/reprogrammed by the BIOS as necessary */
|
||||
/*
|
||||
First half is BIOS, second half is game settings and is blanked/reprogrammed by the BIOS if game cartridge exchange was detected
|
||||
area 0x1A000-0x1BFFF is write protected and contain 12 bytes of unit-specific unique information (probably serial number, manufacture date, etc),
|
||||
2 dumps included for reference
|
||||
*/
|
||||
#define AW_BIOS \
|
||||
ROM_REGION( 0x200000, "awflash", 0) \
|
||||
ROM_SYSTEM_BIOS( 0, "bios0", "Atomiswave BIOS" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 0, "bios.ic23_l", 0x000000, 0x010000, BAD_DUMP CRC(e5693ce3) SHA1(1bde3ed87af64b0f675ebd47f12a53e1fc5709c1) ) /* Might be bad.. especially. bytes 0x0000, 0x6000, 0x8000 which gave different reads */
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 0, "bios0.ic23", 0x000000, 0x020000, CRC(719b2b0b) SHA1(b4c1a26bc8906d5275eb28c701dff2b9365bcdfa) ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 0, "bios1.ic23", 0x000000, 0x020000, CRC(d3e80a9f) SHA1(33024f9d51c04884c2b44ce146f340e7a857b959) )
|
||||
/* default EEPROM values, same works for all games */
|
||||
#define NAOMI_DEFAULT_EEPROM \
|
||||
ROM_REGION16_BE( 0x80, "main_eeprom", 0 ) \
|
||||
|
@ -563,7 +563,7 @@ ADDRESS_MAP_END
|
||||
|
||||
CUSTOM_INPUT_MEMBER(opwolf_state::opwolf_gun_x_r )
|
||||
{
|
||||
/* P1X - Have to remap 8 bit input value, into 0-319 visible range */
|
||||
/* P1X - Have to remap 8 bit input value, into 0-319 visible range */
|
||||
int scaled = (ioport(P1X_PORT_TAG)->read() * 320 ) / 256;
|
||||
return (scaled + 0x15 + m_opwolf_gun_xoffs);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user