mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +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>
|
||||
|
@ -14948,7 +14948,7 @@ but dumps still have to be confirmed.
|
||||
<rom name="F1 Champion Edtn MDRIVE ROM3 Eval only.BIN" size="0x080000" crc="7863f441" sha1="ccad151b160a7b361d2d8982d56e80895b4799a7" offset="0x100001" loadflag="load16_byte"/>
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
</software>
|
||||
|
||||
<software name="f1circus">
|
||||
<description>F1 Circus MD (Jpn)</description>
|
||||
|
5370
hash/neogeo.xml
5370
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>
|
||||
|
@ -35,11 +35,11 @@
|
||||
then read Cn00 to map C800-CFFF first.
|
||||
|
||||
PC RAM from 0xA0000-0xAFFFF is where the V30 BIOS is downloaded,
|
||||
plus used for general storage by the system. This is mirrored at
|
||||
plus used for general storage by the system. This is mirrored at
|
||||
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,11 +53,11 @@
|
||||
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.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "pc_xporter.h"
|
||||
@ -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)
|
||||
@ -141,7 +141,7 @@ MACHINE_CONFIG_FRAGMENT( pcxporter )
|
||||
MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(a2bus_pcxporter_device, keyboard_clock_w))
|
||||
MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(a2bus_pcxporter_device, keyboard_data_w))
|
||||
MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
|
||||
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
|
||||
@ -214,10 +214,10 @@ void a2bus_pcxporter_device::device_start()
|
||||
save_item(NAME(m_ram));
|
||||
save_item(NAME(m_regs));
|
||||
save_item(NAME(m_offset));
|
||||
|
||||
|
||||
m_v30->space(AS_PROGRAM).install_ram(0, 0xaffff, m_ram);
|
||||
m_v30->space(AS_PROGRAM).install_rom(0xf0000, 0xfffff, &m_ram[0xa0000]);
|
||||
|
||||
|
||||
m_pcmem_space = &m_v30->space(AS_PROGRAM);
|
||||
m_pcio_space = &m_v30->space(AS_IO);
|
||||
}
|
||||
@ -313,11 +313,11 @@ UINT8 a2bus_pcxporter_device::read_c800(address_space &space, UINT16 offset)
|
||||
|
||||
case 0x704: // read w/o increment
|
||||
rv = m_ram[m_offset];
|
||||
return rv;
|
||||
|
||||
return rv;
|
||||
|
||||
default:
|
||||
//printf("Read $C800 at %x\n", offset + 0xc800);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return m_regs[offset];
|
||||
@ -371,13 +371,13 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN
|
||||
else if (m_offset >= 0xb8000 && m_offset <= 0xbbfff) m_pcmem_space->write_byte(m_offset, data);
|
||||
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)
|
||||
@ -406,37 +406,37 @@ 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;
|
||||
|
||||
case 0x72f: // CGA color select
|
||||
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)
|
||||
{
|
||||
{
|
||||
if (m_reset_during_halt)
|
||||
{
|
||||
m_v30->reset();
|
||||
m_reset_during_halt = false;
|
||||
}
|
||||
|
||||
|
||||
m_v30->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
m_v30->resume(SUSPEND_REASON_HALT | SUSPEND_REASON_DISABLE);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<isa8_device> m_isabus;
|
||||
optional_device<pc_kbdc_device> m_pc_kbdc;
|
||||
|
||||
|
||||
// overrides of standard a2bus slot functions
|
||||
virtual UINT8 read_c0nx(address_space &space, UINT8 offset) override;
|
||||
virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data) override;
|
||||
@ -114,7 +114,7 @@ public:
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
private:
|
||||
UINT8 m_ram[768*1024];
|
||||
UINT8 m_c800_ram[0x400];
|
||||
|
@ -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
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**********************************************************************
|
||||
|
||||
Mattel Intellivision ECS hack for controller port emulation
|
||||
|
||||
|
||||
FIXME: This device is the best I could come up with to emulate
|
||||
the fact that Keyboard and Synth controllers for the ECS should be
|
||||
plugged in both ECS control ports, while the 3rd and 4th additional
|
||||
@ -12,9 +12,9 @@
|
||||
in more than a slot, this has been worked around with this device
|
||||
which supports as options
|
||||
- ECS keyboard
|
||||
- ECS synth
|
||||
- ECS synth
|
||||
- a pair of Intellivision controller
|
||||
|
||||
|
||||
All the code for both the controller port and the slot devices has
|
||||
been included in this single source file to make easier to clean
|
||||
them up once we extend the core to support this kind of setup
|
||||
@ -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();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -197,120 +197,120 @@ static INPUT_PORTS_START( intvecs_keybd )
|
||||
Bit 4 D E 2 3 W S Z X
|
||||
Bit 5 A CTL (right) 1 Q (up) (down) (space)
|
||||
Bit 6 SHIFT NC NC NC NC NC NC NC
|
||||
|
||||
|
||||
Shifted keys that differ from pc:
|
||||
Key : 1 2 5 6 7 (left) (right) (up) (down)
|
||||
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;
|
||||
|
||||
virtual UINT8 read_portA() override;
|
||||
virtual UINT8 read_portB() override;
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() 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);
|
||||
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
// 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;
|
||||
|
||||
protected:
|
||||
// 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;
|
||||
|
||||
// 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;
|
||||
|
||||
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);
|
||||
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
// 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;
|
||||
|
||||
protected:
|
||||
// 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;
|
||||
|
||||
// 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;
|
||||
|
||||
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 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 }
|
||||
};
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
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;
|
||||
static const UINT8 keypad_table[] =
|
||||
{
|
||||
0xff, 0x3f, 0x9f, 0x5f, 0xd7, 0xb7, 0x77, 0xdb,
|
||||
0xbb, 0x7b, 0xdd, 0xbd, 0x7d, 0xde, 0xbe, 0x7e
|
||||
};
|
||||
|
||||
/* 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;
|
||||
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 }
|
||||
};
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
|
@ -3,13 +3,13 @@
|
||||
/**********************************************************************
|
||||
|
||||
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
|
||||
|
||||
|
||||
Technically, the latter is not a configurable slot, because it's not
|
||||
a component that arcade operators could simply change with a different
|
||||
controller, but this implementation allows for simpler code.
|
||||
@ -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(); }
|
||||
@ -69,12 +69,12 @@ public:
|
||||
// construction/destruction
|
||||
device_neogeo_ctrl_edge_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_neogeo_ctrl_edge_interface();
|
||||
|
||||
|
||||
virtual UINT8 read_start_sel() { return 0xff; }
|
||||
virtual DECLARE_READ8_MEMBER( in0_r ) { return 0xff; }
|
||||
virtual DECLARE_READ8_MEMBER( in1_r ) { return 0xff; }
|
||||
virtual void write_ctrlsel(UINT8 data) { }
|
||||
|
||||
|
||||
protected:
|
||||
neogeo_ctrl_edge_port_device *m_port;
|
||||
};
|
||||
@ -88,7 +88,7 @@ public:
|
||||
// construction/destruction
|
||||
neogeo_ctrl_edge_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~neogeo_ctrl_edge_port_device();
|
||||
|
||||
|
||||
UINT8 read_start_sel();
|
||||
DECLARE_READ8_MEMBER( in0_r );
|
||||
DECLARE_READ8_MEMBER( in1_r );
|
||||
@ -97,7 +97,7 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
|
||||
device_neogeo_ctrl_edge_interface *m_device;
|
||||
};
|
||||
|
||||
|
@ -102,7 +102,7 @@ READ8_MEMBER(neogeo_dial_device::in0_r)
|
||||
res = m_joy1->read();
|
||||
else
|
||||
res = m_dial1->read();
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ READ8_MEMBER(neogeo_dial_device::in1_r)
|
||||
res = m_joy2->read();
|
||||
else
|
||||
res = m_dial2->read();
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -129,4 +129,3 @@ void neogeo_dial_device::write_ctrlsel(UINT8 data)
|
||||
{
|
||||
m_ctrl_sel = data;
|
||||
}
|
||||
|
||||
|
@ -27,20 +27,20 @@ class neogeo_dial_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
neogeo_dial_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
// 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_neogeo_control_port_interface overrides
|
||||
virtual DECLARE_READ8_MEMBER( in0_r ) override;
|
||||
virtual DECLARE_READ8_MEMBER( in1_r ) override;
|
||||
virtual void write_ctrlsel(UINT8 data) override;
|
||||
|
||||
|
||||
private:
|
||||
required_ioport m_joy1;
|
||||
required_ioport m_joy2;
|
||||
|
@ -90,7 +90,7 @@ READ8_MEMBER(neogeo_irrmaze_device::in0_r)
|
||||
res = m_ty->read();
|
||||
else
|
||||
res = m_tx->read();
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -111,4 +111,3 @@ void neogeo_irrmaze_device::write_ctrlsel(UINT8 data)
|
||||
{
|
||||
m_ctrl_sel = data;
|
||||
}
|
||||
|
||||
|
@ -27,20 +27,20 @@ class neogeo_irrmaze_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
neogeo_irrmaze_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
// 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_neogeo_control_port_interface overrides
|
||||
virtual DECLARE_READ8_MEMBER( in0_r ) override;
|
||||
virtual DECLARE_READ8_MEMBER( in1_r ) override;
|
||||
virtual void write_ctrlsel(UINT8 data) override;
|
||||
|
||||
|
||||
private:
|
||||
required_ioport m_tx;
|
||||
required_ioport m_ty;
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
|
||||
|
||||
Implementation through the 15-pin controller port (used by AES)
|
||||
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ void neogeo_joystick_device::device_reset()
|
||||
|
||||
UINT8 neogeo_joystick_device::read_ctrl()
|
||||
{
|
||||
return m_joy->read();
|
||||
return m_joy->read();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -107,10 +107,10 @@ UINT8 neogeo_joystick_device::read_start_sel()
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
|
||||
Implementation through the edge connector (used by MVS) and
|
||||
|
||||
Implementation through the edge connector (used by MVS) and
|
||||
connecting two controllers
|
||||
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
//**************************************************************************
|
||||
@ -203,4 +203,3 @@ READ8_MEMBER(neogeo_joy_ac_device::in1_r)
|
||||
{
|
||||
return m_joy2->read();
|
||||
}
|
||||
|
||||
|
@ -54,15 +54,15 @@ class neogeo_joy_ac_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
neogeo_joy_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
// 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_neogeo_ctrl_edge_interface overrides
|
||||
virtual DECLARE_READ8_MEMBER( in0_r ) override;
|
||||
virtual DECLARE_READ8_MEMBER( in1_r ) override;
|
||||
|
@ -128,9 +128,9 @@ READ8_MEMBER(neogeo_kizuna4p_device::in0_r)
|
||||
res = m_joy3->read();
|
||||
else
|
||||
res = m_joy1->read();
|
||||
|
||||
|
||||
if (m_ctrl_sel & 0x04) res &= ((m_ctrl_sel & 0x01) ? ~0x20 : ~0x10);
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -145,9 +145,9 @@ READ8_MEMBER(neogeo_kizuna4p_device::in1_r)
|
||||
res = m_joy4->read();
|
||||
else
|
||||
res = m_joy2->read();
|
||||
|
||||
|
||||
if (m_ctrl_sel & 0x04) res &= ((m_ctrl_sel & 0x01) ? ~0x20 : ~0x10);
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -27,21 +27,21 @@ class neogeo_kizuna4p_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
neogeo_kizuna4p_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
// 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_neogeo_control_port_interface overrides
|
||||
virtual DECLARE_READ8_MEMBER( in0_r ) override;
|
||||
virtual DECLARE_READ8_MEMBER( in1_r ) override;
|
||||
virtual UINT8 read_start_sel() override;
|
||||
virtual void write_ctrlsel(UINT8 data) override;
|
||||
|
||||
|
||||
private:
|
||||
required_ioport m_joy1;
|
||||
required_ioport m_joy2;
|
||||
|
@ -150,7 +150,7 @@ UINT8 neogeo_mjctrl_ac_device::read_ctrl()
|
||||
case 0x1b: res = m_mjpanel[2]->read(); break;
|
||||
case 0x24: res = m_mjpanel[3]->read(); break;
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -171,4 +171,3 @@ UINT8 neogeo_mjctrl_device::read_start_sel()
|
||||
{
|
||||
return m_ss->read();
|
||||
}
|
||||
|
||||
|
@ -28,19 +28,19 @@ public:
|
||||
// construction/destruction
|
||||
neogeo_mjctrl_ac_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);
|
||||
neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
// 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_neogeo_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl() override;
|
||||
virtual void write_ctrlsel(UINT8 data) override;
|
||||
|
||||
|
||||
private:
|
||||
required_ioport_array<4> m_mjpanel;
|
||||
UINT8 m_ctrl_sel;
|
||||
|
@ -120,4 +120,3 @@ UINT8 saturn_analog_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0xf1; }
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**********************************************************************
|
||||
|
||||
Sega Saturn Controller Port emulation
|
||||
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "ctrl.h"
|
||||
@ -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,13 +50,13 @@ 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);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
|
||||
protected:
|
||||
device_saturn_control_port_interface *m_device;
|
||||
};
|
||||
|
@ -108,4 +108,3 @@ UINT16 saturn_joy_device::read_direct()
|
||||
{
|
||||
return m_joy->read();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT16 read_direct() override;
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
|
@ -119,4 +119,3 @@ UINT8 saturn_joymd6b_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override {};
|
||||
virtual void device_reset() override {};
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0xf1; }
|
||||
@ -54,20 +54,20 @@ class saturn_joymd6b_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
saturn_joymd6b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
// 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_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0xf1; }
|
||||
virtual UINT8 read_id(int idx) override { return m_ctrl_id; }
|
||||
|
||||
|
||||
private:
|
||||
required_ioport m_joy;
|
||||
};
|
||||
|
@ -19,171 +19,171 @@ static INPUT_PORTS_START( saturn_joy )
|
||||
// TODO: there's no info about the keycode used on Saturn keyboard, the following is trial & error with Game Basic software
|
||||
PORT_START("KEY.0") // 0x00 - 0x07
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_UNUSED)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F1") /*PORT_CODE(KEYCODE_F1)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x01)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("0-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x02)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F1") /*PORT_CODE(KEYCODE_F1)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x01)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("0-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x02)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F2") /*PORT_CODE(KEYCODE_F2)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x03) // RUN
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F3") /*PORT_CODE(KEYCODE_F3)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x04) // LIST
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F4") /*PORT_CODE(KEYCODE_F4)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x05) // EDIT
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F5") /*PORT_CODE(KEYCODE_F5)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x06)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("CLR SCR") PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x07)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F5") /*PORT_CODE(KEYCODE_F5)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x06)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("CLR SCR") PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x07)
|
||||
|
||||
PORT_START("KEY.1") // 0x08 - 0x0f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x08)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F6") /*PORT_CODE(KEYCODE_F6)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x09)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F7") /*PORT_CODE(KEYCODE_F7)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F8") /*PORT_CODE(KEYCODE_F8)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0b)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x08)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F6") /*PORT_CODE(KEYCODE_F6)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x09)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F7") /*PORT_CODE(KEYCODE_F7)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F8") /*PORT_CODE(KEYCODE_F8)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F9") /*PORT_CODE(KEYCODE_F9)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0c) // LIST again
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR('5')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0f)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR('5')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x0f)
|
||||
|
||||
PORT_START("KEY.2") // 0x10 - 0x17
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x10)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x11)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x10)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x11)
|
||||
/* TODO: break codes! */
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("SHIFT") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x12)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("KANA SHIFT") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x13)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("(special keys)") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x14)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("SHIFT") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x12)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("KANA SHIFT") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x13)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("(special keys)") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x14)
|
||||
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x15)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x16)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x17)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x15)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x16)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x17)
|
||||
|
||||
PORT_START("KEY.3") // 0x18 - 0x1f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x18)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x19)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1f)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x18)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x19)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x1f)
|
||||
|
||||
PORT_START("KEY.4") // 0x20 - 0x27
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("4-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x20)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x21)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x22)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x23)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x24)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x25)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x26)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("4-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x27)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("4-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x20)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x21)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x22)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x23)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x24)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x25)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x26)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("4-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x27)
|
||||
|
||||
PORT_START("KEY.5") // 0x28 - 0x2f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("5-1") /*PORT_CODE(KEYCODE_F) PORT_CHAR('F')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x28) // another F?
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x29)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("5-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2f)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x29)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("5-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x2f)
|
||||
|
||||
PORT_START("KEY.6") // 0x30 - 0x37
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("6-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x30)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x31)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x32)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x33)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x34)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x35)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x36)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("6-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x37)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("6-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x30)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x31)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x32)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x33)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x34)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x35)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x36)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("6-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x37)
|
||||
|
||||
PORT_START("KEY.7") // 0x38 - 0x3f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x38)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x39)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3f)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x38)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x39)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x3f)
|
||||
|
||||
PORT_START("KEY.8") // 0x40 - 0x47
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("8-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x40)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(",") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x41)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x42)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x43)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x44)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x45)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x46)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("8-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x47)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("8-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x40)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(",") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x41)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x42)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x43)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x44)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x45)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x46)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("8-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x47)
|
||||
|
||||
PORT_START("KEY.9") // 0x48 - 0x4f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("9-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x48)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(".") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x49)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("/") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(";") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("- / =") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("9-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4f)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("9-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x48)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(".") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x49)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("/") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(";") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("- / =") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("9-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x4f)
|
||||
|
||||
PORT_START("KEY.10") // 0x50 - 0x57
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x50)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("\xC2\xA5") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x51)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(":") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x52)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x53)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("@") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x54)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("^") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x55)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x56)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x57)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x50)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("\xC2\xA5") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x51)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME(":") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x52)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x53)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("@") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x54)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("^") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x55)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x56)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("A-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x57)
|
||||
|
||||
PORT_START("KEY.11") // 0x58 - 0x5f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x58)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x59)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0d) PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5a)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x58)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x59)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0d) PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("[") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5b) // {
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5c)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("]") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5d) // }
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5f)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("B-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x5f)
|
||||
|
||||
PORT_START("KEY.12") // 0x60 - 0x67
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x60)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x61)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x62)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x63)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x64)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x65)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) /* PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x66)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x67)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x60)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x61)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x62)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x63)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x64)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x65)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) /* PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x66)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("C-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x67)
|
||||
|
||||
PORT_START("KEY.13") // 0x68 - 0x6f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x68)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x69)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6f)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x68)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x69)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("D-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x6f)
|
||||
|
||||
PORT_START("KEY.14") // 0x70 - 0x77
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x70)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x71)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x72)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x73)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x74)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x75)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x76)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x77)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x70)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x71)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x72)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x73)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x74)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x75)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x76)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("E-8") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x77)
|
||||
|
||||
PORT_START("KEY.15") // 0x78 - 0x7f
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x78)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x79)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7e)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-1") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x78)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-2") /*PORT_CODE(KEYCODE_1) PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x79)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-3") /*PORT_CODE(KEYCODE_2) PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-4") /*PORT_CODE(KEYCODE_3) PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7b)
|
||||
PORT_BIT(0x10,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-5") /*PORT_CODE(KEYCODE_4) PORT_CHAR('4')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7c)
|
||||
PORT_BIT(0x20,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-6") /*PORT_CODE(KEYCODE_5) PORT_CHAR(0xd)*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7d)
|
||||
PORT_BIT(0x40,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("F-7") /*PORT_CODE(KEYCODE_6) PORT_CHAR('6')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7e)
|
||||
PORT_BIT(0x80,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("ESC") /*PORT_CODE(KEYCODE_7) PORT_CHAR('7')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7f) //SYSTEM CONFIGURATION
|
||||
|
||||
PORT_START("KEYS_1") // special keys
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) /*PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x78)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) /*PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x79)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) /*PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) /*PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7b)
|
||||
PORT_BIT(0x01,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) /*PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x78)
|
||||
PORT_BIT(0x02,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) /*PORT_CHAR('1')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x79)
|
||||
PORT_BIT(0x04,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) /*PORT_CHAR('2')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7a)
|
||||
PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) /*PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_keybd_device, key_stroke, 0x7b)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -253,7 +253,7 @@ INPUT_CHANGED_MEMBER(saturn_keybd_device::key_stroke)
|
||||
m_data = ((UINT8)(FPTR)(param) & 0xff);
|
||||
m_status |= 8;
|
||||
}
|
||||
|
||||
|
||||
if(oldval && !newval)
|
||||
{
|
||||
//m_status &= ~8;
|
||||
@ -264,7 +264,7 @@ INPUT_CHANGED_MEMBER(saturn_keybd_device::key_stroke)
|
||||
UINT16 saturn_keybd_device::get_game_key()
|
||||
{
|
||||
UINT16 game_key = 0xffff;
|
||||
|
||||
|
||||
game_key ^= ((m_key_s1->read() & 0x80) << 8); // right
|
||||
game_key ^= ((m_key_s1->read() & 0x40) << 8); // left
|
||||
game_key ^= ((m_key_s1->read() & 0x20) << 8); // down
|
||||
@ -329,4 +329,3 @@ UINT8 saturn_keybd_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -30,14 +30,14 @@ public:
|
||||
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(key_stroke);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0xf1; }
|
||||
@ -48,9 +48,9 @@ private:
|
||||
UINT8 m_data;
|
||||
UINT8 m_prev_data;
|
||||
UINT16 m_repeat_count;
|
||||
|
||||
|
||||
UINT16 get_game_key();
|
||||
|
||||
|
||||
required_ioport_array<16> m_key;
|
||||
required_ioport m_key_s1;
|
||||
};
|
||||
|
@ -3,8 +3,8 @@
|
||||
/**********************************************************************
|
||||
|
||||
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
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
@ -89,16 +89,16 @@ UINT8 saturn_mouse_device::read_ctrl(UINT8 offset)
|
||||
UINT8 mouse_ctrl = m_buttons->read();
|
||||
INT16 mouse_x = m_pointx->read();
|
||||
INT16 mouse_y = m_pointy->read();
|
||||
|
||||
|
||||
if (mouse_x < 0)
|
||||
mouse_ctrl |= 0x10;
|
||||
|
||||
|
||||
if (mouse_y < 0)
|
||||
mouse_ctrl |= 0x20;
|
||||
|
||||
|
||||
if ((mouse_x & 0xff00) != 0xff00 && (mouse_x & 0xff00) != 0x0000)
|
||||
mouse_ctrl |= 0x40;
|
||||
|
||||
|
||||
if ((mouse_y & 0xff00) != 0xff00 && (mouse_y & 0xff00) != 0x0000)
|
||||
mouse_ctrl |= 0x80;
|
||||
|
||||
@ -117,4 +117,3 @@ UINT8 saturn_mouse_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0xf1; }
|
||||
|
@ -29,15 +29,15 @@ class saturn_multitap_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
saturn_multitap_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;
|
||||
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0x16; }
|
||||
|
@ -3,8 +3,8 @@
|
||||
/**********************************************************************
|
||||
|
||||
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
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
@ -89,16 +89,16 @@ UINT8 saturn_track_device::read_ctrl(UINT8 offset)
|
||||
UINT8 mouse_ctrl = m_buttons->read();
|
||||
INT16 mouse_x = m_pointx->read();
|
||||
INT16 mouse_y = m_pointy->read();
|
||||
|
||||
|
||||
if (mouse_x < 0)
|
||||
mouse_ctrl |= 0x10;
|
||||
|
||||
|
||||
if (mouse_y < 0)
|
||||
mouse_ctrl |= 0x20;
|
||||
|
||||
|
||||
if ((mouse_x & 0xff00) != 0xff00 && (mouse_x & 0xff00) != 0x0000)
|
||||
mouse_ctrl |= 0x40;
|
||||
|
||||
|
||||
if ((mouse_y & 0xff00) != 0xff00 && (mouse_y & 0xff00) != 0x0000)
|
||||
mouse_ctrl |= 0x80;
|
||||
|
||||
@ -117,4 +117,3 @@ UINT8 saturn_track_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0xf1; }
|
||||
|
@ -106,4 +106,3 @@ UINT8 saturn_wheel_device::read_ctrl(UINT8 offset)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0xf1; }
|
||||
|
@ -29,15 +29,15 @@ class saturn_segatap_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
saturn_segatap_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;
|
||||
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
// device_saturn_control_port_interface overrides
|
||||
virtual UINT8 read_ctrl(UINT8 offset) override;
|
||||
virtual UINT8 read_status() override { return 0x04; }
|
||||
|
@ -6756,21 +6756,20 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 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,13 +6820,13 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 64-bit form
|
||||
@ -6843,12 +6842,12 @@ 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
@ -951,7 +951,7 @@ void ppc_device::device_start()
|
||||
if (beinfo.direct_iregs > 7)
|
||||
m_regmap[2] = uml::I7;
|
||||
|
||||
|
||||
|
||||
if (beinfo.direct_fregs > 3)
|
||||
m_fdregmap[0] = uml::F3;
|
||||
if (beinfo.direct_fregs > 4)
|
||||
|
@ -39,7 +39,7 @@ O46 47 | | 14 K3
|
||||
O36 48 | * | 13 K2
|
||||
|________________________________________________/
|
||||
|
||||
1 2 3 4 5 6 7 8 9 10 11 12
|
||||
1 2 3 4 5 6 7 8 9 10 11 12
|
||||
O26 O16 R4 R3 R2 R1 GND _T bt al ACL K1 note: bt = beta symbol, al = alpha symbol
|
||||
*/
|
||||
|
||||
@ -57,7 +57,7 @@ protected:
|
||||
// opcode handlers
|
||||
virtual void op_lb() override;
|
||||
virtual void op_incb() override;
|
||||
|
||||
|
||||
virtual void op_comcb();
|
||||
virtual void op_ssr();
|
||||
virtual void op_trs();
|
||||
|
@ -92,4 +92,3 @@ void sm500_device::op_comcn()
|
||||
}
|
||||
|
||||
// Test instructions
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
/*
|
||||
|
||||
Known chips: (* means not emulated yet)
|
||||
|
||||
|
||||
Sharp SM510 MCU family:
|
||||
- SM510: 2.7Kx8 ROM, 128x4 RAM(32x4 for LCD)
|
||||
- SM511: 4Kx8 ROM, 128x4 RAM(32x4 for LCD), melody controller
|
||||
@ -16,7 +16,7 @@
|
||||
- *SM530: x
|
||||
- *SM531: x
|
||||
- *KB1013VK1-2: Soviet-era clone of SM500, minor differences
|
||||
|
||||
|
||||
References:
|
||||
- 1990 Sharp Microcomputers Data Book
|
||||
- 1996 Sharp Microcomputer Databook
|
||||
|
@ -26,14 +26,14 @@ enum e_mnemonics
|
||||
mRM, mSM,
|
||||
mPRE, mSME, mRME, mTMEL,
|
||||
mSKIP, mCEND, mIDIV, mDR, mDTA,
|
||||
|
||||
|
||||
// SM500-specific
|
||||
mCOMCB, mRTN, mRTNS, mSSR, mTR, mTRS,
|
||||
mADDC, mPDTW, mTW, mDTW,
|
||||
mATS, mEXKSA, mEXKFA,
|
||||
mRMF, mSMF, mCOMCN,
|
||||
mTA, mTM2, mTG,
|
||||
|
||||
|
||||
// KB1013VK1-2 aliases
|
||||
mLC, mLM, mLE, mLAF, mLAS, mLDF, mBS0, mBS1, mXL, mXM, mXI, mXEI, mXD, mXED, mXE, mBM0, mBM1, mSM1,
|
||||
mAM, mAC, mA10, mAS, mCLL, mCOM, mCLC, mSTC, mSCO, mSAO, mINC, mDEC, mSAM, mSAL, mNOP,
|
||||
@ -81,7 +81,7 @@ static const UINT8 s_bits[] =
|
||||
2, 2,
|
||||
8, 0, 0, 0,
|
||||
0, 0, 0, 0, 0,
|
||||
|
||||
|
||||
//
|
||||
0, 0, 0, 4, 6, 6,
|
||||
0, 0, 0, 0,
|
||||
|
@ -159,7 +159,7 @@ void sm511_device::execute_one()
|
||||
break; // 0xfc
|
||||
|
||||
} // big switch
|
||||
|
||||
|
||||
// BM high bit is only valid for 1 step
|
||||
m_sbm = (m_op == 0x02);
|
||||
}
|
||||
|
@ -1337,4 +1337,3 @@ void pcxport_dmac_device::end_of_process()
|
||||
|
||||
m_state = STATE_SI;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ generic_latch_8_device::generic_latch_8_device(const machine_config &mconfig, co
|
||||
|
||||
READ8_MEMBER( generic_latch_8_device::read )
|
||||
{
|
||||
m_latch_read = 1;
|
||||
m_latch_read = 1;
|
||||
return m_latched_value;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ generic_latch_16_device::generic_latch_16_device(const machine_config &mconfig,
|
||||
|
||||
READ16_MEMBER( generic_latch_16_device::read )
|
||||
{
|
||||
m_latch_read = 1;
|
||||
m_latch_read = 1;
|
||||
return m_latched_value;
|
||||
}
|
||||
|
||||
@ -171,5 +171,3 @@ void generic_latch_16_device::device_start()
|
||||
save_item(NAME(m_latched_value));
|
||||
save_item(NAME(m_latch_read));
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
|
||||
DECLARE_WRITE8_MEMBER( preset_w );
|
||||
DECLARE_WRITE8_MEMBER( clear_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( preset_w );
|
||||
@ -43,7 +43,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
|
||||
|
||||
void sync_callback(void *ptr, INT32 param);
|
||||
private:
|
||||
UINT16 m_latched_value;
|
||||
@ -64,7 +64,7 @@ public:
|
||||
|
||||
DECLARE_READ16_MEMBER( read );
|
||||
DECLARE_WRITE16_MEMBER( write );
|
||||
|
||||
|
||||
DECLARE_WRITE16_MEMBER( preset_w );
|
||||
DECLARE_WRITE16_MEMBER( clear_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( preset_w );
|
||||
@ -72,7 +72,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
|
||||
|
||||
void sync_callback(void *ptr, INT32 param);
|
||||
private:
|
||||
UINT16 m_latched_value;
|
||||
|
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
|
||||
|
@ -106,7 +106,7 @@ void rtc9701_device::device_start()
|
||||
rtc_state = RTC9701_CMD_WAIT;
|
||||
cmd_stream_pos = 0;
|
||||
current_cmd = 0;
|
||||
|
||||
|
||||
save_item(NAME(m_latch));
|
||||
save_item(NAME(m_reset_line));
|
||||
save_item(NAME(m_clock_line));
|
||||
|
@ -43,7 +43,7 @@ void serflash_device::device_start()
|
||||
|
||||
m_flashwritemap.resize(m_length / FLASH_PAGE_SIZE);
|
||||
memset(&m_flashwritemap[0], 0, m_length / FLASH_PAGE_SIZE);
|
||||
|
||||
|
||||
save_item(NAME(m_flash_state));
|
||||
save_item(NAME(m_flash_enab));
|
||||
save_item(NAME(m_flash_cmd_seq));
|
||||
|
@ -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
|
||||
@ -366,7 +366,7 @@ TIMER_CALLBACK_MEMBER( saturn_state::stv_smpc_intback )
|
||||
- and so on... until the 4th (for SegaTap) or 6th (for Multitap) controller is read
|
||||
TODO: how does the multitap check if a controller is connected? does it ask for the
|
||||
controller status of each subport? how does this work exactly?
|
||||
currently, there is a small problem in some specific controller config which seems to
|
||||
currently, there is a small problem in some specific controller config which seems to
|
||||
lose track of one controller. E.g. if I put multitap in port2 with inserted joy1, joy2 and joy4
|
||||
it does not see joy4 controller, but if I put joy1, joy2, joy4 and joy5 it sees
|
||||
all four of them. The same happens if I skip controllers with id = 0xff...
|
||||
@ -376,18 +376,18 @@ TIMER_CALLBACK_MEMBER( saturn_state::stv_smpc_intback )
|
||||
TIMER_CALLBACK_MEMBER( saturn_state::intback_peripheral )
|
||||
{
|
||||
// if (LOG_SMPC) logerror("SMPC: providing PAD data for intback, pad %d\n", intback_stage-2);
|
||||
|
||||
|
||||
// doesn't work?
|
||||
//pad_num = m_smpc.intback_stage - 1;
|
||||
|
||||
|
||||
if(LOG_PAD_CMD) printf("%d %d %d\n", m_smpc.intback_stage - 1, machine().first_screen()->vpos(), (int)machine().first_screen()->frame_number());
|
||||
|
||||
UINT8 status1 = m_ctrl1 ? m_ctrl1->read_status() : 0xf0;
|
||||
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
|
||||
@ -836,7 +836,7 @@ UINT8 saturn_state::smpc_direct_mode(UINT8 pad_n)
|
||||
{
|
||||
int hshake = (pad_n == 0) ? ((m_smpc.PDR1 >> 5) & 3) : ((m_smpc.PDR2 >> 5) & 3);
|
||||
const int shift_bit[4] = { 4, 12, 8, 0 };
|
||||
|
||||
|
||||
UINT16 ctrl_read = 0;
|
||||
if (m_ctrl1 && pad_n == 0)
|
||||
ctrl_read = m_ctrl1->read_direct();
|
||||
|
@ -49,7 +49,7 @@ void epic12_device::device_start()
|
||||
|
||||
m_blitter_delay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(epic12_device::blitter_delay_callback),this));
|
||||
m_blitter_delay_timer->adjust(attotime::never);
|
||||
|
||||
|
||||
save_item(NAME(m_gfx_addr));
|
||||
save_item(NAME(m_gfx_scroll_0_x));
|
||||
save_item(NAME(m_gfx_scroll_0_y));
|
||||
|
@ -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());
|
||||
|
||||
img->m_user_loadable = user_loadable;
|
||||
}
|
||||
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());
|
||||
|
||||
bool user_loadable() const { return m_user_loadable; }
|
||||
img->m_user_loadable = 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);
|
||||
@ -318,13 +318,13 @@ protected:
|
||||
|
||||
std::string m_brief_instance_name;
|
||||
std::string m_instance_name;
|
||||
|
||||
|
||||
/* 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;
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ template<int N> class devcb_line_dispatch_device : public device_t {
|
||||
public:
|
||||
devcb_line_dispatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, DEVCB_LINE_DISPATCH_2, "DEVCB_LINE_DISPATCH_2", tag, owner, clock, "devcb_line_dispatch_2", __FILE__) { }
|
||||
|
||||
|
||||
void init_fwd() {
|
||||
for(auto & elem : fwd_cb)
|
||||
elem = new devcb_write_line(*this);
|
||||
|
@ -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)
|
||||
@ -369,7 +369,7 @@ public:
|
||||
const char *no_plugin() const { return value(OPTION_NO_PLUGIN); }
|
||||
|
||||
const char *language() const { return value(OPTION_LANGUAGE); }
|
||||
|
||||
|
||||
// cache frequently used options in members
|
||||
void update_cached_options();
|
||||
|
||||
|
@ -258,7 +258,7 @@ void running_machine::start()
|
||||
m_render->resolve_tags();
|
||||
|
||||
manager().create_custom(*this);
|
||||
|
||||
|
||||
// register callbacks for the devices, then start them
|
||||
add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(running_machine::reset_all_devices), this));
|
||||
add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(running_machine::stop_all_devices), this));
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
|
||||
|
||||
bool is_selected_driver = core_stricmp(gamedrv.name,options.system_name())==0;
|
||||
// intialize slot devices - make sure that any required devices have been allocated
|
||||
|
||||
|
||||
for (device_slot_interface &slot : slot_interface_iterator(root_device()))
|
||||
{
|
||||
device_t &owner = slot.device();
|
||||
|
@ -420,11 +420,11 @@ float render_font::string_width(float height, float aspect, const char *string)
|
||||
const char *ends = string + strlen(string);
|
||||
const char *s = string;
|
||||
unicode_char schar;
|
||||
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
@ -950,12 +950,12 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_argb3
|
||||
const char *ends = origs + strlen(origs);
|
||||
const char *s = origs;
|
||||
unicode_char schar;
|
||||
|
||||
|
||||
// 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,8 +1124,8 @@ 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,8 +1285,8 @@ 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;
|
||||
|
||||
|
@ -1449,7 +1449,7 @@ rom_load_manager::rom_load_manager(running_machine &machine)
|
||||
: m_machine(machine)
|
||||
{
|
||||
/* figure out which BIOS we are using */
|
||||
|
||||
|
||||
for (device_t &device : device_iterator(machine.config().root_device()))
|
||||
{
|
||||
if (device.rom_region())
|
||||
|
@ -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;
|
||||
};
|
||||
@ -73,27 +73,27 @@ public:
|
||||
ui_manager(running_machine &machine) : m_machine(machine),m_use_natural_keyboard(false),m_show_timecode_counter(false),m_show_timecode_total(false) { }
|
||||
|
||||
virtual ~ui_manager() { }
|
||||
|
||||
|
||||
virtual void set_startup_text(const char *text, bool force) { }
|
||||
|
||||
|
||||
virtual bool is_menu_active() { return false; }
|
||||
|
||||
|
||||
bool use_natural_keyboard() const { return m_use_natural_keyboard; }
|
||||
|
||||
|
||||
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; }
|
||||
|
||||
virtual void popup_time_string(int seconds, std::string message) { }
|
||||
bool show_timecode_total() const { return m_show_timecode_total; }
|
||||
|
||||
virtual void popup_time_string(int seconds, std::string message) { }
|
||||
|
||||
virtual void image_display(const device_type &type, device_image_interface *image) { }
|
||||
|
||||
|
||||
template <typename Format, typename... Params> void popup_time(int seconds, Format &&fmt, Params &&... args);
|
||||
|
||||
|
||||
protected:
|
||||
// instance variables
|
||||
running_machine & m_machine;
|
||||
running_machine & m_machine;
|
||||
bool m_use_natural_keyboard;
|
||||
bool m_show_timecode_counter;
|
||||
bool m_show_timecode_total;
|
||||
|
@ -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
|
||||
|
@ -513,7 +513,7 @@ void info_xml_creator::output_bios()
|
||||
// skip if no ROMs
|
||||
if (m_drivlist.driver().rom == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
// first determine the default BIOS name
|
||||
std::string defaultname;
|
||||
for (const rom_entry *rom = m_drivlist.driver().rom; !ROMENTRY_ISEND(rom); rom++)
|
||||
@ -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
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CTRL_P1,
|
||||
CTRL_P2,
|
||||
CTRL_P3,
|
||||
CTRL_P4,
|
||||
CTRL_P5,
|
||||
CTRL_P6,
|
||||
CTRL_P7,
|
||||
CTRL_P8,
|
||||
// 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,
|
||||
CTRL_P9,
|
||||
CTRL_P10,
|
||||
CTRL_PCOUNT
|
||||
};
|
||||
|
||||
// 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];
|
||||
|
||||
memset(&control_info, 0, sizeof(control_info));
|
||||
|
||||
// tracking info as we iterate
|
||||
int nplayer = 0;
|
||||
int ncoin = 0;
|
||||
bool service = false;
|
||||
bool tilt = false;
|
||||
CTRL_PCOUNT
|
||||
};
|
||||
|
||||
// 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())
|
||||
{
|
||||
// directions
|
||||
const UINT8 DIR_UP = 0x01;
|
||||
const UINT8 DIR_DOWN = 0x02;
|
||||
const UINT8 DIR_LEFT = 0x04;
|
||||
const UINT8 DIR_RIGHT = 0x08;
|
||||
|
||||
// track the highest player number
|
||||
if (nplayer < field.player() + 1)
|
||||
nplayer = field.player() + 1;
|
||||
// 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];
|
||||
|
||||
// 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_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;
|
||||
|
||||
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_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_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_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;
|
||||
|
||||
// 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:
|
||||
memset(&control_info, 0, sizeof(control_info));
|
||||
|
||||
// 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())
|
||||
{
|
||||
// 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;
|
||||
|
||||
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;
|
||||
|
||||
// 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_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_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_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;
|
||||
|
||||
// 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:
|
||||
case IPT_COIN9:
|
||||
case IPT_COIN10:
|
||||
case IPT_COIN11:
|
||||
case IPT_COIN12:
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
ncoin = MAX(ncoin, field.type() - IPT_COIN1 + 1);
|
||||
break;
|
||||
|
||||
// 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);
|
||||
// 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;
|
||||
|
||||
memset(&control_info[i * CTRL_COUNT], 0, sizeof(control_info[0]));
|
||||
fix_done = TRUE;
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
||||
// 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");
|
||||
// additional types
|
||||
case IPT_SERVICE:
|
||||
service = true;
|
||||
break;
|
||||
|
||||
// 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, "\t\t</input>\n");
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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");
|
||||
|
||||
// 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, "\t\t</input>\n");
|
||||
}
|
||||
|
||||
|
||||
@ -1445,10 +1444,10 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
|
||||
// is this device available as media switch?
|
||||
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();
|
||||
|
||||
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());
|
||||
|
||||
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, ",");
|
||||
}
|
||||
}
|
||||
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");
|
||||
|
||||
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, ",");
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
const std::string sep = " ";
|
||||
|
||||
std::ostringstream ss;
|
||||
bool first = true;
|
||||
int nargs = lua_gettop(L);
|
||||
|
||||
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;
|
||||
}
|
||||
const std::string sep = " ";
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
@ -265,17 +265,17 @@ void mame_machine_manager::reset()
|
||||
// setup autoboot if needed
|
||||
m_autoboot_timer->adjust(attotime(options().autoboot_delay(),0),0);
|
||||
}
|
||||
|
||||
|
||||
ui_manager* mame_machine_manager::create_ui(running_machine& machine)
|
||||
{
|
||||
m_ui = std::make_unique<mame_ui_manager>(machine);
|
||||
m_ui->init();
|
||||
|
||||
machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(mame_machine_manager::reset), this));
|
||||
|
||||
|
||||
// start the inifile manager
|
||||
m_inifile = std::make_unique<inifile_manager>(machine, m_ui->options());
|
||||
|
||||
|
||||
m_ui->set_startup_text("Initializing...", true);
|
||||
|
||||
// allocate autoboot timer
|
||||
@ -290,8 +290,8 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine)
|
||||
return m_ui.get();
|
||||
}
|
||||
|
||||
void mame_machine_manager::create_custom(running_machine& machine)
|
||||
{
|
||||
void mame_machine_manager::create_custom(running_machine& machine)
|
||||
{
|
||||
// set up the cheat engine
|
||||
m_cheat = std::make_unique<cheat_manager>(machine);
|
||||
}
|
||||
@ -337,4 +337,4 @@ void emulator_info::periodic_check()
|
||||
bool emulator_info::frame_hook()
|
||||
{
|
||||
return mame_machine_manager::instance()->lua()->frame_hook();
|
||||
}
|
||||
}
|
||||
|
@ -42,16 +42,16 @@ public:
|
||||
lua_engine *lua() { return m_lua; }
|
||||
|
||||
virtual void update_machine() override;
|
||||
|
||||
|
||||
void reset();
|
||||
TIMER_CALLBACK_MEMBER(autoboot_callback);
|
||||
|
||||
|
||||
virtual ui_manager* create_ui(running_machine& machine) override;
|
||||
|
||||
virtual void create_custom(running_machine& machine) override;
|
||||
|
||||
virtual void ui_initialize(running_machine& machine) override;
|
||||
|
||||
|
||||
/* execute as configured by the OPTION_SYSTEMNAME option on the specified options */
|
||||
int execute();
|
||||
void start_luaengine();
|
||||
|
@ -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)
|
||||
|
@ -83,7 +83,7 @@ void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist
|
||||
osd_file::error filerr;
|
||||
std::string tmp_path;
|
||||
util::core_file::ptr tmp_file;
|
||||
// attempt to open the file for writing but *without* create
|
||||
// attempt to open the file for writing but *without* create
|
||||
filerr = util::zippath_fopen(filename.c_str(), OPEN_FLAG_READ | OPEN_FLAG_WRITE, tmp_file, tmp_path);
|
||||
if(filerr == osd_file::error::NONE)
|
||||
tmp_file.reset();
|
||||
@ -167,4 +167,4 @@ void ui_menu_control_floppy_image::handle()
|
||||
default:
|
||||
ui_menu_control_device_image::handle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,4 +33,4 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
#endif /* __UI_FLOPPY_IMAGE_H__ */
|
||||
#endif /* __UI_FLOPPY_IMAGE_H__ */
|
||||
|
@ -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;
|
||||
@ -856,7 +856,7 @@ void ui_menu_machine_configure::setup_bios()
|
||||
for (const rom_entry *rom = m_drv->rom; !ROMENTRY_ISEND(rom); ++rom)
|
||||
if (ROMENTRY_ISDEFAULT_BIOS(rom))
|
||||
default_name = ROM_GETNAME(rom);
|
||||
|
||||
|
||||
int bios_count = 0;
|
||||
for (const rom_entry *rom = m_drv->rom; !ROMENTRY_ISEND(rom); ++rom)
|
||||
{
|
||||
|
@ -1019,14 +1019,14 @@ void ui_menu_select_game::inkey_select(const ui_menu_event *m_event)
|
||||
// special case for configure options
|
||||
if ((FPTR)driver == CONF_OPTS)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(ui(), container));
|
||||
|
||||
|
||||
// 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__ */
|
||||
|
@ -249,18 +249,18 @@ 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)
|
||||
: 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)
|
||||
{
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -2717,7 +2717,7 @@ void mame_ui_manager::popup_time_string(int seconds, std::string message)
|
||||
messagebox_backcolor = UI_BACKGROUND_COLOR;
|
||||
|
||||
// set a timer
|
||||
m_popup_text_end = osd_ticks() + osd_ticks_per_second() * seconds;
|
||||
m_popup_text_end = osd_ticks() + osd_ticks_per_second() * seconds;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
@ -169,7 +169,7 @@ public:
|
||||
// draw an outlined box with given line color and filled with a texture
|
||||
void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
|
||||
virtual void popup_time_string(int seconds, std::string message) override;
|
||||
|
||||
|
||||
virtual void image_display(const device_type &type, device_image_interface *image) override;
|
||||
private:
|
||||
// instance variables
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user