Previous 199869 Revisions Next

r33688 Friday 5th December, 2014 at 10:11:20 UTC by David Haywood
Merge pull request #66 from p1pkin/naomi#6

naomi.c: use full M4 PIC16 dumps instead of partial "readouts", add handmade 'dumps' with master keys for not yet properly dumped PICs [rtw, MetalliC]
[hash]nes.xml
[src/emu/cpu/arc]arc.h
[src/emu/cpu/pps4]pps4.c pps4.h pps4dasm.c
[src/lib/formats]victor9k_dsk.c victor9k_dsk.h
[src/mame]mame.lst
[src/mame/drivers]gts1.c lindbergh.c
[src/mame/video]btime.c
[src/mess]mess.lst
[src/mess/drivers]cnsector.c comp4.c gamate.c mc1000.c megadriv.c merlin.c ngen.c simon.c starwbc.c stopthie.c ticalc1x.c
[src/mess/layout]cnsector.lay starwbc.lay ti1270.lay ti30.lay tisr16.lay wizatron.lay
[src/mess/video]maria.c

trunk/hash/nes.xml
r242199r242200
6096060960      </part>
6096160961   </software>
6096260962
60963<!-- Other two games forming the whole F-646 HIGH K Power Sports 4-in-1 were identical to original releases, so went undumped apparently -->
60964   <software name="goal5" cloneof="tecmowc">
60965      <description>Goal 5 Soccer (Ripped from F-646 HIGH K Power Sports 4-in-1)</description>
60966      <year>19??</year>
60967      <publisher>&lt;unknown&gt;</publisher>
60968      <part name="cart" interface="nes_cart">
60969         <feature name="slot" value="txrom" />
60970         <dataarea name="chr" size="65536">
60971            <rom name="goal 5 soccer (unl)[p1][!].chr" size="65536" crc="21e379ee" sha1="4401033269a88d484e6768550f152d3f0a204fd3" offset="00000" status="baddump" />
60972         </dataarea>
60973         <dataarea name="prg" size="65536">
60974            <rom name="goal 5 soccer (unl)[p1][!].prg" size="65536" crc="04005d22" sha1="74069b62dff0bc05708875cfc7693cb6fadfcd8a" offset="00000" status="baddump" />
60975         </dataarea>
60976      </part>
60977   </software>
60978
60979   <software name="hstar2" cloneof="f1hero2">
60980      <description>High Way Star II (Ripped from F-646 HIGH K Power Sports 4-in-1)</description>
60981      <year>19??</year>
60982      <publisher>&lt;unknown&gt;</publisher>
60983      <part name="cart" interface="nes_cart">
60984         <feature name="slot" value="txrom" />
60985         <dataarea name="chr" size="131072">
60986            <rom name="highway star ii (unl)[p1][!].chr" size="131072" crc="8fc24316" sha1="ed6bc1c4f5964b9dfc5146d35cfeebc844b6d488" offset="00000" status="baddump" />
60987         </dataarea>
60988         <dataarea name="prg" size="131072">
60989            <rom name="highway star ii (unl)[p1][!].prg" size="131072" crc="5a08b5c5" sha1="f7b317584fab6d62274021ff3dd3c7bd0d0a60f4" offset="00000" status="baddump" />
60990         </dataarea>
60991      </part>
60992   </software>
60993
6096360994   <software name="huoyansz">
6096460995      <description>Huo Yan Shi Zhe (Chi)</description>
6096560996      <year>19??</year>
r242199r242200
6109861129      </part>
6109961130   </software>
6110061131
61132   <software name="intcricka" cloneof="intcrick">
61133      <description>International Cricket (Pirate)</description>
61134      <year>200?</year>
61135      <publisher>&lt;pirate&gt;</publisher>
61136      <part name="cart" interface="nes_cart">
61137         <feature name="slot" value="txrom" />
61138         <dataarea name="chr" size="262144">
61139            <rom name="international cricket (unl).chr" size="262144" crc="75dcab42" sha1="72fb441639dca8a9afb60aa57cb896373033795b" offset="00000" status="baddump" />
61140         </dataarea>
61141         <dataarea name="prg" size="262144">
61142            <rom name="international cricket (unl).prg" size="262144" crc="ed2c3fa6" sha1="0b273dd380e0d36442d23c472c897ae8e04bb8e2" offset="00000" status="baddump" />
61143         </dataarea>
61144      </part>
61145   </software>
61146
61147<!-- the code has alse been modified to run as standalone -->
61148   <software name="intcrickb" cloneof="intcrick">
61149      <description>Brian Lara 2003 - International Cricket (Pirate, Alt, Ripped from Multicart)</description>
61150      <year>200?</year>
61151      <publisher>&lt;pirate&gt;</publisher>
61152      <part name="cart" interface="nes_cart">
61153         <feature name="slot" value="txrom" />
61154         <dataarea name="chr" size="262144">
61155            <rom name="international cricket (unl)(alt version)[f1].chr" size="262144" crc="a09bc9af" sha1="bb57acab0ba404521e06743488da396277b8ee38" offset="00000" status="baddump" />
61156         </dataarea>
61157         <dataarea name="prg" size="262144">
61158            <rom name="international cricket (unl)(alt version)[f1].prg" size="262144" crc="8bcb7111" sha1="188d02e77d126879419e76099288af88effb28a7" offset="00000" status="baddump" />
61159         </dataarea>
61160      </part>
61161   </software>
61162
6110161163   <software name="jgscs">
6110261164      <description>Jin Gwok Sei Chuen Saang (Chi)</description>
6110361165      <year>1990</year>
r242199r242200
7595376015      </part>
7595476016   </software>
7595576017
76018   <software name="mc_4fg">
76019      <description>Super 4-in-1 Fantasy Gun</description>
76020      <year>19??</year>
76021      <publisher>&lt;unknown&gt;</publisher>
76022      <part name="cart" interface="nes_cart">
76023         <feature name="slot" value="bmc_hik300" />
76024         <dataarea name="chr" size="65536">
76025            <rom name="super 4-in-1 fantasy gun [p1][!].chr" size="65536" crc="5516b3f9" sha1="bdbfef593273dd442aeaf38bb6c9b6dd80384c10" offset="00000" status="baddump" />
76026         </dataarea>
76027         <dataarea name="prg" size="131072">
76028            <rom name="super 4-in-1 fantasy gun [p1][!].prg" size="131072" crc="6fe4a699" sha1="82a65dabd598eff1154af48d17a45ccbb49cec4c" offset="00000" status="baddump" />
76029         </dataarea>
76030      </part>
76031   </software>
76032
7595676033   <software name="mc_4fk21" supported="no">
7595776034      <description>4 in 1 (FK23C8021)</description>
7595876035      <year>19??</year>
r242199r242200
7655076627      </part>
7655176628   </software>
7655276629
76630   <software name="mc_500" supported="no">
76631      <description>500 in 1</description>
76632      <year>19??</year>
76633      <publisher>&lt;pirate&gt;</publisher>
76634      <part name="cart" interface="nes_cart">
76635         <feature name="slot" value="bmc_hik300" />   <!-- mapper says 217 but it's not gc6in1 either! -->
76636         <dataarea name="chr" size="65536">
76637            <rom name="500-in-1 (anim splash, no rev, alt mapper)[p1][!].chr" size="65536" crc="25bdd64a" sha1="1f95eaf20fec9058b6917aa47dbdcec4b7a5b87d" offset="00000" status="baddump" />
76638         </dataarea>
76639         <dataarea name="prg" size="131072">
76640            <rom name="500-in-1 (anim splash, no rev, alt mapper)[p1][!].prg" size="131072" crc="23371b82" sha1="ca87f90300ed0f5cc66884cc994f05d9d888c3c2" offset="00000" status="baddump" />
76641         </dataarea>
76642      </part>
76643   </software>
76644
76645   <software name="mc_500a" supported="no">
76646      <description>500 in 1 (Alt)</description>
76647      <year>19??</year>
76648      <publisher>&lt;pirate&gt;</publisher>
76649      <part name="cart" interface="nes_cart">
76650         <feature name="slot" value="bmc_hik300" />   <!-- mapper says 217 but it's not gc6in1 either! -->
76651         <dataarea name="chr" size="65536">
76652            <rom name="500-in-1 (static splash, no rev, alt mapper)[p1][!].chr" size="65536" crc="e7dacb8a" sha1="ece1b9c7fd8be955a1df6c8505533b4fac194eeb" offset="00000" status="baddump" />
76653         </dataarea>
76654         <dataarea name="prg" size="131072">
76655            <rom name="500-in-1 (static splash, no rev, alt mapper)[p1][!].prg" size="131072" crc="ed2b09a7" sha1="68d1b5063a0126e9a07eba9be532276ba064f147" offset="00000" status="baddump" />
76656         </dataarea>
76657      </part>
76658   </software>
76659
7655376660   <software name="mc_50">
7655476661      <description>50 in 1</description>
7655576662      <year>19??</year>
r242199r242200
7676476871      </part>
7676576872   </software>
7676676873
76874   <software name="mc_6ky11" supported="partial">
76875      <description>Super 6-in-1 (KY-6011)</description>
76876      <year>19??</year>
76877      <publisher>&lt;unknown&gt;</publisher>
76878      <part name="cart" interface="nes_cart">
76879         <feature name="slot" value="fk23c" />
76880         <feature name="pcb" value="BMC-FK23C" />
76881         <dataarea name="chr" size="524288">
76882            <rom name="super 6-in-1 (ky-6011)[p1][!].chr" size="524288" crc="b1543694" sha1="c756a38ac84d8db59db39b60e37fbdfb8e74c180" offset="00000" status="baddump" />
76883         </dataarea>
76884         <dataarea name="prg" size="524288">
76885            <rom name="super 6-in-1 (ky-6011)[p1][!].prg" size="524288" crc="850a40cf" sha1="480b5ca7976955bc7cfc128d4303e5de2b419e41" offset="00000" status="baddump" />
76886         </dataarea>
76887      </part>
76888   </software>
76889
7676776890   <software name="mc_6m23" supported="no">
7676876891      <description>6 in 1 (MGC-023)</description>
7676976892      <year>19??</year>
r242199r242200
7740077523      </part>
7740177524   </software>
7740277525
77526   <software name="mc_9999a" supported="partial">
77527      <description>9999 in 1 (Alt)</description>
77528      <year>19??</year>
77529      <publisher>&lt;pirate&gt;</publisher>
77530      <part name="cart" interface="nes_cart">
77531         <feature name="slot" value="bmc_hik300" />
77532         <feature name="pcb" value="BMC-SUPERHIK-300IN1" />
77533         <dataarea name="chr" size="65536">
77534            <rom name="9999-in-1 (anim splash, rev 11)[p2][!].chr" size="65536" crc="5ee1cd6e" sha1="f896273a27a8efb92e2fdc4e95c30405d411d4df" offset="00000" status="baddump" />
77535         </dataarea>
77536         <dataarea name="prg" size="131072">
77537            <rom name="9999-in-1 (anim splash, rev 11)[p2][!].prg" size="131072" crc="183fdacb" sha1="350d53910c4bb2036cb7bfd741bc314b15f82cf5" offset="00000" status="baddump" />
77538         </dataarea>
77539      </part>
77540   </software>
77541
77542   <software name="mc_9999b" supported="partial">
77543      <description>9999 in 1 (Alt 2)</description>
77544      <year>19??</year>
77545      <publisher>&lt;pirate&gt;</publisher>
77546      <part name="cart" interface="nes_cart">
77547         <feature name="slot" value="bmc_hik300" />
77548         <feature name="pcb" value="BMC-SUPERHIK-300IN1" />
77549         <dataarea name="chr" size="65536">
77550            <rom name="9999-in-1 (anim splash, rev 12)[p2][!].chr" size="65536" crc="f3ba9c7c" sha1="8e52170e032c2462666e945116f03d973b2a66e1" offset="00000" status="baddump" />
77551         </dataarea>
77552         <dataarea name="prg" size="131072">
77553            <rom name="9999-in-1 (anim splash, rev 12)[p2][!].prg" size="131072" crc="33202b3e" sha1="a245fb8a895b4315764bab59c82658d849fd41dd" offset="00000" status="baddump" />
77554         </dataarea>
77555      </part>
77556   </software>
77557
7740377558   <software name="mc_9x7">
7740477559      <description>9999999 in 1</description>
7740577560      <year>19??</year>
r242199r242200
7741677571      </part>
7741777572   </software>
7741877573
77574   <software name="mc_9x7a" supported="no">
77575      <description>9999999 in 1 (Alt)</description>
77576      <year>19??</year>
77577      <publisher>&lt;pirate&gt;</publisher>
77578      <part name="cart" interface="nes_cart">
77579         <feature name="slot" value="bmc_hik300" />   <!-- mapper says 217 but it's not gc6in1 either! -->
77580         <dataarea name="chr" size="65536">
77581            <rom name="9999999-in-1 (static splash, no rev, alt mapper)[p1][!].chr" size="65536" crc="25bdd64a" sha1="1f95eaf20fec9058b6917aa47dbdcec4b7a5b87d" offset="00000" status="baddump" />
77582         </dataarea>
77583         <dataarea name="prg" size="131072">
77584            <rom name="9999999-in-1 (static splash, no rev, alt mapper)[p1][!].prg" size="131072" crc="ed2b09a7" sha1="68d1b5063a0126e9a07eba9be532276ba064f147" offset="00000" status="baddump" />
77585         </dataarea>
77586      </part>
77587   </software>
77588
77589   <software name="mc_9x7b">
77590      <description>9999999 in 1 (Alt 2)</description>
77591      <year>19??</year>
77592      <publisher>&lt;pirate&gt;</publisher>
77593      <part name="cart" interface="nes_cart">
77594         <feature name="slot" value="bmc_hik300" />
77595         <feature name="pcb" value="BMC-SUPERHIK-300IN1" />
77596         <dataarea name="chr" size="65536">
77597            <rom name="9999999-in-1 (static splash, rev 10)[p1].chr" size="65536" crc="9b6e8be7" sha1="4c53a3d5e510c4355041b9ad88f1e633ce85f916" offset="00000" status="baddump" />
77598         </dataarea>
77599         <dataarea name="prg" size="131072">
77600            <rom name="9999999-in-1 (static splash, rev 10)[p1].prg" size="131072" crc="00a0d43b" sha1="88f4b987bedfd6c8d5131a2abab26b185b052a21" offset="00000" status="baddump" />
77601         </dataarea>
77602      </part>
77603   </software>
77604
7741977605   <software name="mc_brain" supported="no">
7742077606      <description>Brain Series 13 in 1</description>
7742177607      <year>19??</year>
r242199r242200
7831678502      </part>
7831778503   </software>
7831878504
78505   <software name="mc_sh300o" cloneof="mc_sh300">
78506      <description>Super HIK 300 in 1 1993</description>
78507      <year>19??</year>
78508      <publisher>&lt;pirate&gt;</publisher>
78509      <part name="cart" interface="nes_cart">
78510         <feature name="slot" value="bmc_hik300" />
78511         <feature name="pcb" value="BMC-SUPERHIK-300IN1" />
78512         <dataarea name="chr" size="65536">
78513            <rom name="1993 super hik 300-in-1 (anim splash, protected, no rev)[p1][!].chr" size="65536" crc="4b5299dd" sha1="5da2c66a289e65ef3c4af25d23b5cd5739762616" offset="00000" status="baddump" />
78514         </dataarea>
78515         <dataarea name="prg" size="131072">
78516            <rom name="1993 super hik 300-in-1 (anim splash, protected, no rev)[p1][!].prg" size="131072" crc="65d87329" sha1="b75f12fda544d30dafb477908acd9d29b2af91f0" offset="00000" status="baddump" />
78517         </dataarea>
78518      </part>
78519   </software>
78520
7831978521   <software name="mc_sh4a">
7832078522      <description>Super HIK 4 in 1 (S4020)</description>
7832178523      <year>19??</year>
r242199r242200
7898179183         <feature name="slot" value="onebus" />
7898279184         <feature name="pcb" value="UNL-OneBus" />
7898379185         <dataarea name="prg" size="4194304">
78984            <rom name="ic1.prg" size="4194304" crc="de76f71f" sha1="ff6b37a76c6463af7ae901918fc008b4a2863951" offset="0" status="baddump" />
79186            <rom name="ic1.prg" size="4194304" crc="de76f71f" sha1="ff6b37a76c6463af7ae901918fc008b4a2863951" offset="0" />
7898579187         </dataarea>
7898679188         <!-- 8k VRAM on cartridge -->
7898779189         <dataarea name="vram" size="8192">
r242199r242200
7899779199         <feature name="slot" value="onebus" />
7899879200         <feature name="pcb" value="UNL-OneBus" />
7899979201         <dataarea name="prg" size="4194304">
79000            <rom name="ic1_ver2.prg" size="4194304" crc="b97a0dc7" sha1="bace32d73184df914113de5336e29a7a6f4c03fa" offset="0" status="baddump" />
79202            <rom name="ic1_ver2.prg" size="4194304" crc="b97a0dc7" sha1="bace32d73184df914113de5336e29a7a6f4c03fa" offset="0" />
7900179203         </dataarea>
7900279204         <!-- 8k VRAM on cartridge -->
7900379205         <dataarea name="vram" size="8192">
r242199r242200
7900579207      </part>
7900679208   </software>
7900779209
79210<!-- CoolBoy AEF-390 8bit Console, B8VPCBVer03 20130703 0401E2015897A -->
79211   <software name="mc_8x6cb" supported="no">
79212      <description>888888 in 1 (Coolboy AEF-390)</description>
79213      <year>19??</year>
79214      <publisher>&lt;unknown&gt;</publisher>
79215      <part name="cart" interface="nes_cart">
79216         <feature name="slot" value="onebus" />
79217         <feature name="pcb" value="UNL-OneBus" />
79218         <dataarea name="prg" size="4194304">
79219            <rom name="888888-in-1 (coolboy aef-390 8bit console, b8vpcbver03 20130703 0401e2015897a)(unl)[u][!].prg" size="4194304" crc="ca4bd948" sha1="cfd6c0b03bb432de43d070100031b223c9ee7496" offset="00000" status="baddump" />
79220         </dataarea>
79221         <!-- 8k VRAM on cartridge -->
79222         <dataarea name="vram" size="8192">
79223         </dataarea>
79224      </part>
79225   </software>
7900879226
79227<!-- PXP2 8Bit Slim Station -->
79228   <software name="mc_9x6ss" supported="no">
79229      <description>999999 in 1 (PXP2 Slim Station)</description>
79230      <year>19??</year>
79231      <publisher>&lt;unknown&gt;</publisher>
79232      <part name="cart" interface="nes_cart">
79233         <feature name="slot" value="onebus" />
79234         <feature name="pcb" value="UNL-OneBus" />
79235         <dataarea name="prg" size="4194304">
79236            <rom name="s29gl032.u3" size="4194304" crc="9f4194e8" sha1="bd2a356aea56188ea78169095cbbe603d00e0063" offset="00000" />
79237         </dataarea>
79238         <!-- 8k VRAM on cartridge -->
79239         <dataarea name="vram" size="8192">
79240         </dataarea>
79241      </part>
79242   </software>
79243
79244
7900979245   <software name="mc_gx121" supported="no">
7901079246      <description>Games Xplosion 121 in 1</description>
7901179247      <year>19??</year>
trunk/src/emu/cpu/arc/arc.h
r242199r242200
5353   //     62 = Long Immediate Data Indicator
5454   //     63 = Short Immediate Data Indicator NOT Settings Flag
5555   UINT32 m_pc;
56   UINT32 m_r[64];
56   //UINT32 m_r[64];
5757
5858
5959   address_space *m_program;
trunk/src/emu/cpu/pps4/pps4.c
r242199r242200
2727 *
2828 *   Note: External clock should be divided by 18 (not implemented).
2929 *
30 *   Pinouts:
31 *              10660                               11660
32 *
33 *      +--------\  /--------+              +--------\  /--------+
34 *  1  [| DIB-3   ++  DIA-3  |]  42     1  [| DIO-4       DIO-3  |]  42
35 *  2 [-| DIA-2       DIB-4  |-] 41     2 [-| DIA-4       DIO-2  |-] 41
36 *  3  [| DIB-2       DIA-4  |]  40     3  [| DIA-3       DIO-1  |]  40
37 *  4 [-| DIA-1       NC     |-] 39     4 [-| DIA-2       Vdd    |-] 39
38 *  5  [| DIB-1       A/B-1  |]  38     5  [| DIA-1       A/B-1  |]  38
39 *  6 [-| Vdd         A/B-2  |-] 37     6 [-| I/O-5       A/B-2  |-] 37
40 *  7  [| I/D-5       A/B-3  |]  36     7  [| I/O-6       A/B-3  |]  36
41 *  8 [-| I/D-6       A/B-4  |-] 35     8 [-| I/O-7       A/B-4  |-] 35
42 *  9  [| I/D-7       A/B-5  |]  34     9  [| I/O-8       A/B-5  |]  34
43 * 10 [-| I/D-8       A/B-6  |-] 33    10 [-| I/O-1       A/B-6  |-] 33
44 * 11  [| I/D-1       A/B-7  |]  32    11  [| I/O-4       A/B-7  |]  32
45 * 12 [-| I/D-4       A/B-8  |-] 31    12 [-| I/O-2       A/B-8  |-] 31
46 * 13  [| I/D-2       A/B-9  |]  30    13  [| I/O-3       A/B-9  |]  30
47 * 14 [-| I/D-3       A/B-10 |-] 29    14 [-| W/IO        A/B-10 |-] 29
48 * 15  [| W/IO        A/B-11 |]  28    15  [| CLK ~B      A/B-11 |]  28
49 * 16 [-| CLK ~B      A/B-12 |-] 27    16 [-| CLK A       A/B-12 |-] 27
50 * 17  [| CLK A       NC     |]  26    17  [| VCLK        DO-4   |]  26
51 * 18 [-| PO          DO-3   |-] 25    18 [-| Xtal1       DO-3   |-] 25
52 * 19  [| SPO         DO-4   |]  24    19  [| Xtal2       DO-2   |]  24
53 * 20 [-| DO-2        NC     |-] 23    20 [-| Vss         DO-1   |-] 23
54 * 21  [| DO-1        Vss    |]  22    21  [| SPO         TC1-14 |]  22
55 *      +--------------------+              +--------------------+
56 *
3057 *****************************************************************************/
3158#include "emu.h"
3259#include "debugger.h"
r242199r242200
81108
82109/**
83110 * @brief pps4_device::ROP Read the next opcode (instruction)
84 * @return m_I
111 * The previous opcode mask (upper four bits) is set from the
112 * previous instruction. The new opcode is fetched and the
113 * program counter is incremented. The icount is decremented.
114 * @return m_I the next opcode
85115 */
86116inline UINT8 pps4_device::ROP()
87117{
r242199r242200
93123}
94124
95125/**
96 * @brief pps4_device::ARG Read the next argument (instrunction 2)
97 * @return m_I2
126 * @brief pps4_device::ARG Read the next argument (instruction 2)
127 * The byte at program counter is read from the unencrypted
128 * direct space. The program count is incremented and the
129 * icount is decremented.
130 * @return m_I2 the next argument
98131 */
99132inline UINT8 pps4_device::ARG()
100133{
r242199r242200
141174void pps4_device::iAD()
142175{
143176    m_A = m_A + M();
144    m_C = m_A >> 4;
177    m_C = (m_A >> 4) & 1;
145178    m_A = m_A & 15;
146179}
147180
r242199r242200
183216{
184217    m_A = m_A + M();
185218    m_C = m_A >> 4;
219    m_Skip = m_C;
186220    m_A = m_A & 15;
187    m_P = (m_P + m_C) & 0xFFF;
188221}
189222
190223/**
r242199r242200
205238{
206239    m_A = m_A + M() + m_C;
207240    m_C = m_A >> 4;
241    m_Skip = m_C;
208242    m_A = m_A & 15;
209    m_P = (m_P + m_C) & 0xFFF;
210243}
211244
212245/**
213 * @brief pps4_device::iAND Logical AND
214 * OPCODE     cycles  mnemonic
215 * -----------------------------
216 * 0000 1101  1 cyc   AND
217 *
218 * Symbolic equation
219 * -----------------------------
220 * A <- A & M
221 *
222 * The result of logical AND of accumulator and
223 * 4-bit contents of RAM currently addressed by
224 * B register replaces contents of accumulator.
225 */
226void pps4_device::iAND()
227{
228    m_A = m_A & M();
229}
230
231/**
232246 * @brief pps4_device::iADI Add immediate
233247 * OPCODE     cycles  mnemonic
234248 * -----------------------------
235 * 0110 xxxx  1 cyc   ADI #x
249 * 0110 xxxx  1 cyc   ADI x
236250 *
237251 * Symbolic equation
238252 * -----------------------------
r242199r242200
253267{
254268    const UINT8 imm = ~m_I & 15;
255269    m_A = m_A + imm;
256    m_P = m_P + (m_A > 15) ? 1 : 0;
270    m_Skip = (m_A >> 4) & 1;
257271    m_A = m_A & 15;
258    m_P = m_P & 0xFFF;
259272}
260273
261274/**
262275 * @brief pps4_device::iDC Decimal correction
263276 * OPCODE     cycles  mnemonic
264277 * -----------------------------
265 * 0110 0110  1 cyc   DC
278 * 0110 0101  1 cyc   DC
266279 *
267280 * Symbolic equation
268281 * -----------------------------
269 * A <- A + 1010b
282 * A <- A + 1010
270283 *
271284 * Decimal correction of accumulator.
272285 * Binary 1010 is added to the contents of the accumulator.
r242199r242200
279292}
280293
281294/**
295 * @brief pps4_device::iAND Logical AND
296 * OPCODE     cycles  mnemonic
297 * -----------------------------
298 * 0000 1101  1 cyc   AND
299 *
300 * Symbolic equation
301 * -----------------------------
302 * A <- A & M
303 *
304 * The result of logical AND of accumulator and
305 * 4-bit contents of RAM currently addressed by
306 * B register replaces contents of accumulator.
307 */
308void pps4_device::iAND()
309{
310    m_A = m_A & M();
311}
312
313/**
282314 * @brief pps4_device::iOR Logical OR
283315 * OPCODE     cycles  mnemonic
284316 * -----------------------------
r242199r242200
288320 * -----------------------------
289321 * A <- A | M
290322 *
291 * The result of logical OIR of accumulator and
323 * The result of logical OR of accumulator and
292324 * 4-bit contents of RAM currently addressed by
293325 * B register replaces contents of accumulator.
294326 */
r242199r242200
332364 */
333365void pps4_device::iCOMP()
334366{
335    m_A = ~m_A & 15;
367    m_A = m_A ^ 15;
336368}
337369
338370/**
r242199r242200
390422 * @brief pps4_device::iRF1 Reset flip-flop FF1
391423 * OPCODE     cycles  mnemonic
392424 * -----------------------------
393 * 0010 0100  1 cyc   RF1
425 * 0010 0110  1 cyc   RF1
394426 *
395427 * Symbolic equation
396428 * -----------------------------
r242199r242200
441473 * @brief pps4_device::iLD Load accumulator from memory
442474 * OPCODE     cycles  mnemonic
443475 * -----------------------------
444 * 0011 0xxx  1 cyc   LDx
476 * 0011 0xxx  1 cyc   LD x
445477 *
446478 * Symbolic equation
447479 * -----------------------------
r242199r242200
458490 */
459491void pps4_device::iLD()
460492{
461    const UINT16 imm = ~m_I & 7;
493    const UINT16 i3c = ~m_I & 7;
462494    m_A = M();
463    m_B = m_B ^ (imm << 4);
495    m_B = m_B ^ (i3c << 4);
464496}
465497
466498/**
467499 * @brief pps4_device::iEX Exchange accumulator and memory
468500 * OPCODE     cycles  mnemonic
469501 * -----------------------------
470 * 0011 1xxx  1 cyc   EXx
502 * 0011 1xxx  1 cyc   EX x
471503 *
472504 * Symbolic equation
473505 * -----------------------------
r242199r242200
481513 */
482514void pps4_device::iEX()
483515{
484    const UINT16 imm = ~m_I & 7;
516    const UINT16 i3c = ~m_I & 7;
485517    const UINT8 mem = M();
486518    W(m_A);
487519    m_A = mem;
488    m_B = m_B ^ (imm << 4);
520    m_B = m_B ^ (i3c << 4);
489521}
490522
491523/**
r242199r242200
510542 */
511543void pps4_device::iEXD()
512544{
513    const UINT8 imm = ~m_I & 7;
545    const UINT8 i3c = ~m_I & 7;
514546    const UINT8 mem = M();
515547    UINT8 bl = m_B & 15;
516548    W(m_A);
517549    m_A = mem;
518    m_B = m_B ^ (imm << 4);
550    m_B = m_B ^ (i3c << 4);
551    // if decrement BL wraps to 1111b
519552    if (0 == bl) {
520        // decrement BL wraps to 1111b
521553        bl = 15;
522        m_P = (m_P + 1) & 0xFFF;
554        m_Skip = 1;
523555    } else {
524        // decrement BL
525556        bl = bl - 1;
526557    }
527558    m_B = (m_B & ~15) | bl;
r242199r242200
550581{
551582    // previous LDI instruction?
552583    if (0x70 == m_Ip) {
553        LOG(("%s: skip prev:%02x\n", __FUNCTION__, m_Ip));
584        LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I));
554585        return;
555586    }
556587    m_A = ~m_I & 15;
r242199r242200
578609 * @brief pps4_device::iLXA
579610 * OPCODE     cycles  mnemonic
580611 * -----------------------------
581 * 0001 1011  1 cyc   LAX
612 * 0001 1011  1 cyc   LXA
582613 *
583614 * Symbolic equation
584615 * -----------------------------
r242199r242200
632663 * @brief pps4_device::iLBUA
633664 * OPCODE     cycles  mnemonic
634665 * -----------------------------
635 * 0001 0000  1 cyc   LBUA
666 * 0000 0100  1 cyc   LBUA
636667 *
637668 * Symbolic equation
638669 * -----------------------------
r242199r242200
686717void pps4_device::iXBMX()
687718{
688719    // swap X and BM
689    UINT8 bm = (m_B >> 4) & 15;
720    const UINT8 bm = (m_B >> 4) & 15;
690721    m_B = (m_B & ~(15 << 4)) | (m_X << 4);
691722    m_X = bm;
692723}
r242199r242200
755786 */
756787void pps4_device::iCYS()
757788{
758    const UINT16 sa = (m_SA >> 4) | (m_A << 12);
789    const UINT16 sa = (m_SA >> 4) | (m_A << 8);
759790    m_A = m_SA & 15;
760791    m_SA = sa;
761792}
r242199r242200
764795 * @brief pps4_device::iLB
765796 * OPCODE     cycles  mnemonic
766797 * -----------------------------
767 * 1100 0000  2 cyc    LB
798 * 1100 xxxx  2 cyc    LB x
768799 *
769800 * Symbolic equation
770801 * -----------------------------
r242199r242200
797828{
798829    // previous LB or LBL instruction?
799830    if (0xc0 == m_Ip|| 0x00 == m_Ip) {
800        LOG(("%s: skip prev:%02X\n", __FUNCTION__, m_Ip));
831        LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I));
801832        return;
802833    }
803834    m_SB = m_SA;
804835    m_SA = (m_P + 1) & 0xFFF;
805    m_P = (3 << 8) | (m_I & 15);
836    m_P = (3 << 6) | (m_I & 15);
806837    m_B = ~ARG() & 255;
807838    m_P = m_SA;
808839    // swap SA and SB
r242199r242200
836867 */
837868void pps4_device::iLBL()
838869{
870    const UINT8 i8 = ~ARG() & 255;
839871    // previous LB or LBL instruction?
840872    if (0xc0 == m_Ip || 0x00 == m_Ip) {
841        LOG(("%s: skip prev:%02X\n", __FUNCTION__, m_Ip));
873        LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I));
842874        return;
843875    }
844    m_B = ~ARG() & 255;
876    m_B = i8;
845877}
846878
847879/**
r242199r242200
865897    bl = (bl + 1) & 15;
866898    if (0 == bl) {
867899        LOG(("%s: skip BL=%x\n", __FUNCTION__, bl));
868        m_P = (m_P + 1) & 0xFFF;
900        m_Skip = 1;
869901    }
870902    m_B = (m_B & ~15) | bl;
871903}
r242199r242200
891923    bl = (bl - 1) & 15;
892924    if (15 == bl) {
893925        LOG(("%s: skip BL=%x\n", __FUNCTION__, bl));
894        m_P = (m_P + 1) & 0xFFF;
926        m_Skip = 1;
895927    }
896928    m_B = (m_B & ~15) | bl;
897929}
r242199r242200
900932 * @brief pps4_device::iT Transfer
901933 * OPCODE     cycles  mnemonic
902934 * -----------------------------
903 * 10xx xxxx  1 cyc    T *
935 * 10xx xxxx  1 cyc    T *xx
904936 *
905937 * Symbolic equation
906938 * -----------------------------
r242199r242200
922954 * @brief pps4_device::iTM Transfer and mark indirect
923955 * OPCODE     cycles  mnemonic
924956 * -----------------------------
925 * 11xx xxxx  2 cyc    TM *
957 * 11xx xxxx  2 cyc    TM x
926958 * yyyy yyyy  from page 3
927959 *
928960 * Symbolic equation
r242199r242200
947979{
948980    m_SB = m_SA;
949981    m_SA = m_P;
950    m_P = 3 << 6;
951    m_P = m_P | (m_I & 63);
952    ARG();
953    m_P = 1 << 8;
954    m_P |= m_I2;
982    m_P = (3 << 6) | (m_I & 63);
983    m_I2 = ARG();
984    m_P = (1 << 8) | m_I2;
955985}
956986
957987/**
958988 * @brief pps4_device::iTL Transfer long
959989 * OPCODE     cycles  mnemonic
960990 * -----------------------------
961 * 0101 xxxx  2 cyc    TL *
991 * 0101 xxxx  2 cyc    TL xyy
962992 * yyyy yyyy
963993 *
964994 * Symbolic equation
r242199r242200
9731003 */
9741004void pps4_device::iTL()
9751005{
976    ARG();
977    m_P = (m_I & 15) << 8;
978    m_P = m_P | m_I2;
1006    m_I2 = ARG();
1007    m_P = ((m_I & 15) << 8) | m_I2;
9791008}
9801009
9811010/**
9821011 * @brief pps4_device::iTML Transfer and mark long
9831012 * OPCODE     cycles  mnemonic
9841013 * -----------------------------
985 * 0101 xxxx  2 cyc    TML *
1014 * 0101 xxxx  2 cyc    TML xyy
9861015 * yyyy yyyy
9871016 *
9881017 * Symbolic equation
r242199r242200
9991028 */
10001029void pps4_device::iTML()
10011030{
1002    ARG();
1031    m_I2 = ARG();
10031032    m_SB = m_SA;
10041033    m_SA = m_P;
1005    m_P = (m_I & 15) << 8;
1006    m_P = m_P | m_I2;
1034    m_P = ((m_I & 15) << 8) | m_I2;
10071035}
10081036
10091037/**
r242199r242200
10201048 */
10211049void pps4_device::iSKC()
10221050{
1023    m_P = m_P + m_C;
1024    m_P = m_P & 0xFFF;
1051    m_Skip = m_C;
10251052}
10261053
10271054/**
r242199r242200
10381065 */
10391066void pps4_device::iSKZ()
10401067{
1041    m_P = m_P + (0 == m_A) ? 1 : 0;
1042    m_P = m_P & 0xFFF;
1068    m_Skip = (0 == m_A) ? 1 : 0;
10431069}
10441070
10451071/**
r242199r242200
10581084 */
10591085void pps4_device::iSKBI()
10601086{
1061    const unsigned imm = m_I & 15;
1062    m_P = m_P + (imm == (m_B & 15)) ? 1 : 0;
1063    m_P = m_P & 0xFFF;
1087    const UINT8 i4 = m_I & 15;
1088    const UINT8 bl = m_B & 15;
1089    m_Skip = bl == i4 ? 1 : 0;
10641090}
10651091
10661092/**
r242199r242200
10751101 */
10761102void pps4_device::iSKF1()
10771103{
1078    m_P = m_P + m_FF1;
1079    m_P = m_P & 0xFFF;
1104    m_Skip = m_FF1;
10801105}
10811106
10821107/**
r242199r242200
10911116 */
10921117void pps4_device::iSKF2()
10931118{
1094    m_P = m_P + m_FF2;
1095    m_P = m_P & 0xFFF;
1119    m_Skip = m_FF2;
10961120}
10971121
10981122/**
10991123 * @brief pps4_device::iRTN Return
11001124 * OPCODE     cycles  mnemonic
11011125 * -----------------------------
1102 * 0000 0101  1 cyc    RET
1126 * 0000 0101  1 cyc    RTN
11031127 *
11041128 * Symbolic equation
11051129 * -----------------------------
r242199r242200
11111135 */
11121136void pps4_device::iRTN()
11131137{
1114    m_P = m_SA;
1138    m_P = m_SA & 0xFFF;
11151139    // swap SA and SB
11161140    m_SA ^= m_SB;
11171141    m_SB ^= m_SA;
r242199r242200
11221146 * @brief pps4_device::iRTN Return
11231147 * OPCODE     cycles  mnemonic
11241148 * -----------------------------
1125 * 0000 0111  1 cyc    RETSK
1149 * 0000 0111  1 cyc    RTNSK
11261150 *
11271151 * Symbolic equation
11281152 * -----------------------------
11291153 * P <- SA, SA <-> SB
11301154 * P <- P + 1
11311155 *
1132 * Same as RTN expect the first ROM word encountered
1156 * Same as RTN except the first ROM word encountered
11331157 * after the return from subroutine is skipped.
11341158 */
11351159void pps4_device::iRTNSK()
11361160{
1137    m_P = m_SA;
1138    ROP();      // ignored
1139    m_I = 0;    // avoid LB/LBL or LDI skipping
1161    m_P = m_SA & 0xFFF;
11401162    // swap SA and SB
11411163    m_SA ^= m_SB;
11421164    m_SB ^= m_SA;
11431165    m_SA ^= m_SB;
1144    m_P = m_P & 0xFFF;
1166    m_Skip = 1; // next opcode is ignored
11451167}
11461168
11471169/**
11481170 * @brief pps4_device::IOL
11491171 * OPCODE     cycles  mnemonic
11501172 * -----------------------------
1151 * 0001 1100  2 cyc    IOL
1173 * 0001 1100  2 cyc    IOL yy
11521174 * yyyy yyyy
11531175 *
11541176 * Symbolic equation
r242199r242200
11681190 */
11691191void pps4_device::iIOL()
11701192{
1171    const unsigned a = ~m_A & 15;
1172    ARG();
1173    LOG(("%s: port:%X <- %02X\n", __FUNCTION__, m_I2, a));
1174    m_io->write_byte(m_I2, a);
1193    const UINT8 ac = ~m_A & 15;
1194    m_I2 = ARG();
1195    m_io->write_byte(m_I2, ac);
1196    LOG(("%s: port:%02x <- %x\n", __FUNCTION__, m_I2, ac));
11751197    m_A = ~m_io->read_byte(m_I2) & 15;
1176    LOG(("%s: port:%X -> %02X\n", __FUNCTION__, m_I2, m_A));
1198    LOG(("%s: port:%02x -> %x\n", __FUNCTION__, m_I2, m_A));
11771199}
11781200
11791201/**
r242199r242200
11911213 */
11921214void pps4_device::iDIA()
11931215{
1194    m_A = m_io->read_byte(PPS4_PORT_A);
1216    m_A = m_io->read_byte(PPS4_PORT_A) & 15;
11951217}
11961218
11971219/**
r242199r242200
12091231 */
12101232void pps4_device::iDIB()
12111233{
1212    m_A = m_io->read_byte(PPS4_PORT_B);
1234    m_A = m_io->read_byte(PPS4_PORT_B) & 15;
12131235}
12141236
12151237/**
1216 * @brief pps4_device::iDIA Discrete input group A
1238 * @brief pps4_device::iDOA Discrete output
12171239 * OPCODE     cycles  mnemonic
12181240 * -----------------------------
1219 * 0010 1101  1 cyc    DOA
1241 * 0001 1101  1 cyc    DOA
12201242 *
12211243 * Symbolic equation
12221244 * -----------------------------
r242199r242200
12491271 */
12501272void pps4_device::iSAG()
12511273{
1252    // mask bits 12:5
1274    // mask bits 12:5 on next memory access
12531275    m_SAG = 0xff0;
12541276}
12551277
r242199r242200
12591281void pps4_device::execute_one()
12601282{
12611283    m_I = ROP();
1284    if (m_Skip) {
1285        m_Skip = 0;
1286        LOG(("%s: skip op:%02x\n", __FUNCTION__, m_I));
1287        return;
1288    }
12621289    switch (m_I) {
12631290    case 0x00:
12641291        iLBL();
r242199r242200
14921519    save_item(NAME(m_P));
14931520    save_item(NAME(m_SA));
14941521    save_item(NAME(m_SB));
1522    save_item(NAME(m_Skip));
14951523    save_item(NAME(m_SAG));
14961524    save_item(NAME(m_B));
14971525    save_item(NAME(m_C));
r242199r242200
15061534    state_add( PPS4_X,  "X",  m_X ).formatstr("%01X");
15071535    state_add( PPS4_SA, "SA", m_SA ).formatstr("%03X");
15081536    state_add( PPS4_SB, "SB", m_SB ).formatstr("%03X");
1537    state_add( PPS4_Skip,  "Skip",  m_Skip ).formatstr("%01X");
1538    state_add( PPS4_SAG,  "SAG",  m_SAG ).formatstr("%03X");
15091539    state_add( PPS4_B,  "B",  m_B ).formatstr("%03X");
1510    state_add( PPS4_SAG,  "SAG",  m_SAG ).formatstr("%03X");
1540    state_add( PPS4_I2,  "I",  m_I ).formatstr("%02X").noshow();
15111541    state_add( PPS4_I2,  "I2",  m_I2 ).formatstr("%02X").noshow();
15121542    state_add( PPS4_Ip,  "Ip",  m_Ip ).formatstr("%02X").noshow();
15131543    state_add( STATE_GENPC, "GENPC", m_P ).noshow();
trunk/src/emu/cpu/pps4/pps4.h
r242199r242200
1515    PPS4_SA,
1616    PPS4_SB,
1717    PPS4_B,
18    PPS4_Skip,
1819    PPS4_SAG,
1920    PPS4_I2,
2021    PPS4_Ip,
r242199r242200
8384    UINT16  m_P;        //!< program counter P(12:1)
8485    UINT16  m_SA;       //!< Shift register SA(12:1)
8586    UINT16  m_SB;       //!< Shift register SB(12:1)
87    UINT8   m_Skip;     //!< Skip next instruction
8688    UINT16  m_SAG;      //!< Special address generation mask
8789    UINT16  m_B;        //!< B register B(12:1) (BL, BM and BH)
8890    UINT8   m_C;        //!< Carry flip-flop
trunk/src/emu/cpu/pps4/pps4dasm.c
r242199r242200
2828    t_IOL,      t_DIA,      t_DIB,      t_DOA,      t_SAG,
2929    t_COUNT,
3030    t_MASK = (1 << 6) - 1,
31    t_I3c = 1 << 6,   /* immediate 3 bit constant, complemented */
32    t_I4  = 1 << 7,   /* immediate 4 bit constant */
33    t_I4c = 1 << 8,   /* immediate 4 bit constant, complemented */
34    t_I4p = 1 << 9,   /* immediate 4 bit offset into page 3 */
35    t_I6p = 1 << 10,  /* immediate 6 bit constant; address in current page */
36    t_I8  = 1 << 11,  /* immediate 8 bit constant (I/O port number) */
37    t_I8c = 1 << 12,  /* immediate 8 bit constant inverted */
31    t_I3c  = 1 <<  6,   /* immediate 3 bit constant, complemented */
32    t_I4   = 1 <<  7,   /* immediate 4 bit constant */
33    t_I4c  = 1 <<  8,   /* immediate 4 bit constant, complemented */
34    t_I4p  = 1 <<  9,   /* immediate 4 bit offset into page 3 */
35    t_I6p  = 1 << 10,   /* immediate 6 bit constant; address in current page */
36    t_I8   = 1 << 11,   /* immediate 8 bit constant (I/O port number) */
37    t_I8c  = 1 << 12,   /* immediate 8 bit constant inverted */
38    t_OVER = 1 << 13,   /* Debugger step over (CALL) */
39    t_OUT  = 1 << 14    /* Debugger step out (RETURN) */
3840}   pps4_token_e;
3941
4042static const char *token_str[t_COUNT] = {
r242199r242200
9193};
9294
9395static const UINT16 table[] = {
94    t_LBL | t_I8c,       /* 00 */
95    t_TML | t_I4 | t_I8, /* 01 */
96    t_TML | t_I4 | t_I8, /* 02 */
97    t_TML | t_I4 | t_I8, /* 03 */
98    t_LBUA,              /* 04 */
99    t_RTN,               /* 05 */
100    t_XS,                /* 06 */
101    t_RTNSK,             /* 07 */
102    t_ADCSK,             /* 08 */
103    t_ADSK,              /* 09 */
104    t_ADC,               /* 0a */
105    t_AD,                /* 0b */
106    t_EOR,               /* 0c */
107    t_AND,               /* 0d */
108    t_COMP,              /* 0e */
109    t_OR,                /* 0f */
96/* 00 */ t_LBL | t_I8c,
97/* 01 */ t_TML | t_I4 | t_I8,
98/* 02 */ t_TML | t_I4 | t_I8,
99/* 03 */ t_TML | t_I4 | t_I8,
100/* 04 */ t_LBUA,
101/* 05 */ t_RTN | t_OUT,
102/* 06 */ t_XS,
103/* 07 */ t_RTNSK | t_OUT,
104/* 08 */ t_ADCSK,
105/* 09 */ t_ADSK,
106/* 0a */ t_ADC,
107/* 0b */ t_AD,
108/* 0c */ t_EOR,
109/* 0d */ t_AND,
110/* 0e */ t_COMP,
111/* 0f */ t_OR,
110112
111    t_LBMX,              /* 10 */
112    t_LABL,              /* 11 */
113    t_LAX,               /* 12 */
114    t_SAG,               /* 13 */
115    t_SKF2,              /* 14 */
116    t_SKC,               /* 15 */
117    t_SKF1,              /* 16 */
118    t_INCB,              /* 17 */
119    t_XBMX,              /* 18 */
120    t_XABL,              /* 19 */
121    t_XAX,               /* 1a */
122    t_LXA,               /* 1b */
123    t_IOL | t_I8,        /* 1c */
124    t_DOA,               /* 1d */
125    t_SKZ,               /* 1e */
126    t_DECB,              /* 1f */
113/* 10 */ t_LBMX,
114/* 11 */ t_LABL,
115/* 12 */ t_LAX,
116/* 13 */ t_SAG,
117/* 14 */ t_SKF2,
118/* 15 */ t_SKC,
119/* 16 */ t_SKF1,
120/* 17 */ t_INCB,
121/* 18 */ t_XBMX,
122/* 19 */ t_XABL,
123/* 1a */ t_XAX,
124/* 1b */ t_LXA,
125/* 1c */ t_IOL | t_I8,
126/* 1d */ t_DOA,
127/* 1e */ t_SKZ,
128/* 1f */ t_DECB,
127129
128    t_SC,                /* 20 */
129    t_SF2,               /* 21 */
130    t_SF1,               /* 22 */
131    t_DIB,               /* 23 */
132    t_RC,                /* 24 */
133    t_RF2,               /* 25 */
134    t_RF1,               /* 26 */
135    t_DIA,               /* 27 */
136    t_EXD | t_I3c,       /* 28 */
137    t_EXD | t_I3c,       /* 29 */
138    t_EXD | t_I3c,       /* 2a */
139    t_EXD | t_I3c,       /* 2b */
140    t_EXD | t_I3c,       /* 2c */
141    t_EXD | t_I3c,       /* 2d */
142    t_EXD | t_I3c,       /* 2e */
143    t_EXD | t_I3c,       /* 2f */
130/* 20 */ t_SC,
131/* 21 */ t_SF2,
132/* 22 */ t_SF1,
133/* 23 */ t_DIB,
134/* 24 */ t_RC,
135/* 25 */ t_RF2,
136/* 26 */ t_RF1,
137/* 27 */ t_DIA,
138/* 28 */ t_EXD | t_I3c,
139/* 29 */ t_EXD | t_I3c,
140/* 2a */ t_EXD | t_I3c,
141/* 2b */ t_EXD | t_I3c,
142/* 2c */ t_EXD | t_I3c,
143/* 2d */ t_EXD | t_I3c,
144/* 2e */ t_EXD | t_I3c,
145/* 2f */ t_EXD | t_I3c,
144146
145    t_LD | t_I3c,        /* 30 */
146    t_LD | t_I3c,        /* 31 */
147    t_LD | t_I3c,        /* 32 */
148    t_LD | t_I3c,        /* 33 */
149    t_LD | t_I3c,        /* 34 */
150    t_LD | t_I3c,        /* 35 */
151    t_LD | t_I3c,        /* 36 */
152    t_LD | t_I3c,        /* 37 */
153    t_EX | t_I3c,        /* 38 */
154    t_EX | t_I3c,        /* 39 */
155    t_EX | t_I3c,        /* 3a */
156    t_EX | t_I3c,        /* 3b */
157    t_EX | t_I3c,        /* 3c */
158    t_EX | t_I3c,        /* 3d */
159    t_EX | t_I3c,        /* 3e */
160    t_EX | t_I3c,        /* 3f */
147/* 30 */ t_LD | t_I3c,
148/* 31 */ t_LD | t_I3c,
149/* 32 */ t_LD | t_I3c,
150/* 33 */ t_LD | t_I3c,
151/* 34 */ t_LD | t_I3c,
152/* 35 */ t_LD | t_I3c,
153/* 36 */ t_LD | t_I3c,
154/* 37 */ t_LD | t_I3c,
155/* 38 */ t_EX | t_I3c,
156/* 39 */ t_EX | t_I3c,
157/* 3a */ t_EX | t_I3c,
158/* 3b */ t_EX | t_I3c,
159/* 3c */ t_EX | t_I3c,
160/* 3d */ t_EX | t_I3c,
161/* 3e */ t_EX | t_I3c,
162/* 3f */ t_EX | t_I3c,
161163
162    t_SKBI | t_I4,       /* 40 */
163    t_SKBI | t_I4,       /* 41 */
164    t_SKBI | t_I4,       /* 42 */
165    t_SKBI | t_I4,       /* 43 */
166    t_SKBI | t_I4,       /* 44 */
167    t_SKBI | t_I4,       /* 45 */
168    t_SKBI | t_I4,       /* 46 */
169    t_SKBI | t_I4,       /* 47 */
170    t_SKBI | t_I4,       /* 48 */
171    t_SKBI | t_I4,       /* 49 */
172    t_SKBI | t_I4,       /* 4a */
173    t_SKBI | t_I4,       /* 4b */
174    t_SKBI | t_I4,       /* 4c */
175    t_SKBI | t_I4,       /* 4d */
176    t_SKBI | t_I4,       /* 4e */
177    t_SKBI | t_I4,       /* 4f */
164/* 40 */ t_SKBI | t_I4,
165/* 41 */ t_SKBI | t_I4,
166/* 42 */ t_SKBI | t_I4,
167/* 43 */ t_SKBI | t_I4,
168/* 44 */ t_SKBI | t_I4,
169/* 45 */ t_SKBI | t_I4,
170/* 46 */ t_SKBI | t_I4,
171/* 47 */ t_SKBI | t_I4,
172/* 48 */ t_SKBI | t_I4,
173/* 49 */ t_SKBI | t_I4,
174/* 4a */ t_SKBI | t_I4,
175/* 4b */ t_SKBI | t_I4,
176/* 4c */ t_SKBI | t_I4,
177/* 4d */ t_SKBI | t_I4,
178/* 4e */ t_SKBI | t_I4,
179/* 4f */ t_SKBI | t_I4,
178180
179    t_TL | t_I4 | t_I8,  /* 50 */
180    t_TL | t_I4 | t_I8,  /* 51 */
181    t_TL | t_I4 | t_I8,  /* 52 */
182    t_TL | t_I4 | t_I8,  /* 53 */
183    t_TL | t_I4 | t_I8,  /* 54 */
184    t_TL | t_I4 | t_I8,  /* 55 */
185    t_TL | t_I4 | t_I8,  /* 56 */
186    t_TL | t_I4 | t_I8,  /* 57 */
187    t_TL | t_I4 | t_I8,  /* 58 */
188    t_TL | t_I4 | t_I8,  /* 59 */
189    t_TL | t_I4 | t_I8,  /* 5a */
190    t_TL | t_I4 | t_I8,  /* 5b */
191    t_TL | t_I4 | t_I8,  /* 5c */
192    t_TL | t_I4 | t_I8,  /* 5d */
193    t_TL | t_I4 | t_I8,  /* 5e */
194    t_TL | t_I4 | t_I8,  /* 5f */
181/* 50 */ t_TL | t_I4 | t_I8 | t_OVER,
182/* 51 */ t_TL | t_I4 | t_I8 | t_OVER,
183/* 52 */ t_TL | t_I4 | t_I8 | t_OVER,
184/* 53 */ t_TL | t_I4 | t_I8 | t_OVER,
185/* 54 */ t_TL | t_I4 | t_I8 | t_OVER,
186/* 55 */ t_TL | t_I4 | t_I8 | t_OVER,
187/* 56 */ t_TL | t_I4 | t_I8 | t_OVER,
188/* 57 */ t_TL | t_I4 | t_I8 | t_OVER,
189/* 58 */ t_TL | t_I4 | t_I8 | t_OVER,
190/* 59 */ t_TL | t_I4 | t_I8 | t_OVER,
191/* 5a */ t_TL | t_I4 | t_I8 | t_OVER,
192/* 5b */ t_TL | t_I4 | t_I8 | t_OVER,
193/* 5c */ t_TL | t_I4 | t_I8 | t_OVER,
194/* 5d */ t_TL | t_I4 | t_I8 | t_OVER,
195/* 5e */ t_TL | t_I4 | t_I8 | t_OVER,
196/* 5f */ t_TL | t_I4 | t_I8 | t_OVER,
195197
196    t_ADI | t_I4c,       /* 60 */
197    t_ADI | t_I4c,       /* 61 */
198    t_ADI | t_I4c,       /* 62 */
199    t_ADI | t_I4c,       /* 63 */
200    t_ADI | t_I4c,       /* 64 */
201    t_DC,                /* 65 */
202    t_ADI | t_I4c,       /* 66 */
203    t_ADI | t_I4c,       /* 67 */
204    t_ADI | t_I4c,       /* 68 */
205    t_ADI | t_I4c,       /* 69 */
206    t_ADI | t_I4c,       /* 6a */
207    t_ADI | t_I4c,       /* 6b */
208    t_ADI | t_I4c,       /* 6c */
209    t_ADI | t_I4c,       /* 6d */
210    t_ADI | t_I4c,       /* 6e */
211    t_CYS,               /* 6f */
198/* 60 */ t_ADI | t_I4c,
199/* 61 */ t_ADI | t_I4c,
200/* 62 */ t_ADI | t_I4c,
201/* 63 */ t_ADI | t_I4c,
202/* 64 */ t_ADI | t_I4c,
203/* 65 */ t_DC,
204/* 66 */ t_ADI | t_I4c,
205/* 67 */ t_ADI | t_I4c,
206/* 68 */ t_ADI | t_I4c,
207/* 69 */ t_ADI | t_I4c,
208/* 6a */ t_ADI | t_I4c,
209/* 6b */ t_ADI | t_I4c,
210/* 6c */ t_ADI | t_I4c,
211/* 6d */ t_ADI | t_I4c,
212/* 6e */ t_ADI | t_I4c,
213/* 6f */ t_CYS,
212214
213    t_LDI | t_I4c,       /* 70 */
214    t_LDI | t_I4c,       /* 71 */
215    t_LDI | t_I4c,       /* 72 */
216    t_LDI | t_I4c,       /* 73 */
217    t_LDI | t_I4c,       /* 74 */
218    t_LDI | t_I4c,       /* 75 */
219    t_LDI | t_I4c,       /* 76 */
220    t_LDI | t_I4c,       /* 77 */
221    t_LDI | t_I4c,       /* 78 */
222    t_LDI | t_I4c,       /* 79 */
223    t_LDI | t_I4c,       /* 7a */
224    t_LDI | t_I4c,       /* 7b */
225    t_LDI | t_I4c,       /* 7c */
226    t_LDI | t_I4c,       /* 7d */
227    t_LDI | t_I4c,       /* 7e */
228    t_LDI | t_I4c,       /* 7f */
215/* 70 */ t_LDI | t_I4c,
216/* 71 */ t_LDI | t_I4c,
217/* 72 */ t_LDI | t_I4c,
218/* 73 */ t_LDI | t_I4c,
219/* 74 */ t_LDI | t_I4c,
220/* 75 */ t_LDI | t_I4c,
221/* 76 */ t_LDI | t_I4c,
222/* 77 */ t_LDI | t_I4c,
223/* 78 */ t_LDI | t_I4c,
224/* 79 */ t_LDI | t_I4c,
225/* 7a */ t_LDI | t_I4c,
226/* 7b */ t_LDI | t_I4c,
227/* 7c */ t_LDI | t_I4c,
228/* 7d */ t_LDI | t_I4c,
229/* 7e */ t_LDI | t_I4c,
230/* 7f */ t_LDI | t_I4c,
229231
230    t_T | t_I6p,         /* 80 */
231    t_T | t_I6p,         /* 81 */
232    t_T | t_I6p,         /* 82 */
233    t_T | t_I6p,         /* 83 */
234    t_T | t_I6p,         /* 84 */
235    t_T | t_I6p,         /* 85 */
236    t_T | t_I6p,         /* 86 */
237    t_T | t_I6p,         /* 87 */
238    t_T | t_I6p,         /* 88 */
239    t_T | t_I6p,         /* 89 */
240    t_T | t_I6p,         /* 8a */
241    t_T | t_I6p,         /* 8b */
242    t_T | t_I6p,         /* 8c */
243    t_T | t_I6p,         /* 8d */
244    t_T | t_I6p,         /* 8e */
245    t_T | t_I6p,         /* 8f */
232/* 80 */ t_T | t_I6p,
233/* 81 */ t_T | t_I6p,
234/* 82 */ t_T | t_I6p,
235/* 83 */ t_T | t_I6p,
236/* 84 */ t_T | t_I6p,
237/* 85 */ t_T | t_I6p,
238/* 86 */ t_T | t_I6p,
239/* 87 */ t_T | t_I6p,
240/* 88 */ t_T | t_I6p,
241/* 89 */ t_T | t_I6p,
242/* 8a */ t_T | t_I6p,
243/* 8b */ t_T | t_I6p,
244/* 8c */ t_T | t_I6p,
245/* 8d */ t_T | t_I6p,
246/* 8e */ t_T | t_I6p,
247/* 8f */ t_T | t_I6p,
246248
247    t_T | t_I6p,         /* 90 */
248    t_T | t_I6p,         /* 91 */
249    t_T | t_I6p,         /* 92 */
250    t_T | t_I6p,         /* 93 */
251    t_T | t_I6p,         /* 94 */
252    t_T | t_I6p,         /* 95 */
253    t_T | t_I6p,         /* 96 */
254    t_T | t_I6p,         /* 97 */
255    t_T | t_I6p,         /* 98 */
256    t_T | t_I6p,         /* 99 */
257    t_T | t_I6p,         /* 9a */
258    t_T | t_I6p,         /* 9b */
259    t_T | t_I6p,         /* 9c */
260    t_T | t_I6p,         /* 9d */
261    t_T | t_I6p,         /* 9e */
262    t_T | t_I6p,         /* 9f */
249/* 90 */ t_T | t_I6p,
250/* 91 */ t_T | t_I6p,
251/* 92 */ t_T | t_I6p,
252/* 93 */ t_T | t_I6p,
253/* 94 */ t_T | t_I6p,
254/* 95 */ t_T | t_I6p,
255/* 96 */ t_T | t_I6p,
256/* 97 */ t_T | t_I6p,
257/* 98 */ t_T | t_I6p,
258/* 99 */ t_T | t_I6p,
259/* 9a */ t_T | t_I6p,
260/* 9b */ t_T | t_I6p,
261/* 9c */ t_T | t_I6p,
262/* 9d */ t_T | t_I6p,
263/* 9e */ t_T | t_I6p,
264/* 9f */ t_T | t_I6p,
263265
264    t_T | t_I6p,         /* a0 */
265    t_T | t_I6p,         /* a1 */
266    t_T | t_I6p,         /* a2 */
267    t_T | t_I6p,         /* a3 */
268    t_T | t_I6p,         /* a4 */
269    t_T | t_I6p,         /* a5 */
270    t_T | t_I6p,         /* a6 */
271    t_T | t_I6p,         /* a7 */
272    t_T | t_I6p,         /* a8 */
273    t_T | t_I6p,         /* a9 */
274    t_T | t_I6p,         /* aa */
275    t_T | t_I6p,         /* ab */
276    t_T | t_I6p,         /* ac */
277    t_T | t_I6p,         /* ad */
278    t_T | t_I6p,         /* ae */
279    t_T | t_I6p,         /* af */
266/* a0 */ t_T | t_I6p,
267/* a1 */ t_T | t_I6p,
268/* a2 */ t_T | t_I6p,
269/* a3 */ t_T | t_I6p,
270/* a4 */ t_T | t_I6p,
271/* a5 */ t_T | t_I6p,
272/* a6 */ t_T | t_I6p,
273/* a7 */ t_T | t_I6p,
274/* a8 */ t_T | t_I6p,
275/* a9 */ t_T | t_I6p,
276/* aa */ t_T | t_I6p,
277/* ab */ t_T | t_I6p,
278/* ac */ t_T | t_I6p,
279/* ad */ t_T | t_I6p,
280/* ae */ t_T | t_I6p,
281/* af */ t_T | t_I6p,
280282
281    t_T | t_I6p,         /* b0 */
282    t_T | t_I6p,         /* b1 */
283    t_T | t_I6p,         /* b2 */
284    t_T | t_I6p,         /* b3 */
285    t_T | t_I6p,         /* b4 */
286    t_T | t_I6p,         /* b5 */
287    t_T | t_I6p,         /* b6 */
288    t_T | t_I6p,         /* b7 */
289    t_T | t_I6p,         /* b8 */
290    t_T | t_I6p,         /* b9 */
291    t_T | t_I6p,         /* ba */
292    t_T | t_I6p,         /* bb */
293    t_T | t_I6p,         /* bc */
294    t_T | t_I6p,         /* bd */
295    t_T | t_I6p,         /* be */
296    t_T | t_I6p,         /* bf */
283/* b0 */ t_T | t_I6p,
284/* b1 */ t_T | t_I6p,
285/* b2 */ t_T | t_I6p,
286/* b3 */ t_T | t_I6p,
287/* b4 */ t_T | t_I6p,
288/* b5 */ t_T | t_I6p,
289/* b6 */ t_T | t_I6p,
290/* b7 */ t_T | t_I6p,
291/* b8 */ t_T | t_I6p,
292/* b9 */ t_T | t_I6p,
293/* ba */ t_T | t_I6p,
294/* bb */ t_T | t_I6p,
295/* bc */ t_T | t_I6p,
296/* bd */ t_T | t_I6p,
297/* be */ t_T | t_I6p,
298/* bf */ t_T | t_I6p,
297299
298    t_LB | t_I4p,        /* c0 */
299    t_LB | t_I4p,        /* c1 */
300    t_LB | t_I4p,        /* c2 */
301    t_LB | t_I4p,        /* c3 */
302    t_LB | t_I4p,        /* c4 */
303    t_LB | t_I4p,        /* c5 */
304    t_LB | t_I4p,        /* c6 */
305    t_LB | t_I4p,        /* c7 */
306    t_LB | t_I4p,        /* c8 */
307    t_LB | t_I4p,        /* c9 */
308    t_LB | t_I4p,        /* ca */
309    t_LB | t_I4p,        /* cb */
310    t_LB | t_I4p,        /* cc */
311    t_LB | t_I4p,        /* cd */
312    t_LB | t_I4p,        /* ce */
313    t_LB | t_I4p,        /* cf */
300/* c0 */ t_LB | t_I4p,
301/* c1 */ t_LB | t_I4p,
302/* c2 */ t_LB | t_I4p,
303/* c3 */ t_LB | t_I4p,
304/* c4 */ t_LB | t_I4p,
305/* c5 */ t_LB | t_I4p,
306/* c6 */ t_LB | t_I4p,
307/* c7 */ t_LB | t_I4p,
308/* c8 */ t_LB | t_I4p,
309/* c9 */ t_LB | t_I4p,
310/* ca */ t_LB | t_I4p,
311/* cb */ t_LB | t_I4p,
312/* cc */ t_LB | t_I4p,
313/* cd */ t_LB | t_I4p,
314/* ce */ t_LB | t_I4p,
315/* cf */ t_LB | t_I4p,
314316
315    t_TM | t_I6p,        /* d0 */
316    t_TM | t_I6p,        /* d1 */
317    t_TM | t_I6p,        /* d2 */
318    t_TM | t_I6p,        /* d3 */
319    t_TM | t_I6p,        /* d4 */
320    t_TM | t_I6p,        /* d5 */
321    t_TM | t_I6p,        /* d6 */
322    t_TM | t_I6p,        /* d7 */
323    t_TM | t_I6p,        /* d8 */
324    t_TM | t_I6p,        /* d9 */
325    t_TM | t_I6p,        /* da */
326    t_TM | t_I6p,        /* db */
327    t_TM | t_I6p,        /* dc */
328    t_TM | t_I6p,        /* dd */
329    t_TM | t_I6p,        /* de */
330    t_TM | t_I6p,        /* df */
317/* d0 */ t_TM | t_I6p | t_OVER,
318/* d1 */ t_TM | t_I6p | t_OVER,
319/* d2 */ t_TM | t_I6p | t_OVER,
320/* d3 */ t_TM | t_I6p | t_OVER,
321/* d4 */ t_TM | t_I6p | t_OVER,
322/* d5 */ t_TM | t_I6p | t_OVER,
323/* d6 */ t_TM | t_I6p | t_OVER,
324/* d7 */ t_TM | t_I6p | t_OVER,
325/* d8 */ t_TM | t_I6p | t_OVER,
326/* d9 */ t_TM | t_I6p | t_OVER,
327/* da */ t_TM | t_I6p | t_OVER,
328/* db */ t_TM | t_I6p | t_OVER,
329/* dc */ t_TM | t_I6p | t_OVER,
330/* dd */ t_TM | t_I6p | t_OVER,
331/* de */ t_TM | t_I6p | t_OVER,
332/* df */ t_TM | t_I6p | t_OVER,
331333
332    t_TM | t_I6p,        /* e0 */
333    t_TM | t_I6p,        /* e1 */
334    t_TM | t_I6p,        /* e2 */
335    t_TM | t_I6p,        /* e3 */
336    t_TM | t_I6p,        /* e4 */
337    t_TM | t_I6p,        /* e5 */
338    t_TM | t_I6p,        /* e6 */
339    t_TM | t_I6p,        /* e7 */
340    t_TM | t_I6p,        /* e8 */
341    t_TM | t_I6p,        /* e9 */
342    t_TM | t_I6p,        /* ea */
343    t_TM | t_I6p,        /* eb */
344    t_TM | t_I6p,        /* ec */
345    t_TM | t_I6p,        /* ed */
346    t_TM | t_I6p,        /* ee */
347    t_TM | t_I6p,        /* ef */
334/* e0 */ t_TM | t_I6p | t_OVER,
335/* e1 */ t_TM | t_I6p | t_OVER,
336/* e2 */ t_TM | t_I6p | t_OVER,
337/* e3 */ t_TM | t_I6p | t_OVER,
338/* e4 */ t_TM | t_I6p | t_OVER,
339/* e5 */ t_TM | t_I6p | t_OVER,
340/* e6 */ t_TM | t_I6p | t_OVER,
341/* e7 */ t_TM | t_I6p | t_OVER,
342/* e8 */ t_TM | t_I6p | t_OVER,
343/* e9 */ t_TM | t_I6p | t_OVER,
344/* ea */ t_TM | t_I6p | t_OVER,
345/* eb */ t_TM | t_I6p | t_OVER,
346/* ec */ t_TM | t_I6p | t_OVER,
347/* ed */ t_TM | t_I6p | t_OVER,
348/* ee */ t_TM | t_I6p | t_OVER,
349/* ef */ t_TM | t_I6p | t_OVER,
348350
349    t_TM | t_I6p,        /* f0 */
350    t_TM | t_I6p,        /* f1 */
351    t_TM | t_I6p,        /* f2 */
352    t_TM | t_I6p,        /* f3 */
353    t_TM | t_I6p,        /* f4 */
354    t_TM | t_I6p,        /* f5 */
355    t_TM | t_I6p,        /* f6 */
356    t_TM | t_I6p,        /* f7 */
357    t_TM | t_I6p,        /* f8 */
358    t_TM | t_I6p,        /* f9 */
359    t_TM | t_I6p,        /* fa */
360    t_TM | t_I6p,        /* fb */
361    t_TM | t_I6p,        /* fc */
362    t_TM | t_I6p,        /* fd */
363    t_TM | t_I6p,        /* fe */
364    t_TM | t_I6p,        /* ff */
351/* f0 */ t_TM | t_I6p | t_OVER,
352/* f1 */ t_TM | t_I6p | t_OVER,
353/* f2 */ t_TM | t_I6p | t_OVER,
354/* f3 */ t_TM | t_I6p | t_OVER,
355/* f4 */ t_TM | t_I6p | t_OVER,
356/* f5 */ t_TM | t_I6p | t_OVER,
357/* f6 */ t_TM | t_I6p | t_OVER,
358/* f7 */ t_TM | t_I6p | t_OVER,
359/* f8 */ t_TM | t_I6p | t_OVER,
360/* f9 */ t_TM | t_I6p | t_OVER,
361/* fa */ t_TM | t_I6p | t_OVER,
362/* fb */ t_TM | t_I6p | t_OVER,
363/* fc */ t_TM | t_I6p | t_OVER,
364/* fd */ t_TM | t_I6p | t_OVER,
365/* fe */ t_TM | t_I6p | t_OVER,
366/* ff */ t_TM | t_I6p | t_OVER
365367};
366368
367369CPU_DISASSEMBLE( pps4 )
r242199r242200
380382    if (tok & t_I3c) {
381383        // 3 bit immediate, complemented
382384        UINT8 i = ~op & 7;
383        dst += sprintf(dst, "%x", i);
385        if (0 != i)  // only print if non-zero
386            dst += sprintf(dst, "%x", i);
384387    }
385388
386389    if (tok & t_I4) {
r242199r242200
419422        dst += sprintf(dst, "%03x", arg);
420423    }
421424
422    if (0x05 == op || 0x07 == op)   // RTN or RTNSK
425    if (tok & t_OVER)  // TL or TML
426            flags |= DASMFLAG_STEP_OVER;
427
428    if (tok & t_OUT)   // RTN or RTNSK
423429            flags |= DASMFLAG_STEP_OUT;
424430
425431    return (pc - PC) | flags | DASMFLAG_SUPPORTED;
trunk/src/lib/formats/victor9k_dsk.c
r242199r242200
3939    Interleave factor 3
4040    cell 2.13 usec
4141
42
43   Boot Disc Label Format
44   Track 0 Sector 0
45
46   Byte
47   Offset         Name                Description
48
49   0              System disc ID      literally, ff,00h for a system
50                                      disc
51
52   2              Load address        paragraph   to   load   booted
53                                      program at. If zero then  boot
54                                      loads in high memory.
55
56   4              Length              paragraph count to load.
57
58   6              Entry offset        I.P.  value  for  transfer  of
59                                      control.
60
61   8              Entry segment       C.S.  value  for  transfer  of
62                                      control.
63
64   10             I.D.                disc identifier.
65
66   18             Part number         system identifier  - displayed
67                                      by early versions of boot.
68
69   26             Sector size         byte count for sectors.
70
71   28             Data start          first   data  sector  on  disc
72                                      (absolute sectors).
73
74   30             Boot start          first   absolute   sector   of
75                                      program  for boot to  load  at
76                                      'load  address'  for  'length'
77                                      paragraphs.
78
79   32             Flags               indicators:
80                                           bit  meaning
81                                          15-12 interleave    factor
82                                                (0-15)
83                                            0   0=single sided
84                                                1=double sided
85
86   34             Disc type           00 = CP/M
87                                      01 = MS-DOS
88
89   35             Reserved
90
91   38             Speed table         information  for speed control
92                                      proc.
93
94   56             Zone table          high track for each zone.
95
96   71             Sector/track        sectors  per  track  for  each
97                                      zone.
4298*/
4399
44100#include "emu.h"
r242199r242200
84140   return 0;
85141}
86142
143void victor9k_format::log_boot_sector(UINT8 *data)
144{
145   // System disc ID
146   logerror("System disc: %s\n", ((data[0] == 0xff) && (data[1] == 0x00)) ? "yes" : "no");
147
148   // Load address
149   logerror("Load address: %04x\n", (data[1] << 8) | data[2]);
150
151   // Length
152   logerror("Length: %04x\n", (data[3] << 8) | data[4]);
153
154   // Entry offset
155   logerror("Entry offset: %04x\n", (data[5] << 8) | data[6]);
156
157   // Entry segment
158   logerror("Entry segment: %04x\n", (data[7] << 8) | data[8]);
159
160   // I.D.
161   //logerror("I.D.: %s\n", data[10]);
162
163   // Part number
164   //logerror("Part number: %s\n", data[18]);
165
166   // Sector size
167   logerror("Sector size: %04x\n", (data[25] << 8) | data[26]);
168
169   // Data start
170   logerror("Data start: %04x\n", (data[27] << 8) | data[28]);
171
172   // Boot start
173   logerror("Boot start: %04x\n", (data[29] << 8) | data[30]);
174
175   // Flags
176   logerror("%s sided\n", BIT(data[33], 0) ? "Double" : "Single");
177   logerror("Interleave factor: %u\n", data[32] >> 4);
178
179   // Disc type
180   switch (data[34]) {
181   case 0x00: logerror("Disc type: CP/M\n"); break;
182   case 0x01: logerror("Disc type: MS-DOS\n"); break;
183   default: logerror("Disc type: unknown\n"); break;
184   }
185
186   // Speed table
187   logerror("Speed table:  ");
188   for (int i = 38; i < 56; i++) {
189      logerror("%02x ", data[i]);
190   }
191   logerror("\n");
192
193   // Zone table
194   logerror("Zone table:            ");
195   for (int i = 56; i < 71; i++) {
196      logerror("%02x ", data[i]);
197   }
198   logerror("\n");
199
200   // Sector/track
201   logerror("Sector/track:          ");
202   for (int i = 71; i < 86; i++) {
203      logerror("%02x ", data[i]);
204   }
205   logerror("\n");
206}
207
87208floppy_image_format_t::desc_e* victor9k_format::get_sector_desc(const format &f, int &current_size, int sector_count)
88209{
89210   static floppy_image_format_t::desc_e desc[] = {
r242199r242200
141262
142263   io_generic_read(io, img, 0, size);
143264
265   log_boot_sector(img);
266
144267   int track_offset = 0;
145268
146269   for (int head = 0; head < f.head_count; head++) {
r242199r242200
207330      18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
208331      17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
209332      16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
210      15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
211      14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
333      15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
334      14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
212335      13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
213336      12, 12, 12, 12, 12, 12, 12, 12, 12
214337   },
trunk/src/lib/formats/victor9k_dsk.h
r242199r242200
3333
3434   int find_size(io_generic *io, UINT32 form_factor);
3535   virtual int identify(io_generic *io, UINT32 form_factor);
36   void log_boot_sector(UINT8 *data);
3637   floppy_image_format_t::desc_e* get_sector_desc(const format &f, int &current_size, int sector_count);
3738   void build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, desc_s *sectors, int sector_count) const;
3839   virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
trunk/src/mame/drivers/gts1.c
r242199r242200
7070#include "cpu/pps4/pps4.h"
7171//#include "gts1.lh"
7272
73#define VERBOSE    1
74
75#if VERBOSE
76#define LOG(x) logerror x
77#else
78#define LOG(x)
79#endif
80
7381class gts1_state : public genpin_class
7482{
7583public:
76   gts1_state(const machine_config &mconfig, device_type type, const char *tag)
77      : genpin_class(mconfig, type, tag)
78      , m_maincpu(*this, "maincpu")
79   { }
84    gts1_state(const machine_config &mconfig, device_type type, const char *tag)
85        : genpin_class(mconfig, type, tag)
86        , m_maincpu(*this, "maincpu")
87    { }
8088
81   DECLARE_DRIVER_INIT(gts1);
89    DECLARE_DRIVER_INIT(gts1);
90    DECLARE_READ8_MEMBER (gts1_pa_r);
91    DECLARE_WRITE8_MEMBER(gts1_pa_w);
92    DECLARE_WRITE8_MEMBER(gts1_pb_w);
8293private:
83   virtual void machine_reset();
84   required_device<cpu_device> m_maincpu;
94    virtual void machine_reset();
95    required_device<cpu_device> m_maincpu;
96    UINT8 m_6351_addr;
8597};
8698
87
8899static ADDRESS_MAP_START( gts1_map, AS_PROGRAM, 8, gts1_state )
89   AM_RANGE(0x0000, 0x0fff) AM_ROM
100    AM_RANGE(0x0000, 0x0fff) AM_ROM
90101ADDRESS_MAP_END
91102
92103static ADDRESS_MAP_START( gts1_data, AS_DATA, 8, gts1_state )
93   AM_RANGE(0x0000, 0x0fff) AM_RAM // not correct
104    AM_RANGE(0x0000, 0x0fff) AM_RAM // not correct
94105ADDRESS_MAP_END
95106
96107static ADDRESS_MAP_START( gts1_io, AS_IO, 8, gts1_state )
97   AM_RANGE(0x0000, 0x00ff) AM_RAM // connects to all the other chips
108    AM_RANGE(0x0000, 0x00ff) AM_RAM // connects to all the other chips
109    AM_RANGE(0x0100, 0x0100) AM_READ (gts1_pa_r) AM_WRITE(gts1_pa_w)
110    AM_RANGE(0x0101, 0x0101) AM_WRITE(gts1_pb_w)
98111ADDRESS_MAP_END
99112
100113static INPUT_PORTS_START( gts1 )
101   PORT_START("DSW0")
102   PORT_DIPNAME( 0x01, 0x00, "S01")
103   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
104   PORT_DIPSETTING(    0x01, DEF_STR( On ))
105   PORT_DIPNAME( 0x02, 0x00, "S02")
106   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
107   PORT_DIPSETTING(    0x02, DEF_STR( On ))
108   PORT_DIPNAME( 0x04, 0x00, "S03")
109   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
110   PORT_DIPSETTING(    0x04, DEF_STR( On ))
111   PORT_DIPNAME( 0x08, 0x00, "S04")
112   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
113   PORT_DIPSETTING(    0x08, DEF_STR( On ))
114   PORT_DIPNAME( 0x10, 0x00, "S05")
115   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
116   PORT_DIPSETTING(    0x10, DEF_STR( On ))
117   PORT_DIPNAME( 0x20, 0x20, "S06")
118   PORT_DIPSETTING(    0x00, DEF_STR( No ))
119   PORT_DIPSETTING(    0x20, DEF_STR( Yes ))
120   PORT_DIPNAME( 0x40, 0x40, "S07")
121   PORT_DIPSETTING(    0x00, DEF_STR( No ))
122   PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
123   PORT_DIPNAME( 0x80, 0x80, "S08")
124   PORT_DIPSETTING(    0x00, DEF_STR( No ))
125   PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
114    PORT_START("DSW0")
115    PORT_DIPNAME( 0x01, 0x00, "S01")
116    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
117    PORT_DIPSETTING(    0x01, DEF_STR( On ))
118    PORT_DIPNAME( 0x02, 0x00, "S02")
119    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
120    PORT_DIPSETTING(    0x02, DEF_STR( On ))
121    PORT_DIPNAME( 0x04, 0x00, "S03")
122    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
123    PORT_DIPSETTING(    0x04, DEF_STR( On ))
124    PORT_DIPNAME( 0x08, 0x00, "S04")
125    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
126    PORT_DIPSETTING(    0x08, DEF_STR( On ))
127    PORT_DIPNAME( 0x10, 0x00, "S05")
128    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
129    PORT_DIPSETTING(    0x10, DEF_STR( On ))
130    PORT_DIPNAME( 0x20, 0x20, "S06")
131    PORT_DIPSETTING(    0x00, DEF_STR( No ))
132    PORT_DIPSETTING(    0x20, DEF_STR( Yes ))
133    PORT_DIPNAME( 0x40, 0x40, "S07")
134    PORT_DIPSETTING(    0x00, DEF_STR( No ))
135    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
136    PORT_DIPNAME( 0x80, 0x80, "S08")
137    PORT_DIPSETTING(    0x00, DEF_STR( No ))
138    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
126139
127   PORT_START("DSW1")
128   PORT_DIPNAME( 0x01, 0x00, "S09")
129   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
130   PORT_DIPSETTING(    0x01, DEF_STR( On ))
131   PORT_DIPNAME( 0x02, 0x00, "S10")
132   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
133   PORT_DIPSETTING(    0x02, DEF_STR( On ))
134   PORT_DIPNAME( 0x04, 0x00, "S11")
135   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
136   PORT_DIPSETTING(    0x04, DEF_STR( On ))
137   PORT_DIPNAME( 0x08, 0x00, "S12")
138   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
139   PORT_DIPSETTING(    0x08, DEF_STR( On ))
140   PORT_DIPNAME( 0x10, 0x00, "S13")
141   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
142   PORT_DIPSETTING(    0x10, DEF_STR( On ))
143   PORT_DIPNAME( 0x20, 0x00, "S14")
144   PORT_DIPSETTING(    0x00, DEF_STR( Yes ))
145   PORT_DIPSETTING(    0x20, DEF_STR( No ))
146   PORT_DIPNAME( 0x40, 0x40, "S15")
147   PORT_DIPSETTING(    0x00, DEF_STR( No ))
148   PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
149   PORT_DIPNAME( 0x80, 0x00, "S16")
150   PORT_DIPSETTING(    0x00, DEF_STR( No ))
151   PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
140    PORT_START("DSW1")
141    PORT_DIPNAME( 0x01, 0x00, "S09")
142    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
143    PORT_DIPSETTING(    0x01, DEF_STR( On ))
144    PORT_DIPNAME( 0x02, 0x00, "S10")
145    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
146    PORT_DIPSETTING(    0x02, DEF_STR( On ))
147    PORT_DIPNAME( 0x04, 0x00, "S11")
148    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
149    PORT_DIPSETTING(    0x04, DEF_STR( On ))
150    PORT_DIPNAME( 0x08, 0x00, "S12")
151    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
152    PORT_DIPSETTING(    0x08, DEF_STR( On ))
153    PORT_DIPNAME( 0x10, 0x00, "S13")
154    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
155    PORT_DIPSETTING(    0x10, DEF_STR( On ))
156    PORT_DIPNAME( 0x20, 0x00, "S14")
157    PORT_DIPSETTING(    0x00, DEF_STR( Yes ))
158    PORT_DIPSETTING(    0x20, DEF_STR( No ))
159    PORT_DIPNAME( 0x40, 0x40, "S15")
160    PORT_DIPSETTING(    0x00, DEF_STR( No ))
161    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
162    PORT_DIPNAME( 0x80, 0x00, "S16")
163    PORT_DIPSETTING(    0x00, DEF_STR( No ))
164    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
152165
153   PORT_START("DSW2")
154   PORT_DIPNAME( 0x01, 0x00, "S17")
155   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
156   PORT_DIPSETTING(    0x01, DEF_STR( On ))
157   PORT_DIPNAME( 0x02, 0x00, "S18")
158   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
159   PORT_DIPSETTING(    0x02, DEF_STR( On ))
160   PORT_DIPNAME( 0x04, 0x00, "S19")
161   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
162   PORT_DIPSETTING(    0x04, DEF_STR( On ))
163   PORT_DIPNAME( 0x08, 0x00, "S20")
164   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
165   PORT_DIPSETTING(    0x08, DEF_STR( On ))
166   PORT_DIPNAME( 0x10, 0x00, "S21")
167   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
168   PORT_DIPSETTING(    0x10, DEF_STR( On ))
169   PORT_DIPNAME( 0x20, 0x00, "S22")
170   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
171   PORT_DIPSETTING(    0x20, DEF_STR( On ))
172   PORT_DIPNAME( 0x40, 0x00, "S23")
173   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
174   PORT_DIPSETTING(    0x40, DEF_STR( On ))
175   PORT_DIPNAME( 0x80, 0x00, "S24")
176   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
177   PORT_DIPSETTING(    0x80, DEF_STR( On ))
166    PORT_START("DSW2")
167    PORT_DIPNAME( 0x01, 0x00, "S17")
168    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
169    PORT_DIPSETTING(    0x01, DEF_STR( On ))
170    PORT_DIPNAME( 0x02, 0x00, "S18")
171    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
172    PORT_DIPSETTING(    0x02, DEF_STR( On ))
173    PORT_DIPNAME( 0x04, 0x00, "S19")
174    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
175    PORT_DIPSETTING(    0x04, DEF_STR( On ))
176    PORT_DIPNAME( 0x08, 0x00, "S20")
177    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
178    PORT_DIPSETTING(    0x08, DEF_STR( On ))
179    PORT_DIPNAME( 0x10, 0x00, "S21")
180    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
181    PORT_DIPSETTING(    0x10, DEF_STR( On ))
182    PORT_DIPNAME( 0x20, 0x00, "S22")
183    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
184    PORT_DIPSETTING(    0x20, DEF_STR( On ))
185    PORT_DIPNAME( 0x40, 0x00, "S23")
186    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
187    PORT_DIPSETTING(    0x40, DEF_STR( On ))
188    PORT_DIPNAME( 0x80, 0x00, "S24")
189    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
190    PORT_DIPSETTING(    0x80, DEF_STR( On ))
178191INPUT_PORTS_END
179192
180193void gts1_state::machine_reset()
181194{
195    m_6351_addr = 0;
182196}
183197
184198DRIVER_INIT_MEMBER(gts1_state,gts1)
185199{
186200}
187201
202READ8_MEMBER (gts1_state::gts1_pa_r)
203{
204    // return ROM nibble
205    UINT8 *ROM = memregion("maincpu")->base();
206    UINT8 data = ROM[0x2000 + m_6351_addr] & 0x0f;
207    LOG(("%s: ROM[%03x]:%02x\n", __FUNCTION__, m_6351_addr, data));
208    return data;
209}
210
211WRITE8_MEMBER(gts1_state::gts1_pa_w)
212{
213    // write address lines 7-4
214    m_6351_addr = (m_6351_addr & 0x0f) | ((data & 0x0f) << 4);
215    LOG(("%s: ROM hi:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
216}
217
218WRITE8_MEMBER(gts1_state::gts1_pb_w)
219{
220    // write address lines 3-0
221    m_6351_addr = (m_6351_addr & 0xf0) | (data & 0x0f);
222    LOG(("%s: ROM lo:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
223}
224
225
188226static MACHINE_CONFIG_START( gts1, gts1_state )
189   /* basic machine hardware */
190   MCFG_CPU_ADD("maincpu", PPS4, XTAL_3_579545MHz / 18)  // divided in the CPU
191   MCFG_CPU_PROGRAM_MAP(gts1_map)
192   MCFG_CPU_DATA_MAP(gts1_data)
193   MCFG_CPU_IO_MAP(gts1_io)
227    /* basic machine hardware */
228    MCFG_CPU_ADD("maincpu", PPS4, XTAL_3_579545MHz / 18)  // divided in the CPU
229    MCFG_CPU_PROGRAM_MAP(gts1_map)
230    MCFG_CPU_DATA_MAP(gts1_data)
231    MCFG_CPU_IO_MAP(gts1_io)
194232
195   //MCFG_NVRAM_ADD_0FILL("nvram")
233    //MCFG_NVRAM_ADD_0FILL("nvram")
196234
197   /* Video */
198   //MCFG_DEFAULT_LAYOUT(layout_gts1)
235    /* Video */
236    //MCFG_DEFAULT_LAYOUT(layout_gts1)
199237
200   /* Sound */
201   MCFG_FRAGMENT_ADD( genpin_audio )
238    /* Sound */
239    MCFG_FRAGMENT_ADD( genpin_audio )
202240MACHINE_CONFIG_END
203241
204242
205243ROM_START( gts1 )
206   ROM_REGION( 0x10000, "maincpu", 0 )
207   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
208   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
244    ROM_REGION( 0x10000, "maincpu", 0 )
245    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
246    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
209247ROM_END
210248
211249ROM_START( gts1s )
212   ROM_REGION( 0x10000, "maincpu", 0 )
213   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
214   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
250    ROM_REGION( 0x10000, "maincpu", 0 )
251    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
252    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
215253ROM_END
216254
217255/*-------------------------------------------------------------------
218256/ Asteroid Annie and the Aliens (12/1980) #442
219257/-------------------------------------------------------------------*/
220258ROM_START(astannie)
221   ROM_REGION(0x10000, "maincpu", 0)
222   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
223   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
224   ROM_LOAD("442.cpu", 0x2000, 0x0400, CRC(579521e0) SHA1(b1b19473e1ca3373955ee96104b87f586c4c311c))
225   ROM_REGION(0x10000, "cpu2", 0)
226   ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281))
227   ROM_RELOAD( 0x0800, 0x0400)
228   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
229   ROM_RELOAD( 0xfc00, 0x0400)
259    ROM_REGION(0x10000, "maincpu", 0)
260    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
261    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
262    ROM_LOAD("442.cpu", 0x2000, 0x0400, CRC(579521e0) SHA1(b1b19473e1ca3373955ee96104b87f586c4c311c))
263    ROM_REGION(0x10000, "cpu2", 0)
264    ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281))
265    ROM_RELOAD( 0x0800, 0x0400)
266    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
267    ROM_RELOAD( 0xfc00, 0x0400)
230268ROM_END
231269
232270/*-------------------------------------------------------------------
233271/ Buck Rogers (01/1980) #437
234272/-------------------------------------------------------------------*/
235273ROM_START(buckrgrs)
236   ROM_REGION(0x10000, "maincpu", 0)
237   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
238   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
239   ROM_LOAD("437.cpu", 0x2000, 0x0400, CRC(e57d9278) SHA1(dfc4ebff1e14b9a074468671a8e5ac7948d5b352))
240   ROM_REGION(0x10000, "cpu2", 0)
241   ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c))
242   ROM_RELOAD( 0x0800, 0x0400)
243   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
244   ROM_RELOAD( 0xfc00, 0x0400)
274    ROM_REGION(0x10000, "maincpu", 0)
275    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
276    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
277    ROM_LOAD("437.cpu", 0x2000, 0x0400, CRC(e57d9278) SHA1(dfc4ebff1e14b9a074468671a8e5ac7948d5b352))
278    ROM_REGION(0x10000, "cpu2", 0)
279    ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c))
280    ROM_RELOAD( 0x0800, 0x0400)
281    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
282    ROM_RELOAD( 0xfc00, 0x0400)
245283ROM_END
246284
247285/*-------------------------------------------------------------------
248286/ Charlie's Angels (11/1978) #425
249287/-------------------------------------------------------------------*/
250288ROM_START(charlies)
251   ROM_REGION(0x10000, "maincpu", 0)
252   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
253   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
254   ROM_LOAD("425.cpu", 0x2000, 0x0400, CRC(928b4279) SHA1(51096d45e880d6a8263eaeaa0cdab0f61ad2f58d))
289    ROM_REGION(0x10000, "maincpu", 0)
290    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
291    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
292    ROM_LOAD("425.cpu", 0x2000, 0x0400, CRC(928b4279) SHA1(51096d45e880d6a8263eaeaa0cdab0f61ad2f58d))
255293ROM_END
256294/*-------------------------------------------------------------------
257295/ Cleopatra (11/1977) #409
258296/-------------------------------------------------------------------*/
259297ROM_START(cleoptra)
260   ROM_REGION(0x10000, "maincpu", 0)
261   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
262   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
263   ROM_LOAD("409.cpu", 0x2000, 0x0400, CRC(8063ff71) SHA1(205f09f067bf79544d2ce2a48d23259901f935dd))
298    ROM_REGION(0x10000, "maincpu", 0)
299    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
300    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
301    ROM_LOAD("409.cpu", 0x2000, 0x0400, CRC(8063ff71) SHA1(205f09f067bf79544d2ce2a48d23259901f935dd))
264302ROM_END
265303
266304/*-------------------------------------------------------------------
267305/ Close Encounters of the Third Kind (10/1978) #424
268306/-------------------------------------------------------------------*/
269307ROM_START(closeenc)
270   ROM_REGION(0x10000, "maincpu", 0)
271   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
272   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
273   ROM_LOAD("424.cpu", 0x2000, 0x0400, CRC(a7a5dd13) SHA1(223c67b9484baa719c91de52b363ff22813db160))
308    ROM_REGION(0x10000, "maincpu", 0)
309    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
310    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
311    ROM_LOAD("424.cpu", 0x2000, 0x0400, CRC(a7a5dd13) SHA1(223c67b9484baa719c91de52b363ff22813db160))
274312ROM_END
275313
276314/*-------------------------------------------------------------------
277315/ Count-Down (05/1979) #422
278316/-------------------------------------------------------------------*/
279317ROM_START(countdwn)
280   ROM_REGION(0x10000, "maincpu", 0)
281   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
282   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
283   ROM_LOAD("422.cpu", 0x2000, 0x0400, CRC(51bc2df0) SHA1(d4b555d106c6b4e420b0fcd1df8871f869476c22))
318    ROM_REGION(0x10000, "maincpu", 0)
319    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
320    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
321    ROM_LOAD("422.cpu", 0x2000, 0x0400, CRC(51bc2df0) SHA1(d4b555d106c6b4e420b0fcd1df8871f869476c22))
284322ROM_END
285323
286324/*-------------------------------------------------------------------
287325/ Dragon (10/1978) #419
288326/-------------------------------------------------------------------*/
289327ROM_START(dragon)
290   ROM_REGION(0x10000, "maincpu", 0)
291   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
292   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
293   ROM_LOAD("419.cpu", 0x2000, 0x0400, CRC(018d9b3a) SHA1(da37ef5017c71bc41bdb1f30d3fd7ac3b7e1ee7e))
328    ROM_REGION(0x10000, "maincpu", 0)
329    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
330    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
331    ROM_LOAD("419.cpu", 0x2000, 0x0400, CRC(018d9b3a) SHA1(da37ef5017c71bc41bdb1f30d3fd7ac3b7e1ee7e))
294332ROM_END
295333
296334/*-------------------------------------------------------------------
297335/ Genie (11/1979) #435
298336/-------------------------------------------------------------------*/
299337ROM_START(geniep)
300   ROM_REGION(0x10000, "maincpu", 0)
301   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
302   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
303   ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
304   ROM_REGION(0x10000, "cpu2", 0)
305   ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47))
306   ROM_RELOAD( 0x0800, 0x0400)
307   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
308   ROM_RELOAD( 0xfc00, 0x0400)
338    ROM_REGION(0x10000, "maincpu", 0)
339    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
340    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
341    ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
342    ROM_REGION(0x10000, "cpu2", 0)
343    ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47))
344    ROM_RELOAD( 0x0800, 0x0400)
345    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
346    ROM_RELOAD( 0xfc00, 0x0400)
309347ROM_END
310348
311349/*-------------------------------------------------------------------
312350/ Joker Poker (08/1978) #417
313351/-------------------------------------------------------------------*/
314352ROM_START(jokrpokr)
315   ROM_REGION(0x10000, "maincpu", 0)
316   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
317   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
318   ROM_LOAD("417.cpu", 0x2000, 0x0400, CRC(33dade08) SHA1(23b8dbd7b6c84b806fc0d2da95478235cbf9f80a))
353    ROM_REGION(0x10000, "maincpu", 0)
354    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
355    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
356    ROM_LOAD("417.cpu", 0x2000, 0x0400, CRC(33dade08) SHA1(23b8dbd7b6c84b806fc0d2da95478235cbf9f80a))
319357ROM_END
320358
321359/*-------------------------------------------------------------------
r242199r242200
325363/ L'Hexagone (04/1986)
326364/-------------------------------------------------------------------*/
327365ROM_START(hexagone)
328   ROM_REGION(0x10000, "maincpu", 0)
329   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
330   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
331   ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
332   ROM_REGION(0x10000, "cpu2", 0)
333   ROM_LOAD("hexagone.bin", 0, 0x4000, CRC(002b5464) SHA1(e2d971c4e85b4fb6580c2d3945c9946ea0cebc2e))
366    ROM_REGION(0x10000, "maincpu", 0)
367    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
368    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
369    ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
370    ROM_REGION(0x10000, "cpu2", 0)
371    ROM_LOAD("hexagone.bin", 0, 0x4000, CRC(002b5464) SHA1(e2d971c4e85b4fb6580c2d3945c9946ea0cebc2e))
334372ROM_END
335373/*-------------------------------------------------------------------
336374/ Movie
r242199r242200
340378/ Pinball Pool (08/1979) #427
341379/-------------------------------------------------------------------*/
342380ROM_START(pinpool)
343   ROM_REGION(0x10000, "maincpu", 0)
344   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
345   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
346   ROM_LOAD("427.cpu", 0x2000, 0x0400, CRC(c496393d) SHA1(e91d9596aacdb4277fa200a3f8f9da099c278f32))
381    ROM_REGION(0x10000, "maincpu", 0)
382    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
383    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
384    ROM_LOAD("427.cpu", 0x2000, 0x0400, CRC(c496393d) SHA1(e91d9596aacdb4277fa200a3f8f9da099c278f32))
347385ROM_END
348386
349387/*-------------------------------------------------------------------
350388/ Roller Disco (02/1980) #440
351389/-------------------------------------------------------------------*/
352390ROM_START(roldisco)
353   ROM_REGION(0x10000, "maincpu", 0)
354   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
355   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
356   ROM_LOAD("440.cpu", 0x2000, 0x0400, CRC(bc50631f) SHA1(6aa3124d09fc4e369d087a5ad6dd1737ace55e41))
357   ROM_REGION(0x10000, "cpu2", 0)
358   ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d))
359   ROM_RELOAD( 0x0800, 0x0400)
360   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
361   ROM_RELOAD( 0xfc00, 0x0400)
391    ROM_REGION(0x10000, "maincpu", 0)
392    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
393    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
394    ROM_LOAD("440.cpu", 0x2000, 0x0400, CRC(bc50631f) SHA1(6aa3124d09fc4e369d087a5ad6dd1737ace55e41))
395    ROM_REGION(0x10000, "cpu2", 0)
396    ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d))
397    ROM_RELOAD( 0x0800, 0x0400)
398    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
399    ROM_RELOAD( 0xfc00, 0x0400)
362400ROM_END
363401
364402/*-------------------------------------------------------------------
r242199r242200
369407/ Sinbad (05/1978) #412
370408/-------------------------------------------------------------------*/
371409ROM_START(sinbad)
372   ROM_REGION(0x10000, "maincpu", 0)
373   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
374   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
375   ROM_LOAD("412.cpu", 0x2000, 0x0400, CRC(84a86b83) SHA1(f331f2ffd7d1b279b4ffbb939aa8649e723f5fac))
410    ROM_REGION(0x10000, "maincpu", 0)
411    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
412    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
413    ROM_LOAD("412.cpu", 0x2000, 0x0400, CRC(84a86b83) SHA1(f331f2ffd7d1b279b4ffbb939aa8649e723f5fac))
376414ROM_END
377415
378416ROM_START(sinbadn)
379   ROM_REGION(0x10000, "maincpu", 0)
380   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
381   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
382   ROM_LOAD("412no1.cpu", 0x2000, 0x0400, CRC(f5373f5f) SHA1(027840501416ff01b2adf07188c7d667adf3ad5f))
417    ROM_REGION(0x10000, "maincpu", 0)
418    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
419    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
420    ROM_LOAD("412no1.cpu", 0x2000, 0x0400, CRC(f5373f5f) SHA1(027840501416ff01b2adf07188c7d667adf3ad5f))
383421ROM_END
384422
385423/*-------------------------------------------------------------------
r242199r242200
390428/ Solar Ride (02/1979) #421
391429/-------------------------------------------------------------------*/
392430ROM_START(solaride)
393   ROM_REGION(0x10000, "maincpu", 0)
394   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
395   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
396   ROM_LOAD("421.cpu", 0x2000, 0x0400, CRC(6b5c5da6) SHA1(a09b7009473be53586f53f48b7bfed9a0c5ecd55))
431    ROM_REGION(0x10000, "maincpu", 0)
432    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
433    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
434    ROM_LOAD("421.cpu", 0x2000, 0x0400, CRC(6b5c5da6) SHA1(a09b7009473be53586f53f48b7bfed9a0c5ecd55))
397435ROM_END
398436
399437/*-------------------------------------------------------------------
400438/ The Incredible Hulk (10/1979) #433
401439/-------------------------------------------------------------------*/
402440ROM_START(hulk)
403   ROM_REGION(0x10000, "maincpu", 0)
404   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
405   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
406   ROM_LOAD("433.cpu", 0x2000, 0x0400, CRC(c05d2b52) SHA1(393fe063b029246317c90ee384db95a84d61dbb7))
407   ROM_REGION(0x10000, "cpu2", 0)
408   ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25))
409   ROM_RELOAD( 0x0800, 0x0400)
410   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
411   ROM_RELOAD( 0xfc00, 0x0400)
441    ROM_REGION(0x10000, "maincpu", 0)
442    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
443    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
444    ROM_LOAD("433.cpu", 0x2000, 0x0400, CRC(c05d2b52) SHA1(393fe063b029246317c90ee384db95a84d61dbb7))
445    ROM_REGION(0x10000, "cpu2", 0)
446    ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25))
447    ROM_RELOAD( 0x0800, 0x0400)
448    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
449    ROM_RELOAD( 0xfc00, 0x0400)
412450ROM_END
413451
414452/*-------------------------------------------------------------------
415453/ Torch (02/1980) #438
416454/-------------------------------------------------------------------*/
417455ROM_START(torch)
418   ROM_REGION(0x10000, "maincpu", 0)
419   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
420   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
421   ROM_LOAD("438.cpu", 0x2000, 0x0400, CRC(2d396a64) SHA1(38a1862771500faa471071db08dfbadc6e8759e8))
422   ROM_REGION(0x10000, "cpu2", 0)
423   ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c))
424   ROM_RELOAD( 0x0800, 0x0400)
425   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
426   ROM_RELOAD( 0xfc00, 0x0400)
456    ROM_REGION(0x10000, "maincpu", 0)
457    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
458    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
459    ROM_LOAD("438.cpu", 0x2000, 0x0400, CRC(2d396a64) SHA1(38a1862771500faa471071db08dfbadc6e8759e8))
460    ROM_REGION(0x10000, "cpu2", 0)
461    ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c))
462    ROM_RELOAD( 0x0800, 0x0400)
463    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
464    ROM_RELOAD( 0xfc00, 0x0400)
427465ROM_END
428466
429467/*-------------------------------------------------------------------
430468/ Totem (10/1979) #429
431469/-------------------------------------------------------------------*/
432470ROM_START(totem)
433   ROM_REGION(0x10000, "maincpu", 0)
434   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
435   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
436   ROM_LOAD("429.cpu", 0x2000, 0x0400, CRC(7885a384) SHA1(1770662af7d48ad8297097a9877c5c497119978d))
437   ROM_REGION(0x10000, "cpu2", 0)
438   ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f))
439   ROM_RELOAD( 0x0800, 0x0400)
440   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
441   ROM_RELOAD( 0xfc00, 0x0400)
471    ROM_REGION(0x10000, "maincpu", 0)
472    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
473    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
474    ROM_LOAD("429.cpu", 0x2000, 0x0400, CRC(7885a384) SHA1(1770662af7d48ad8297097a9877c5c497119978d))
475    ROM_REGION(0x10000, "cpu2", 0)
476    ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f))
477    ROM_RELOAD( 0x0800, 0x0400)
478    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
479    ROM_RELOAD( 0xfc00, 0x0400)
442480ROM_END
443481
444482/*-------------------------------------------------------------------
445483/ System 1 Test prom
446484/-------------------------------------------------------------------*/
447485ROM_START(sys1test)
448   ROM_REGION(0x10000, "maincpu", 0)
449   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
450   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
451   ROM_LOAD("test.cpu", 0x2000, 0x0400, CRC(8b0704bb) SHA1(5f0eb8d5af867b815b6012c9d078927398efe6d8))
486    ROM_REGION(0x10000, "maincpu", 0)
487    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
488    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
489    ROM_LOAD("test.cpu", 0x2000, 0x0400, CRC(8b0704bb) SHA1(5f0eb8d5af867b815b6012c9d078927398efe6d8))
452490ROM_END
453491
454492
trunk/src/mame/drivers/lindbergh.c
r242199r242200
2424On this red box the CPU is a Celeron D at 2.8GHz. RAM is 512M DDR PC3200
2525The box has Sega number 845-0001D-02
2626
27
28Security
29--------
30
31The security seems to work in multiple steps.  The information there
32is a combination of our research and things found on the internet.
33
34- At boot, the bios unlocks the CF card through an IDE 0x82 command
35  with a currently unknown key.  There is also a hardware heartbeat
36  signal on the IDE bus to avoid hotswapping.
37
38- The system boots on the CF which holds a customized Montavista linux.
39
40- The CF system can either install the game (from the DVD) or start it (on the HD)
41
42- The DVD is decrypted (probably on-the-fly with aesloop) using a
43  fixed system key (all the dvd images start identically).
44
45- The PIC includes an AES-CBC engine and has as data an IV, a key,
46  some game-specific identification information, and two pre and
47  post-whitening values.  Everything but the key is dumpable through
48  commands, but the key seems well-protected.  It's not realistic to
49  decrypt very large amounts of data through it though, the bandwidth
50  would be way too low.
51
52- The HD is probably unlocked by the CF and bootstrap code is
53  decrypted through the PIC.  That code in turn loop-decrypts/mounts all the
54  data needed from the partition (probably /usr, /X11R6 and /home).
55
56Currently, we do not have access to the CF image, making it impossible
57to do a complete boot/install.
58
59
2760Lindbergh Game List
2861-------------------
2962                                               Security
r242199r242200
371404   MCFG_AC97_ADD(                    ":pci:1f.5",      0x808625a6, 0x02, 0x103382c0)
372405MACHINE_CONFIG_END
373406
407#define LINDBERGH_BIOS \
408   ROM_REGION32_LE(0x100000, ":pci:1f.0", 0) /* PC bios, location 3j7 */ \
409   ROM_SYSTEM_BIOS(0, "bios0", "6.0.0010 alternate version") \
410   ROMX_LOAD("6.0.0010a.bin", 0x00000, 0x100000, CRC(10dd9b76) SHA1(1fdf1f921bc395846a7c3180fbdbc4ca287a9670), ROM_BIOS(1) ) \
411   ROM_SYSTEM_BIOS(1, "bios1", "6.0.0009") \
412   ROMX_LOAD("6.0.0009.bin",  0x00000, 0x100000, CRC(5ffdfbf8) SHA1(605bc4967b749b4e6d13fc2ebb845ba956a259a7), ROM_BIOS(2) ) \
413   ROM_SYSTEM_BIOS(2, "bios2", "6.0.0010") \
414   ROMX_LOAD("6.0.0010.bin",  0x00000, 0x100000, CRC(ea2bf888) SHA1(c9c5b6f0d4f4f36620939b15dd2f128a74347e37), ROM_BIOS(3) ) \
415\
416   ROM_REGION(0x400000, ":pci:1e.0:03.0", 0) /* Baseboard MPC firmware */ \
417   ROM_LOAD("fpr-24370b.ic6", 0x000000, 0x400000, CRC(c3b021a4) SHA1(1b6938a50fe0e4ae813864649eb103838c399ac0)) \
418\
419   ROM_REGION32_LE(0x10000, ":pci:01.0:00.0", 0) /* Geforce bios extension (custom or standard?) */ \
420   ROM_LOAD("vid_bios.u504", 0x00000, 0x10000, CRC(f78d14d7) SHA1(f129787e487984edd23bf344f2e9500c85052275)) \
421
374422ROM_START(lindbios)
375   ROM_REGION32_LE(0x100000, ":pci:1f.0", 0) // PC bios, location 3j7
376   ROM_SYSTEM_BIOS(0, "bios0", "6.0.0010 alternate version")
377   ROMX_LOAD("6.0.0010a.bin", 0x00000, 0x100000, CRC(10dd9b76) SHA1(1fdf1f921bc395846a7c3180fbdbc4ca287a9670), ROM_BIOS(1) )
378   ROM_SYSTEM_BIOS(1, "bios1", "6.0.0009")
379   ROMX_LOAD("6.0.0009.bin", 0x00000, 0x100000, CRC(5ffdfbf8) SHA1(605bc4967b749b4e6d13fc2ebb845ba956a259a7), ROM_BIOS(2) )
380   ROM_SYSTEM_BIOS(2, "bios2", "6.0.0010")
381   ROMX_LOAD("6.0.0010.bin", 0x00000, 0x100000, CRC(ea2bf888) SHA1(c9c5b6f0d4f4f36620939b15dd2f128a74347e37), ROM_BIOS(3) )
423   LINDBERGH_BIOS
424ROM_END
382425
426ROM_START(hotd4)
427   LINDBERGH_BIOS
383428
384   ROM_REGION(0x400000, ":pci:1e.0:03.0", 0) // Baseboard MPC firmware
385   ROM_LOAD("fpr-24370b.ic6", 0x000000, 0x400000, CRC(c3b021a4) SHA1(1b6938a50fe0e4ae813864649eb103838c399ac0))
429   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0427 / 317-0427-COM
430   ROM_LOAD("317-0427-com.bin", 0, 0x2000, CRC(ef4a120c) SHA1(fcc0386fa708af9e010e40e1d259a6bd95e8b9e2))
386431
387   ROM_REGION32_LE(0x10000, ":pci:01.0:00.0", 0) // Geforce bios extension (custom or standard?)
388   ROM_LOAD("vid_bios.u504", 0x00000, 0x10000, CRC(f78d14d7) SHA1(f129787e487984edd23bf344f2e9500c85052275))
432   DISK_REGION("dvd")
433   DISK_IMAGE_READONLY("dvp-0003a", 0, SHA1(46544e28735f55418dd78bd19446093874438264))
389434ROM_END
390435
391GAME(1999, lindbios, 0, lindbergh, 0, driver_device, 0, ROT0, "Sega Lindbergh", "Sega Lindbergh Bios", GAME_IS_SKELETON)
436ROM_START(vf5)
437   LINDBERGH_BIOS
438
439   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0438 / 317-0438-COM
440   ROM_LOAD("317-0438-com.bin", 0, 0x2000, CRC(9aeb15d3) SHA1(405ddc44b2b40b72cfe2a081a0d5e43ceb9a380e))
441
442   DISK_REGION("dvd")
443   DISK_IMAGE_READONLY("dvp-0008e", 0, NO_DUMP)
444ROM_END
445
446ROM_START(abclimax)
447   LINDBERGH_BIOS
448
449   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0440 / 317-0440-COM
450   ROM_LOAD("317-0440-com.bin", 0, 0x2000, CRC(8d09e717) SHA1(6b25982f7042541874115d33ea5d0c028140a962))
451
452   DISK_REGION("dvd")
453   DISK_IMAGE_READONLY("dvp-0009", 0, NO_DUMP)
454ROM_END
455
456ROM_START(letsgoju)
457   LINDBERGH_BIOS
458
459   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0442 / 317-0442-COM
460   ROM_LOAD("317-0442-com.bin", 0, 0x2000, CRC(b706efbb) SHA1(97c2b65e521113c5201f0b588fcb37a39148a637))
461
462   DISK_REGION("dvd")
463   DISK_IMAGE_READONLY("dvp-0011", 0, NO_DUMP)
464ROM_END
465
466ROM_START(outr2sdx)
467   LINDBERGH_BIOS
468
469   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0452 / 317-0452-COM (to verify, may be the one for OutRun 2 Special Tours)
470   ROM_LOAD("317-0452-com.bin", 0, 0x2000, CRC(f5b7bb3f) SHA1(6b179b255b3d29e5ce61902eeae4da07177a2943))
471
472   DISK_REGION("dvd")
473   DISK_IMAGE_READONLY("dvp-0015a", 0, NO_DUMP)
474ROM_END
475
476ROM_START(psmash3)
477   LINDBERGH_BIOS
478
479   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0434 / 317-0434-COM
480   ROM_LOAD("317-0434-com.bin", 0, 0x2000, CRC(70e3b202) SHA1(4925a288f937d54529abe6ef467c9c23674e47f0))
481
482   DISK_REGION("dvd")
483   DISK_IMAGE_READONLY("dvp-0005a", 0, NO_DUMP)
484ROM_END
485
486ROM_START(vtennis3)
487   LINDBERGH_BIOS
488
489   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0506 / 317-0506-JPN
490   ROM_LOAD("317-0506-jpn.bin", 0, 0x2000, NO_DUMP)
491
492   DISK_REGION("dvd")
493   DISK_IMAGE_READONLY("dvp-0005c", 0, SHA1(1fd689753c4b70dff0286cb7f623ee7fd439db62))
494ROM_END
495
496
497ROM_START(initiad4)
498   LINDBERGH_BIOS
499
500   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0486E / 317-0486-COM
501   ROM_LOAD("317-0846-com.bin", 0, 0x2000, NO_DUMP)
502
503   DISK_REGION("dvd")
504   DISK_IMAGE_READONLY("dvp-0030d", 0, SHA1(e43e6d22fab4eceb81db8309e4634e049d9c41e6))
505ROM_END
506
507ROM_START(initiad4c)
508   LINDBERGH_BIOS
509
510   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0486E / 317-0486-COM
511   ROM_LOAD("317-0846-com.bin", 0, 0x2000, NO_DUMP)
512
513   DISK_REGION("dvd")
514   DISK_IMAGE_READONLY("dvp-0030c", 0, SHA1(b1919f28539afec4c4bc52357e5210a090b5ae32))
515ROM_END
516
517ROM_START(segartv)
518   LINDBERGH_BIOS
519
520   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0504 / 317-0504-COM
521   ROM_LOAD("317-0504-com.bin", 0, 0x2000, CRC(ae7eaea8) SHA1(187e417e0b5543d95245364b547925426aa9f80e))
522
523   DISK_REGION("dvd")
524   DISK_IMAGE_READONLY("dvp-0044", 0, SHA1(914aa23ece8aaf0f1942f77272b3a87d10f7a7db))
525ROM_END
526
527ROM_START(hotdex)
528   LINDBERGH_BIOS
529
530   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0550 / 317-0550-JPN
531   ROM_LOAD("317-0550-jpn.bin", 0, 0x2000, CRC(7e247f13) SHA1(d416b0e7742b32eb31443967e84ef93fc9e56dfb))
532
533   DISK_REGION("dvd")
534   DISK_IMAGE_READONLY("hotdex", 0, NO_DUMP)
535ROM_END
536
537ROM_START(rambo)
538   LINDBERGH_BIOS
539
540   ROM_REGION(0x2000, ":pic", 0) // PIC security 253-5508-0540 / 317-0540-COM
541   ROM_LOAD("317-0540-com.bin", 0, 0x2000, CRC(fd9a7bc0) SHA1(140b05573e25a41c1237c7a96c8e099efbfd75b8))
542
543   DISK_REGION("dvd")
544   DISK_IMAGE_READONLY("dvp-0069", 0, SHA1(1f3401b652c45db2b843360aff9cda862c2832c0))
545ROM_END
546
547ROM_START(hummerxt)
548   LINDBERGH_BIOS
549
550   ROM_REGION(0x2000, ":pic", 0) // PIC security id unknown
551   ROM_LOAD("hummerextreme.bin", 0, 0x2000, CRC(524bc69a) SHA1(c79b6bd384196c169e40e623f4c80c8b9eb11f81))
552ROM_END
553
554ROM_START(lbvbiosu)
555   LINDBERGH_BIOS
556
557   DISK_REGION("dvd")
558   DISK_IMAGE_READONLY("dvp-0021b", 0, SHA1(362ac028ba19ba4762678953a033034a5ee8ad53))
559ROM_END
560
561GAME(1999, lindbios,         0, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Sega Lindbergh Bios",                      GAME_IS_BIOS_ROOT)
562GAME(2005, hotd4,     lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "House of the Dead 4 (Export)",             GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
563GAME(2005, vf5,       lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Virtua Fighter 5 (Export)",                GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
564GAME(2006, abclimax,  lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "After Burner Climax (Export)",             GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
565GAME(2006, letsgoju,  lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Let's Go Jungle (Export)",                 GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
566GAME(2006, outr2sdx,  lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Outrun 2 SP SDX",                          GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
567GAME(2006, psmash3,   lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Power Smash 3 / Virtua Tennis 3 (Export)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
568GAME(2006, vtennis3,  lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Virtua Tennis 3 (Japan)",                  GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
569GAME(2007, initiad4,  lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Initial D4 (Rev D)",                       GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
570GAME(2007, initiad4c, initiad4, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Initial D4 (Rev C)",                       GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
571GAME(2007, segartv,   lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Sega Race-TV (Export)",                    GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
572GAME(2008, hotdex,    lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "House of the Dead EX (Japan)",             GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
573GAME(2008, rambo,     lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Rambo (Export)",                           GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
574GAME(2009, hummerxt,  lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "Hummer Extreme",                           GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
575GAME(200?, lbvbiosu,  lindbios, lindbergh, 0, driver_device, 0, ROT0, "Sega", "VBios updater",                            GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_NO_SOUND)
trunk/src/mame/mame.lst
r242199r242200
51025102
51035103// Sega Lindbergh games
51045104lindbios
5105hotd4
5106vf5
5107abclimax
5108letsgoju
5109outr2sdx
5110psmash3
5111vtennis3
5112initiad4
5113initiad4c
5114segartv
5115hotdex
5116rambo
5117hummerxt
5118lbvbiosu
51055119
5106
51075120// Deniam games
51085121// they run on Sega System 16 video hardware
51095122logicpro        // (c) 1996 Deniam
trunk/src/mame/video/btime.c
r242199r242200
303303
304304      if (flip_screen())
305305      {
306         x = 31 + 16 - x;
307         y = 33 - y;
306         x = 31 - x;
307         y = 31 - y;
308308      }
309309
310310      m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
r242199r242200
339339
340340      if (flip_screen())
341341      {
342         x = 240 + 128 - x;
343         y = 256 - y + sprite_y_adjust_flip_screen;
342         x = 240 - x;
343         y = 240 - y + sprite_y_adjust_flip_screen;
344344
345345         flipx = !flipx;
346346         flipy = !flipy;
r242199r242200
391391
392392         if (flip_screen())
393393         {
394            x = 240 + 128 - x;
395            y = 256 - y;
394            x = 240 - x;
395            y = 240 - y;
396396         }
397397
398398         m_gfxdecode->gfx(2)->opaque(bitmap,cliprect,
r242199r242200
488488         if (flip_screen())
489489         {
490490            sx = 496 - sx;
491            sy = 256 - sy;
491            sy = 240 - sy;
492492         }
493493
494494         m_gfxdecode->gfx(2)->opaque(*m_background_bitmap,m_background_bitmap->cliprect(),
r242199r242200
534534      if (flip_screen())
535535      {
536536         sx = 31 - sx;
537         sy = 33 - sy;
537         sy = 31 - sy;
538538      }
539539
540540      m_gfxdecode->gfx(2)->opaque(bitmap,cliprect,
trunk/src/mess/drivers/cnsector.c
r242199r242200
44
55  Parker Brothers Code Name: Sector
66  * MP0905BNL ZA0379 (die labeled 0970F-05B)
7 
8  This is a tabletop submarine pursuit game. A grid board and small toy
9  boats are used to remember your locations (a Paint app should be ok too).
10  Refer to the official manual for more information, it is not a simple game.
711
812
913***************************************************************************/
r242199r242200
5458
5559***************************************************************************/
5660
57// Devices with TMS09x0 strobe the outputs very fast, it is unnoticeable to the user.
61// The device strobes the outputs very fast, it is unnoticeable to the user.
5862// To prevent flickering here, we need to simulate a decay.
5963
6064// decay time, in steps of 10ms
r242199r242200
114118
115119   // read selected button rows
116120   for (int i = 0; i < 5; i++)
117      if (m_o & (1 << i))
121      if (m_o >> i & 1)
118122         k |= m_button_matrix[i]->read();
119123   
120124   return k;
r242199r242200
149153
150154static INPUT_PORTS_START( cnsector )
151155   PORT_START("IN.0") // O0
152   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) // ?  next
153   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) // ?  left
154   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) // nc?
155   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) // ?  range
156   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Next Ship")
157   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_NAME("Left")
158   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
159   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("Range")
156160
157161   PORT_START("IN.1") // O1
158   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) // ?  aim
159   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) // ?  right
160   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) // nc?
161   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) // ?nc
162   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("Aim")
163   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("Right")
164   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
165   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
162166
163167   PORT_START("IN.2") // O2
164   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) // ?  fire
165   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) // ?  evasive
166   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) // nc?
167   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) // ?  recall
168   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("Fire")
169   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("Evasive Sub") // expert button
170   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
171   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("Recall")
168172
169173   PORT_START("IN.3") // O3
170   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) // ?  finder
171   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) // ?  slow
172   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) // nc?
173   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) // ?nc
174   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME("Sub Finder") // expert button
175   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("Slower")
176   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
177   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
174178
175179   PORT_START("IN.4") // O4
176   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) // ?  teach
177   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) // ?  fast
178   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) // nc?
179   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) // ?  move
180   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME("Teach Mode")
181   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("Faster")
182   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
183   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME("Move Ship")
180184INPUT_PORTS_END
181185
182186
r242199r242200
194198   memset(m_leds_decay, 0, sizeof(m_leds_decay));
195199   m_o = 0;
196200   
201   save_item(NAME(m_leds_state));
202   save_item(NAME(m_leds_cache));
203   save_item(NAME(m_leds_decay));
197204   save_item(NAME(m_o));
198205}
199206
r242199r242200
238245ROM_END
239246
240247
241CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
248CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
trunk/src/mess/drivers/comp4.c
r242199r242200
3737   required_device<cpu_device> m_maincpu;
3838   required_ioport_array<3> m_button_matrix;
3939
40   UINT16 m_o;
41
4042   UINT16 m_leds_state;
4143   UINT8 m_leds_decay[0x10];
42   UINT16 m_r;
43   UINT16 m_o;
4444
4545   DECLARE_READ8_MEMBER(read_k);
4646   DECLARE_WRITE16_MEMBER(write_o);
r242199r242200
102102
103103   // read selected button rows
104104   for (int i = 0; i < 3; i++)
105      if (m_o & (1 << (i + 1)))
105      if (m_o >> (i+1) & 1)
106106         k |= m_button_matrix[i]->read();
107107   
108108   return k;
r242199r242200
116116   // R2    R7
117117   // R1    R6
118118   // R0    R5
119   m_r = data;
120   
121   m_leds_state = m_r;
119   m_leds_state = data;
122120   leds_update();
123121}
124122
r242199r242200
170168{
171169   m_leds_state = 0;
172170   memset(m_leds_decay, 0, sizeof(m_leds_decay));
173   m_r = 0;
174171   m_o = 0;
175172   
176   save_item(NAME(m_r));
173   save_item(NAME(m_leds_state));
174   save_item(NAME(m_leds_decay));
177175   save_item(NAME(m_o));
178176}
179177
trunk/src/mess/drivers/gamate.c
r242199r242200
11/******************************************************************************
22 PeT mess@utanet.at 2007, 2014
3 Peter Wilhelmsen peter.wilhelmsen@gmail.com
4 Morten Shearman Kirkegaard morten+gamate@afdelingp.dk
35******************************************************************************/
46
57#include "emu.h"
r242199r242200
1517      : driver_device(mconfig, type, tag)
1618      , m_maincpu(*this, "maincpu")
1719      , m_cart(*this, "cartslot")
18//      , m_gfxdecode(*this, "gfxdecode")
20//      , m_gfxdecode(*this, "gfxdecode")
1921      , m_io_joy(*this, "JOY")
20      ,   m_palette(*this, "palette")
22      ,   m_palette(*this, "palette")
23      , m_cart_rom(*this, "cart_rom")
24      , m_bios(*this, "bios")
2125   { }
2226
2327   DECLARE_PALETTE_INIT(gamate);
24   DECLARE_READ8_MEMBER(video_r);
25   DECLARE_READ8_MEMBER(pad_r);
26   DECLARE_WRITE8_MEMBER(video_w);
27   DECLARE_WRITE8_MEMBER(audio_w);
28   DECLARE_WRITE8_MEMBER(bios_w);
28   DECLARE_READ8_MEMBER(protection_r);
29   DECLARE_READ8_MEMBER(gamate_cart_protection_r);
30   DECLARE_WRITE8_MEMBER(gamate_cart_protection_w);
31   DECLARE_READ8_MEMBER(gamate_video_r);
32   DECLARE_READ8_MEMBER(gamate_pad_r);
33   DECLARE_WRITE8_MEMBER(gamate_video_w);
34   DECLARE_READ8_MEMBER(gamate_audio_r);
35   DECLARE_WRITE8_MEMBER(gamate_audio_w);
36   DECLARE_WRITE8_MEMBER(gamate_bios_w);
2937   DECLARE_DRIVER_INIT(gamate);
3038   UINT32 screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3139   INTERRUPT_GEN_MEMBER(gamate_interrupt);
40   TIMER_CALLBACK_MEMBER(gamate_timer);
41   TIMER_CALLBACK_MEMBER(gamate_timer2);
3242
3343private:
3444   virtual void machine_start();
3545
3646   struct
3747   {
38   UINT8 reg[8];
39   struct {
40      bool write; // else tilemap
41      bool page2; // else page1
42      UINT8 data[2][0x100][0x20];
43      } bitmap;
44   struct {
45      UINT8 data[32][32];
46   } tilemap;
47   UINT8 x, y;
48     UINT8 reg[8];
49     struct {
50       bool write;
51       bool page2; // else page1
52         UINT8 ypos, xpos/*tennis*/;
53       UINT8 data[2][0x100][0x20];
54     } bitmap;
55     UINT8 x, y;
56      bool y_increment;
4857   } video;
4958
50//  UINT8 m_ports[5];
51//  UINT8 m_ram[0x4000];
59   struct {
60      int bit_shifter;
61      UINT8 cartridge_byte;
62      UINT16 address; // in reality something more like short local cartridge address offset
63      bool unprotected;
64      bool failed;
65   } card_protection;
66
5267   required_device<cpu_device> m_maincpu;
5368   required_device<generic_slot_device> m_cart;
54//  required_device<gfxdecode_device> m_gfxdecode;
69//   required_device<gfxdecode_device> m_gfxdecode;
5570   required_ioport m_io_joy;
5671   required_device<palette_device> m_palette;
72   required_shared_ptr<UINT8> m_cart_rom;
73   required_shared_ptr<UINT8> m_bios;
74   emu_timer *timer1;
75   emu_timer *timer2;
5776};
5877
59WRITE8_MEMBER( gamate_state::video_w )
78WRITE8_MEMBER( gamate_state::gamate_cart_protection_w )
6079{
61   if (m_maincpu->pc()<0xf000)
62   logerror("%.6f %04x video write %04x %02x\n", machine().time().as_double(), m_maincpu->pc(), offset,data);
63   video.reg[offset]=data;
6480   switch (offset) {
65   case 1: video.bitmap.write=data&0x40;break; // probably y increment
66   case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
67   case 5: video.y=data;break;
68   case 7:
69   if (video.bitmap.write) {
70      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
71      video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
72      else
73      logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
74      video.y++;
75   } else {
76      if (video.x<ARRAY_LENGTH(video.tilemap.data[0]) && (video.y&0x1f)<ARRAY_LENGTH(video.tilemap.data))
77      video.tilemap.data[video.y&0x1f][video.x]=data;
78      else
79      logerror("%.6f %04x video tilemap %x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x, video.y);
80      video.x++;
81   case 0:
82      card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0);
83      card_protection.bit_shifter++;
84      if (card_protection.bit_shifter>=8) {
85         card_protection.cartridge_byte=m_cart_rom[card_protection.address++];
86         card_protection.bit_shifter=0;
87      }
88      break;
8189   }
90}
91READ8_MEMBER( gamate_state::gamate_cart_protection_r )
92{
93   UINT8 ret=1;
94   switch (offset) {
95   case 0:
96      ret=(card_protection.cartridge_byte&0x80)?2:0;
97      card_protection.cartridge_byte<<=1;
98      card_protection.bit_shifter++;
99      if (card_protection.bit_shifter>=8) {
100         card_protection.bit_shifter=0;
101         card_protection.cartridge_byte=m_cart_rom[card_protection.address++];
102         card_protection.unprotected=true;
103         if (!card_protection.failed) {
104         } // now protection chip on cartridge activates cartridge chip select on cpu accesses
105      }
106      break;
82107   }
108   return ret;
83109}
84110
85READ8_MEMBER( gamate_state::video_r )
111READ8_MEMBER( gamate_state::protection_r ) { return 1; }
112
113WRITE8_MEMBER( gamate_state::gamate_video_w )
86114{
87   if (offset!=6) return 0;
88   UINT8 data=0;
89   if (video.bitmap.write) {
90      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
91      data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
92      else
93      logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
94   } else {
95      if (video.x<ARRAY_LENGTH(video.tilemap.data[0]) && video.y<ARRAY_LENGTH(video.tilemap.data))
96      data=video.tilemap.data[video.y][video.x];
97      else
98      logerror("%.6f video tilemap %x %x invalid\n",machine().time().as_double(),video.x, video.y);
99   }
100   if (m_maincpu->pc()<0xf000)
101   logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
102   return data;
115  video.reg[offset]=data;
116  switch (offset) {
117  case 1: video.bitmap.write=data&0xc0; // more addressing mode
118      video.y_increment=data&0x40;
119      break;
120   case 2: video.bitmap.xpos=data;break; // at least 7 bits
121   case 3: video.bitmap.ypos=data;break; // at least 7 bits
122  case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
123  case 5: video.y=data;break;
124  case 7:
125    if (video.bitmap.write) {
126      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) && video.y<ARRAY_LENGTH(video.bitmap.data[0]))
127        video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
128      else
129        logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
130    } else {
131        video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data;
132    }   
133    if (video.y_increment) video.y++;
134      else video.x++;
135  }
103136}
104137
105WRITE8_MEMBER( gamate_state::audio_w )
138READ8_MEMBER( gamate_state::gamate_video_r )
106139{
107   //  logerror("%.6f audio write %04x %02x\n",timer_get_time(),offset,data);
140   if (offset!=6) return 0;
141  UINT8 data=0;
142  if (video.bitmap.write) {
143      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) && video.y<ARRAY_LENGTH(video.bitmap.data[0]))
144        data=video.bitmap.data[video.bitmap.page2][video.y][video.x];   
145      else
146        logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
147  } else {
148    data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
149  }
150  if (m_maincpu->pc()<0xf000)
151    logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
152  return data;
108153}
109154
110WRITE8_MEMBER( gamate_state::bios_w )
155WRITE8_MEMBER( gamate_state::gamate_audio_w )
111156{
112   UINT8 *memory = memregion("maincpu")->base(); //memory_region (REGION_CPU1);
157  logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data);
158}
113159
114   unsigned short stack=m_maincpu->sp();//cpu_get_reg(M6502_S)|0x100;
115   unsigned short address= memory[stack+1]|(memory[stack+2]<<8);
116   switch (offset) {
117   case 0x12:
118   logerror("%.6f bios api %04x %04x string:%04x x:%02x y:%02x\n",
119            machine().time().as_double(), offset|0xf000, address,
120            memory[0]|(memory[1]<<8), 0, 0);//cpu_get_reg(M6502_X), cpu_get_reg(M6502_Y) );
121   break;
122   case 0x15:
123   logerror("%.6f bios api %04x %04x string:%04x x:%02x y:%02x\n",
124            machine().time().as_double(), offset|0xf000, address,
125            memory[0]|(memory[1]<<8), 0, 0); //cpu_get_reg(M6502_X), cpu_get_reg(M6502_Y) );
126   break;
127   case 0x18:
128   logerror("%.6f bios api %04x %04x string:%04x\n",machine().time().as_double(), offset|0xf000, address,
129            memory[0]|(memory[1]<<8) );
130   break;
131   case 0x1b:
132   logerror("%.6f bios api %04x %04x string:%04x\n",machine().time().as_double(), offset|0xf000, address,
133            memory[0]|(memory[1]<<8) );
134   break;
135   case 0x1e:
136   logerror("%.6f bios api %04x %04x string:%04x\n",machine().time().as_double(), offset|0xf000, address,
137            memory[0]|(memory[1]<<8) );
138   break;
139   case 0x2a: // cube up menu lighting
140   logerror("%.6f bios api %04x %04x 1c1d:%04x a:%02x x:%02x y:%02x\n",
141            machine().time().as_double(), offset|0xf000, address,
142            memory[0x1c]|(memory[0x1d]<<8),
143            0,0,0);//cpu_get_reg(M6502_A), cpu_get_reg(M6502_X), cpu_get_reg(M6502_Y) );
144   break;
145   default:
146   logerror("%.6f bios api %04x %04x\n",machine().time().as_double(), offset|0xf000, address);
147   }
160READ8_MEMBER( gamate_state::gamate_audio_r )
161{
162  logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset);
163   return 0;
148164}
149165
150READ8_MEMBER( gamate_state::pad_r )
166
167READ8_MEMBER( gamate_state::gamate_pad_r )
151168{
152   UINT8 data=m_io_joy->read();//readinputport(0);
153   //  logerror("%.6f pad read %04x %02x\n",timer_get_time(),offset,data);
154   return data;
169  UINT8 data=m_io_joy->read();
170  return data;
155171}
156172
157173static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state )
158//  AM_RANGE(0x4000, 0x7fff) AM_READWRITE(gmaster_io_r, gmaster_io_w)
174    AM_RANGE(0x0000, 0x03ff) AM_RAM
175  AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
176  AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
177  AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
178  AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
159179
160   AM_RANGE(0x0000, 0x03ff) AM_RAM
161   AM_RANGE(0x4000, 0x400d) AM_WRITE(audio_w)
162   AM_RANGE(0x4400, 0x4400) AM_READ(pad_r)
163//  AM_RANGE(0x5006, 0x5006) AM_READ(video_r)
164//  AM_RANGE(0x5000, 0x5007) AM_WRITE(video_w)
165   AM_RANGE(0x5000, 0x5007) AM_READWRITE(video_r, video_w)
166
167   AM_RANGE(0x6000, 0xdfff) AM_ROM
168   AM_RANGE(0xf000, 0xffff) AM_ROM
180  AM_RANGE(0x6000, 0xdfff) AM_ROM AM_SHARE("cart_rom")
181   AM_RANGE(0x6000, 0x6002) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w)
182//   AM_RANGE(0x6000, 0xdfff) AM_READWRITE(gamate_cart_r, gamate_cart_w)
183  AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
169184ADDRESS_MAP_END
170185
171186
r242199r242200
173188   PORT_START("JOY")
174189   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP)
175190   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
176   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // left?
177   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) // rechts?
191   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
192   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
178193   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("A")
179194   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("B")
180195   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START) PORT_NAME("start/pause")
181196   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("select")
182197INPUT_PORTS_END
183198
184#if 0
185199static const struct gfx_layout gamate_charlayout =
186200{
187      4,      /* width of object */
188      1,      /* height of object */
189      256,/* 256 characters */
190      2,      /* bits per pixel */
191      { 0,1 }, /* no bitplanes */
192      /* x offsets */
193      { 0,2,4,6 },
194      /* y offsets */
195      { 0 },
196      8*1 /* size of 1 object in bits */
201        4,      /* width of object */
202        1,      /* height of object */
203        256,/* 256 characters */
204        2,      /* bits per pixel */
205        { 0,1 }, /* no bitplanes */
206        /* x offsets */
207        { 0,2,4,6 },
208        /* y offsets */
209        { 0 },
210        8*1 /* size of 1 object in bits */
197211};
198212
199213static const unsigned short gamate_palette[4] =
200214{
201215   0,1,2,3
202216};
203#endif
204217
205218/* palette in red, green, blue tribles */
206219static const unsigned char gamate_colors[4][3] =
207220{
208   { 255,255,255 },
209   { 0xa0, 0xa0, 0xa0 },
210   { 0x60, 0x60, 0x60 },
211   { 0, 0, 0 }
221  { 255,255,255 },
222  { 0xa0, 0xa0, 0xa0 },
223  { 0x60, 0x60, 0x60 },
224  { 0, 0, 0 }
212225};
213226
214#if 0
215227static GFXDECODE_START( gamate_charlayout )
216      GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
228        GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
217229GFXDECODE_END
218#endif
219230
220231PALETTE_INIT_MEMBER(gamate_state, gamate)
221232{
r242199r242200
245256
246257UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
247258{
248   int x, y, j;
249   for (y=0;y<160;y++) {
250   for (x=0, j=0;x<160;x+=8, j++) {
251//  for (y=0;y<256;y++) {
252//    for (x=0, j=0;x<256;x+=8, j++) {
253      UINT8 d1=video.bitmap.data[0][y][j];
254      UINT8 d2=video.bitmap.data[1][y][j];
255#if 0
256      UINT16 data=PLANES2_2_PACKED(d1, d2);
257      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), (data>>8)&0xff,0,0,0, x, y);
258      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), data&0xff,0,0,0, x+4, y);
259#else
259  int x, y, j;
260  for (y=0;y<160;y++) {
261    for (x=0, j=0;x<160;x+=8, j++) {
262//      UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][j+video.bitmap.xpos/8];
263//      UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][j+video.bitmap.xpos/8];
264      UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)%200][j]; // kill shot, tornade
265      UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)%200][j];
260266         BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
261267         BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
262#endif
263   }
264   }
265   for (y=0; y<32; y++) {
266   for (x=0; x<32; x++) {
267#if 0
268      UINT8 d=video.tilemap.data[y][x];
269      if (d) {
270      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8);
271      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+1);
272      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+2);
273      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+3);
274      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+4);
275      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+5);
276      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+6);
277      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+7);
278      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8);
279      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+1);
280      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+2);
281      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+3);
282      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+4);
283      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+5);
284      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+6);
285      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+7);
286      } else {
287      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8);
288      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+1);
289      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+2);
290      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+3);
291      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+4);
292      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+5);
293      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+6);
294      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+7);
295      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8);
296      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+1);
297      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+2);
298      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+3);
299      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+4);
300      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+5);
301      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+6);
302      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+7);
303      }
304#endif
305   }
306   }
268    }
269  }
307270   return 0;
308271}
309272
310273DRIVER_INIT_MEMBER(gamate_state,gamate)
311274{
312275   memset(&video, 0, sizeof(video));/* memset(m_ram, 0, sizeof(m_ram));*/
313   UINT8 *gfx=memregion("gfx1")->base();   for (int i=0; i<256; i++) gfx[i]=i;
276   UINT8 *gfx=memregion("gfx1")->base();   for (int i=0; i<256; i++) gfx[i]=i;
277   timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer),this));
278   timer2 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer2),this));
314279}
315280
316281
317282void gamate_state::machine_start()
318283{
319   if (m_cart->exists())
284   if (m_cart->exists()) {
320285      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0xdfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
286//      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
287   }
288   m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // $47 protection readback
289   card_protection.address=0x6005-0x6001;
290   card_protection.bit_shifter=0;
291   card_protection.cartridge_byte=m_cart_rom[card_protection.address++];
292   card_protection.failed=false;
293   card_protection.unprotected=false;
294   timer2->enable(TRUE);
295   timer2->reset(m_maincpu->cycles_to_attotime(1000));
321296#if 0
322297   save_item(NAME(m_video.data));
323298   save_item(NAME(m_video.index));
r242199r242200
331306#endif
332307}
333308
309TIMER_CALLBACK_MEMBER(gamate_state::gamate_timer)
310{
311   m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
312   timer1->enable(FALSE);
313}
334314
315TIMER_CALLBACK_MEMBER(gamate_state::gamate_timer2)
316{
317   m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
318   timer1->enable(TRUE);
319   timer1->reset(m_maincpu->cycles_to_attotime(10/* cycles short enought to clear irq line early enough*/));
320   timer2->enable(TRUE);
321   timer2->reset(m_maincpu->cycles_to_attotime(40000));
322}
323
324
335325INTERRUPT_GEN_MEMBER(gamate_state::gamate_interrupt)
336326{
337//  m_maincpu->set_input_line(UPD7810_INTFE1, ASSERT_LINE);
338   static bool state=false;
339//  m_maincpu->set_input_line(M6502_IRQ_LINE, state?ASSERT_LINE: CLEAR_LINE);
340   state=!state;
341//  cpu_set_irq_line(0, M6502_INT_IRQ, PULSE_LINE);
342327}
343328
344329static MACHINE_CONFIG_START( gamate, gamate_state )
r242199r242200
348333
349334   MCFG_SCREEN_ADD("screen", LCD)
350335   MCFG_SCREEN_REFRESH_RATE(60)
351#if 0
352   MCFG_SCREEN_SIZE(512, 256)
353   MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
336#ifdef SHOW_TILEMAP
337   MCFG_SCREEN_SIZE(256, 152+256)
338   MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 152+256-1)
354339#else
355   MCFG_SCREEN_SIZE(160, 160)
356   MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 160-1)
340   MCFG_SCREEN_SIZE(160, 152)
341   MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 152-1)
357342#endif
358343   MCFG_SCREEN_UPDATE_DRIVER(gamate_state, screen_update_gamate)
359344   MCFG_SCREEN_PALETTE("palette")
360345
361//  MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate )
346//   MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate )
362347   MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gamate_colors))
363//  MCFG_PALETTE_INDIRECT_ENTRIES(4)
348//   MCFG_PALETTE_INDIRECT_ENTRIES(4)
364349   MCFG_PALETTE_INIT_OWNER(gamate_state, gamate)
365350   MCFG_DEFAULT_LAYOUT(layout_lcd)
366351
367352   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "gamate_cart")
368353   MCFG_GENERIC_MANDATORY
369354
370   MCFG_SOFTWARE_LIST_ADD("cart_list", "gamate")
355   MCFG_SOFTWARE_LIST_ADD("cart_list","gamate")
371356MACHINE_CONFIG_END
372357
373358
374359ROM_START(gamate)
375360   ROM_REGION(0x10000,"maincpu", 0)
376   ROM_LOAD("gamate.bin", 0xf000, 0x1000, BAD_DUMP CRC(b8bf539b) SHA1(d00cb43b8a4cb0cc7fea06bee5f08490a71f5690) )
377//  ROM_LOAD("gamate.bin", 0xf000, 0x1000, CRC(b8bf539b) SHA1(d00cb43b8a4cb0cc7fea06bee5f08490a71f5690) )
378   ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF)
361   ROM_LOAD("gamate_bios_umc.bin", 0xf000, 0x1000, CRC(07090415) SHA1(ea449dc607601f9a68d855ad6ab53800d2e99297) )
362 ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF)
379363ROM_END
380364
381365
382366/*    YEAR  NAME      PARENT  COMPAT    MACHINE   INPUT    CLASS          INIT      COMPANY    FULLNAME */
383CONS( 19??, gamate,  0,      0,        gamate,  gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NOT_WORKING | GAME_NO_SOUND)
367CONS( 19??, gamate,  0,      0,        gamate,  gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NO_SOUND)
368
369
trunk/src/mess/drivers/mc1000.c
r242199r242200
453453   MCFG_CASSETTE_ADD("cassette")
454454   MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
455455
456   MCFG_SOFTWARE_LIST_ADD("cass_list", "mc1000_cass")
457
456458   MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
457459   MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(mc1000_state, write_centronics_busy))
458460
trunk/src/mess/drivers/megadriv.c
r242199r242200
773773   ROM_SYSTEM_BIOS(0, "v100s", "v1.00S")
774774   ROMX_LOAD( "mpr-14088h.bin", 0x000000,  0x020000, CRC(3773d5aa) SHA1(bbf729a1aaa1667b783749299e1ad932aaf5f253), ROM_BIOS(1) | ROM_GROUPWORD | ROM_REVERSE)
775775   /* Confirmed by ElBarto */
776   ROM_SYSTEM_BIOS(1, "v100g", "v1.00g")
776   ROM_SYSTEM_BIOS(1, "v100g", "v1.00G")
777777   ROMX_LOAD( "epr-14088b.bin", 0x000000,  0x020000, CRC(69ed6ccd) SHA1(27d11c3836506f01ee81cd142c0cd8b51abebbd2), ROM_BIOS(2) | ROM_GROUPWORD | ROM_REVERSE)
778778   /* Confirmed by ElBarto */
779779   ROM_SYSTEM_BIOS(2, "v100l", "v1.00L")
780780   ROMX_LOAD( "mpr-14088c.bin", 0x000000,  0x020000, CRC(03134289) SHA1(d60cb5a53f26d6b13e354bc149217587f2301718), ROM_BIOS(3) | ROM_GROUPWORD | ROM_REVERSE)
781781   /* Confirmed by ElBarto */
782   ROM_SYSTEM_BIOS(3, "v100o", "v1.00o")
782   ROM_SYSTEM_BIOS(3, "v100o", "v1.00O")
783783   ROMX_LOAD( "epr-14088d.bin", 0x000000,  0x020000, CRC(dfa95ee9) SHA1(e13666c76fa0a2e94e2f651b26b0fd625bf55f07), ROM_BIOS(4) | ROM_GROUPWORD | ROM_REVERSE)
784   ROM_SYSTEM_BIOS(4, "v100p", "v1.00P")
785   ROMX_LOAD( "megacd_model1_bios_1_00p_j.bin", 0x000000,  0x020000, CRC(9d2da8f2) SHA1(4846f448160059a7da0215a5df12ca160f26dd69), ROM_BIOS(5) )
784   ROM_SYSTEM_BIOS(4, "v100p", "v1.00P")   // CRC: e2e70bc8 when byteswapped
785   ROMX_LOAD( "epr-14088e.bin", 0x000000,  0x020000, CRC(9d2da8f2) SHA1(4846f448160059a7da0215a5df12ca160f26dd69), ROM_BIOS(5) )
786786ROM_END
787787
788788/* Asia bios, when run in USA region will show :
trunk/src/mess/drivers/merlin.c
r242199r242200
7878   
7979   // read selected button rows
8080   for (int i = 0; i < 4; i++)
81      if (m_o & (1 << i))
81      if (m_o >> i & 1)
8282         k |= m_button_matrix[i]->read();
8383
8484   return k;
trunk/src/mess/drivers/ngen.c
r242199r242200
99   level 3 - timer (from PIT, presumably channel 0? Patent says "channel 3")
1010   level 4 - "interrupt detector" - keyboard, printer, RTC
1111   level 7 - floppy/hard disk
12   
13    To get to "menu mode", press Space quickly after reset (might need good timing)
14    The bootstrap ROM version number is displayed, along with "B,D,L,M,P,T:"
15    You can press one of these keys for the following tests:
16    B: Bootstrap
17       Loads the system image file (from disk or master workstation)
18    D: Dump
19       RAM contents are dumped to a local disk drive or master workstation
20    L: Load
21       Loads the system image file, then enters the Panel Debugger.  Exiting the Panel
22       Debugger will continue execution of the system image
23    M: Memory Test
24       Continuously performs the Memory Test until the system is reset.
25    P: Panel Debugger
26       Enters the Panel Debugger
27    T: Type of Operating System
28       Gives an "OS:" prompt, at which you can enter the number of the system image to
29       load at the master workstation.
30       
31    Panel Debugger:
32    - Open/Modify RAM
33    Enter an address (seg:off) followed by a forward-slash, the contents of this word will
34    appear, you can enter a value to set it to, or just press Next (default: Enter) to leave
35    it as is.  It will then go on to the next word.  Pressing Return (scan code unknown
36    currently) will return to the debugger prompt.
37    - Open/Modify Register
38    Enter the register only, and the contents will appear, you can leave it or alter it (you
39    must enter all digits (eg: 0A03 if you're modifying DX) then press Return.
40    - I/O to or from a port
41    Input: Address (segment is ignored, and not required) followed by I, a byte is read from
42    the port defined by the offset, and the byte is displayed.
43    Output: Address followed by O, you are now prompted with an '='.  Enter the byte to send
44    to the port, and press Return.
45    - Set Haltpoint:
46    Enter an address (seg:off) followed by H.  Sets a haltpoint at the specified address.  Does
47    not work for ROM addresses.  Only one allowed at a time.  Haltpoint info is stored at
48    0000:01F0.  Uses a software interrupt (INT 7C), rather than INT 3.
49   
50    To start or continue from the current address, enter P.
51    To start from a specific address, enter the address (seg:off) followed by a G.
1252*/
1353
1454#include "emu.h"
r242199r242200
303343         ret = m_viduart->status_r(space,0);
304344      break;
305345   case 0x1a0:  // I/O control register?
306      ret = m_control;  // end of DMA transfer? (maybe a per-channel EOP?) Add a '| 0x40' to force a serial I/O failure, so that the keyboard can be tested
346      ret = m_control;  // end of DMA transfer? (maybe a per-channel EOP?) Bit 6 is set during a transfer?
307347      break;
308348   case 0x1b1:
309349      ret = 0;
r242199r242200
542582
543583ROM_START( ngen )
544584   ROM_REGION( 0x2000, "bios", 0)
545   ROM_LOAD16_BYTE( "72-00414_80186_cpu.bin",  0x000000, 0x001000, CRC(e1387a03) SHA1(ddca4eba67fbf8b731a8009c14f6b40edcbc3279) )
585   ROM_LOAD16_BYTE( "72-00414_80186_cpu.bin",  0x000000, 0x001000, CRC(e1387a03) SHA1(ddca4eba67fbf8b731a8009c14f6b40edcbc3279) )  // bootstrap ROM v8.4
546586   ROM_LOAD16_BYTE( "72-00415_80186_cpu.bin",  0x000001, 0x001000, CRC(a6dde7d9) SHA1(b4d15c1bce31460ab5b92ff43a68c15ac5485816) )
547587ROM_END
548588
trunk/src/mess/drivers/simon.c
r242199r242200
6666   for (int i = 0; i < 4; i++)
6767   {
6868      const int r[4] = { 0, 1, 2, 9 };
69      if (m_r & (1 << r[i]))
69      if (m_r >> r[i] & 1)
7070         k |= m_button_matrix[i]->read();
7171   }
7272
trunk/src/mess/drivers/starwbc.c
r242199r242200
22// copyright-holders:hap
33/***************************************************************************
44
5  Kenner Star Wars: Electronic Battle Command Game
6  * TMS1100 MCU, marked MP3438A
5  Kenner Star Wars - Electronic Battle Command
6  * TMS1100 MCU, labeled MP3438A
7 
8  This is a small tabletop space-dogfighting game. To start the game,
9  press BASIC/INTER/ADV and enter P#(number of players), then
10  START TURN. Refer to the official manual for more information.
711
812
913***************************************************************************/
1014
1115#include "emu.h"
1216#include "cpu/tms0980/tms0980.h"
17#include "sound/speaker.h"
1318
1419#include "starwbc.lh"
1520
1621
22// master clock is unknown, the value below is an approximation
23// (patent says R=51K, C=47pf, but then it sounds too low pitched)
24#define MASTER_CLOCK (350000)
25
26
1727class starwbc_state : public driver_device
1828{
1929public:
2030   starwbc_state(const machine_config &mconfig, device_type type, const char *tag)
2131      : driver_device(mconfig, type, tag),
22      m_maincpu(*this, "maincpu")
32      m_maincpu(*this, "maincpu"),
33      m_button_matrix(*this, "IN"),
34      m_speaker(*this, "speaker")
2335   { }
2436
2537   required_device<cpu_device> m_maincpu;
38   required_ioport_array<5> m_button_matrix;
39   required_device<speaker_sound_device> m_speaker;
2640
2741   UINT16 m_r;
2842   UINT16 m_o;
2943
44   UINT16 m_leds_state[0x10];
45   UINT16 m_leds_cache[0x10];
46   UINT8 m_leds_decay[0x100];
47
3048   DECLARE_READ8_MEMBER(read_k);
3149   DECLARE_WRITE16_MEMBER(write_o);
3250   DECLARE_WRITE16_MEMBER(write_r);
51   
52   TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick);
53   void leds_update();
54   void prepare_and_update();
3355
3456   virtual void machine_start();
3557};
r242199r242200
3860
3961/***************************************************************************
4062
63  LEDs
64
65***************************************************************************/
66
67// The device strobes the outputs very fast, it is unnoticeable to the user.
68// To prevent flickering here, we need to simulate a decay.
69
70// decay time, in steps of 10ms
71#define LEDS_DECAY_TIME 4
72
73void starwbc_state::leds_update()
74{
75   UINT16 active_state[0x10];
76   
77   for (int i = 0; i < 0x10; i++)
78   {
79      active_state[i] = 0;
80     
81      for (int j = 0; j < 0x10; j++)
82      {
83         int di = j << 4 | i;
84         
85         // turn on powered leds
86         if (m_leds_state[i] >> j & 1)
87            m_leds_decay[di] = LEDS_DECAY_TIME;
88         
89         // determine active state
90         int ds = (m_leds_decay[di] != 0) ? 1 : 0;
91         active_state[i] |= (ds << j);
92      }
93   }
94   
95   // on difference, send to output
96   for (int i = 0; i < 0x10; i++)
97      if (m_leds_cache[i] != active_state[i])
98      {
99         output_set_digit_value(i, active_state[i]);
100         
101         for (int j = 0; j < 8; j++)
102            output_set_lamp_value(i*10 + j, active_state[i] >> j & 1);
103      }
104   
105   memcpy(m_leds_cache, active_state, sizeof(m_leds_cache));
106}
107
108TIMER_DEVICE_CALLBACK_MEMBER(starwbc_state::leds_decay_tick)
109{
110   // slowly turn off unpowered leds
111   for (int i = 0; i < 0x100; i++)
112      if (!(m_leds_state[i & 0xf] >> (i>>4) & 1) && m_leds_decay[i])
113         m_leds_decay[i]--;
114   
115   leds_update();
116}
117
118void starwbc_state::prepare_and_update()
119{
120   UINT8 o = (m_o << 4 & 0xf0) | (m_o >> 4 & 0x0f);
121   const UINT8 mask[5] = { 0x30, 0xff, 0xff, 0x7f, 0x7f };
122   
123   // R0,R2,R4,R6,R8
124   for (int i = 0; i < 5; i++)
125      m_leds_state[i*2] = (m_r >> (i*2) & 1) ? (o & mask[i]) : 0;
126
127   leds_update();
128}
129
130
131
132/***************************************************************************
133
41134  I/O
42135
43136***************************************************************************/
44137
45138READ8_MEMBER(starwbc_state::read_k)
46139{
47   return 0;
140   UINT8 k = 0;
141
142   // read selected button rows
143   for (int i = 0; i < 5; i++)
144   {
145      const int r[5] = { 0, 1, 3, 5, 7 };
146      if (m_r >> r[i] & 1)
147         k |= m_button_matrix[i]->read();
148   }
149
150   return k;
48151}
49152
50153WRITE16_MEMBER(starwbc_state::write_r)
51154{
155   // R0,R2,R4: select lamp row
156   // R6,R8: select digit
157   // R0,R1,R3,R5,R7: input mux
158   // R9: piezo speaker
159   m_speaker->level_w(data >> 9 & 1);
160   
52161   m_r = data;
162   prepare_and_update();
53163}
54164
55165WRITE16_MEMBER(starwbc_state::write_o)
56166{
167   // O0-O7: leds state
57168   m_o = data;
169   prepare_and_update();
58170}
59171
60172
r242199r242200
65177
66178***************************************************************************/
67179
180/* physical button layout and labels is like this:
181
182    (reconnnaissance=yellow)        (tactical reaction=green)
183    [MAGNA] [ENEMY]                 [EM]       [BS]   [SCR]
184
185    [BASIC] [INTER]    [START TURN] [END TURN] [MOVE] [FIRE]
186    [ADV]   [P#]       [<]          [^]        [>]    [v]
187    (game=blue)        (maneuvers=red)                       */
188
68189static INPUT_PORTS_START( starwbc )
190   PORT_START("IN.0") // R0
191   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("Basic Game")
192   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("Intermediate Game")
193   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("Advanced Game")
194   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_P) PORT_NAME("Player Number")
195
196   PORT_START("IN.1") // R1
197   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Start Turn")
198   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED)
199   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
200   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("End Turn")
201
202   PORT_START("IN.2") // R3
203   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Magna Scan") // only used in adv. game
204   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("Enemy Scan") // only used in adv. game
205   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
206   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("Screen Up")
207
208   PORT_START("IN.3") // R5
209   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("Evasive Maneuvers")
210   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("Move")
211   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("Fire")
212   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("Battle Stations")
213
214   PORT_START("IN.4") // R7
215   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left")
216   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("Up")
217   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down")
218   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right")
69219INPUT_PORTS_END
70220
71221
r242199r242200
78228
79229void starwbc_state::machine_start()
80230{
231   memset(m_leds_state, 0, sizeof(m_leds_state));
232   memset(m_leds_cache, 0, sizeof(m_leds_cache));
233   memset(m_leds_decay, 0, sizeof(m_leds_decay));
81234   m_r = 0;
82235   m_o = 0;
83236   
237   save_item(NAME(m_leds_state));
238   save_item(NAME(m_leds_cache));
239   save_item(NAME(m_leds_decay));
84240   save_item(NAME(m_r));
85241   save_item(NAME(m_o));
86242}
r242199r242200
89245static MACHINE_CONFIG_START( starwbc, starwbc_state )
90246
91247   /* basic machine hardware */
92   MCFG_CPU_ADD("maincpu", TMS1100, 400000)
248   MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
93249   MCFG_TMS1XXX_READ_K_CB(READ8(starwbc_state, read_k))
94250   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(starwbc_state, write_o))
95251   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(starwbc_state, write_r))
252
253   MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", starwbc_state, leds_decay_tick, attotime::from_msec(10))
96254   
97255   MCFG_DEFAULT_LAYOUT(layout_starwbc)
98256
99257   /* no video! */
100258
101259   /* sound hardware */
102//   MCFG_SPEAKER_STANDARD_MONO("mono")
260   MCFG_SPEAKER_STANDARD_MONO("mono")
261   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
262   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
103263MACHINE_CONFIG_END
104264
105265
r242199r242200
120280   ROM_LOAD( "tms1100_starwbc_opla.pla", 0, 365, CRC(d358a76d) SHA1(06b60b207540e9b726439141acadea9aba718013) )
121281ROM_END
122282
283ROM_START( starwbcp )
284   ROM_REGION( 0x0800, "maincpu", 0 )
285   ROM_LOAD( "us4270755", 0x0000, 0x0800, BAD_DUMP CRC(fb3332f2) SHA1(a79ac81e239983cd699b7cfcc55f89b203b2c9ec) ) // from patent US4270755, may have errors
123286
124CONS( 1979, starwbc, 0, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars: Electronic Battle Command Game", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE | GAME_NO_SOUND )
287   ROM_REGION( 867, "maincpu:mpla", 0 )
288   ROM_LOAD( "tms1100_starwbc_mpla.pla", 0, 867, CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) )
289   ROM_REGION( 365, "maincpu:opla", 0 )
290   ROM_LOAD( "tms1100_starwbc_opla.pla", 0, 365, CRC(d358a76d) SHA1(06b60b207540e9b726439141acadea9aba718013) )
291ROM_END
292
293
294CONS( 1979, starwbc,  0,       0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", GAME_SUPPORTS_SAVE )
295CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (prototype)", GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/stopthie.c
r242199r242200
6969   ROM_REGION( 0x1000, "maincpu", 0 )
7070   ROM_LOAD16_WORD( "stopthie.bin", 0x0000, 0x1000, CRC(03691115) SHA1(bdcd212aa50bb1c26cb2d0ee97e5cfc04841c108) )
7171
72   ROM_REGION( 1246, "maincpu:ipla", 0 )
73   ROM_REGION( 1982, "maincpu:mpla", 0 )
74   ROM_REGION( 352, "maincpu:opla", 0 )
75   ROM_REGION( 157, "maincpu:spla", 0 )
72   ROM_REGION( 1246, "maincpu:ipla", ROMREGION_ERASE00 )
73   ROM_REGION( 1982, "maincpu:mpla", ROMREGION_ERASE00 )
74   ROM_REGION( 352, "maincpu:opla", ROMREGION_ERASE00 )
75   ROM_REGION( 157, "maincpu:spla", ROMREGION_ERASE00 )
7676ROM_END
7777
7878/***************************************************************************
trunk/src/mess/drivers/ticalc1x.c
r242199r242200
150150
151151   // read selected button rows
152152   for (int i = 0; i < 11; i++)
153      if (m_r & (1 << i))
153      if (m_r >> i & 1)
154154         k |= m_button_matrix[i]->read();
155155
156156   return k;
r242199r242200
182182
183183   // read selected button rows
184184   for (int i = 0; i < 7; i++)
185      if (m_o & (1 << (i + 1)))
185      if (m_o >> (i+1) & 1)
186186         k |= m_button_matrix[i]->read();
187187
188188   return k;
r242199r242200
213213
214214   // read selected button rows
215215   for (int i = 0; i < 4; i++)
216      if (m_o & (1 << (i + 1)))
216      if (m_o >> (i+1) & 1)
217217         k |= m_button_matrix[i]->read();
218218
219219   return k;
r242199r242200
255255
256256   // read selected button rows
257257   for (int i = 0; i < 8; i++)
258      if (m_o & (1 << i))
258      if (m_o >> i & 1)
259259         k |= m_button_matrix[i]->read();
260260
261261   return k;
r242199r242200
293293   PORT_START("IN.0") // R0
294294   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
295295   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
296   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("RCL")
297   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
296   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("RCL")
297   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
298298
299299   PORT_START("IN.1") // R1
300300   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
301301   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
302   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_NAME("CE")
303   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
302   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE")
303   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
304304
305305   PORT_START("IN.2") // R2
306306   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
307307   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
308   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("+/-")
309   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
308   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
309   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
310310
311311   PORT_START("IN.3") // R3
312312   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
313313   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
314   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME(".")
315   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
314   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
315   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
316316
317317   PORT_START("IN.4") // R4
318318   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
319   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
320   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("EE")
321   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
319   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
320   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_NAME("EE")
321   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
322322
323323   PORT_START("IN.5") // R5
324324   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
325   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_NAME(UTF8_CAPITAL_SIGMA)
326   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME("STO")
327   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
325   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME(UTF8_CAPITAL_SIGMA)
326   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("STO")
327   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
328328
329329   PORT_START("IN.6") // R6
330330   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
331   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("1/x")
332   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME("y"UTF8_POW_X)
333   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
331   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("1/x")
332   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("y"UTF8_POW_X)
333   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
334334
335335   PORT_START("IN.7") // R7
336336   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
337   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_NAME("x"UTF8_POW_2)
337   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x"UTF8_POW_2)
338338   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
339   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
339   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
340340
341341   PORT_START("IN.8") // R8
342342   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
343   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_NAME("10"UTF8_POW_X)
344   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("e"UTF8_POW_X)
345   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
343   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME("10"UTF8_POW_X)
344   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("e"UTF8_POW_X)
345   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
346346
347347   PORT_START("IN.9") // R9
348348   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
349   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME(UTF8_SQUAREROOT"x")
349   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME(UTF8_SQUAREROOT"x")
350350   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
351   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
351   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
352352
353353   PORT_START("IN.10") // R10
354   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("C")
355   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME("log")
356   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_NAME("ln(x)")
354   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("C")
355   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_NAME("log")
356   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME("ln(x)")
357357   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
358358INPUT_PORTS_END
359359
360360
361361static INPUT_PORTS_START( ti1270 )
362362   PORT_START("IN.0") // O1
363   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME("CE/C")
364   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("0")
365   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_NAME(".")
366   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_NAME("=")
363   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("CE/C")
364   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
365   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
366   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
367367
368368   PORT_START("IN.1") // O2
369   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_NAME("1")
370   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_NAME("2")
371   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("3")
372   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_NAME("+")
369   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
370   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
371   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
372   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
373373
374374   PORT_START("IN.2") // O3
375   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("4")
376   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("5")
377   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME("6")
378   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("-")
375   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
376   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
377   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
378   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
379379
380380   PORT_START("IN.3") // O4
381   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_NAME("7")
382   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME("8")
383   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("9")
384   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME(UTF8_MULTIPLY)
381   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
382   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
383   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
384   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
385385
386386   PORT_START("IN.4") // O5
387   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("STO")
388   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_NAME("RCL")
389   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME(UTF8_SMALL_PI)
390   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME(UTF8_DIVIDE)
387   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("STO")
388   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("RCL")
389   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CODE(KEYCODE_I) PORT_NAME(UTF8_SMALL_PI)
390   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
391391
392392   PORT_START("IN.5") // O6
393393   PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
394394
395395   PORT_START("IN.6") // O7
396   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME("1/x")
397   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("x"UTF8_POW_2)
398   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME(UTF8_SQUAREROOT"x")
399   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_NAME("+/-")
396   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("1/x")
397   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x"UTF8_POW_2)
398   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME(UTF8_SQUAREROOT"x")
399   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
400400INPUT_PORTS_END
401401
402402
403403static INPUT_PORTS_START( wizatron )
404404   PORT_START("IN.0") // O1
405   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("CLEAR")
406   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
407   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
405   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("CLEAR")
406   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
407   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
408408   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
409409
410410   PORT_START("IN.1") // O2
411   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
412   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
413   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
411   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
412   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
413   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
414414   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
415415
416416   PORT_START("IN.2") // O3
417   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
418   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
419   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
417   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
418   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
419   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
420420   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
421421
422422   PORT_START("IN.3") // O4
423   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
424   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
425   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
423   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
424   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
425   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
426426   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
427427INPUT_PORTS_END
428428
429429
430430static INPUT_PORTS_START( ti30 )
431431   PORT_START("IN.0") // O0
432   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("y"UTF8_POW_X)
433   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_NAME("K")
434   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("log")
435   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME("EE"UTF8_DOWN)
436   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("ln(x)")
432   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("y"UTF8_POW_X)
433   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_NAME("K")
434   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_NAME("log")
435   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_NAME("EE"UTF8_DOWN)
436   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME("ln(x)")
437437
438438   PORT_START("IN.1") // O1
439   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME(UTF8_MULTIPLY)
440   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("STO")
441   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_NAME("8")
442   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_NAME("7")
443   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
439   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
440   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("STO")
441   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
442   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
443   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
444444
445445   PORT_START("IN.2") // O2
446   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_NAME("-")
447   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_NAME("RCL")
448   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("5")
449   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_NAME("4")
450   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
446   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
447   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("RCL")
448   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
449   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
450   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
451451
452452   PORT_START("IN.3") // O3
453453   PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED )
454454
455455   PORT_START("IN.4") // O4
456   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_NAME(UTF8_DIVIDE)
457   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME(UTF8_SMALL_PI)
458   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("(")
459   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("%")
460   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME(")")
456   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
457   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_NAME(UTF8_SMALL_PI)
458   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("(")
459   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("%")
460   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(")")
461461
462462   PORT_START("IN.5") // O5
463   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("+")
464   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_NAME("SUM")
465   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME("2")
466   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("1")
467   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
463   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
464   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("SUM")
465   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
466   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
467   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
468468
469469   PORT_START("IN.6") // O6
470   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME("DRG")
471   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("INV")
472   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME("cos")
473   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_NAME("sin")
474   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("tan")
470   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_NAME("DRG")
471   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_NAME("INV")
472   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("cos")
473   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("sin")
474   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME("tan")
475475
476476   PORT_START("IN.7") // O7
477   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_NAME("=")
478   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_NAME("EXC")
479   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_NAME(".")
480   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_NAME("0")
481   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("+/-")
477   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
478   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("EXC")
479   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
480   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
481   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
482482
483483   // note: even though power buttons are on the matrix, they are not CPU-controlled
484484   PORT_START("IN.8") // Vss!
485   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("ON/C")
486   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("1/x")
487   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME(UTF8_SQUAREROOT"x")
488   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("x"UTF8_POW_2)
489   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("OFF")
485   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C")
486   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("1/x")
487   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME(UTF8_SQUAREROOT"x")
488   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x"UTF8_POW_2)
489   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF")
490490INPUT_PORTS_END
491491
492492
493493static INPUT_PORTS_START( tiprog )
494494   PORT_START("IN.0") // O0
495   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("K")
496   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_NAME("SHF")
495   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_NAME("K")
496   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("SHF")
497497   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("E")
498   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME("d")
499   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("F")
498   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_NAME("d")
499   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("F")
500500
501501   PORT_START("IN.1") // O1
502   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME(UTF8_MULTIPLY)
503   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("OR")
504   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_NAME("8")
505   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_NAME("7")
506   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
502   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
503   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_NAME("OR")
504   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
505   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
506   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
507507
508508   PORT_START("IN.2") // O2
509   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_NAME("-")
510   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_NAME("AND")
511   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("5")
512   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_NAME("4")
513   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
509   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
510   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("AND")
511   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
512   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
513   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
514514
515515   PORT_START("IN.3") // O3
516516   PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED )
517517
518518   PORT_START("IN.4") // O4
519   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_NAME(UTF8_DIVIDE)
520   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME("1'sC")
521   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("b")
522   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("A")
523   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("C")
519   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
520   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_NAME("1'sC")
521   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME("b")
522   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_NAME("A")
523   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("C")
524524
525525   PORT_START("IN.5") // O5
526   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("+")
527   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_NAME("XOR")
528   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME("2")
529   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("1")
530   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
526   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
527   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("XOR")
528   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
529   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
530   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
531531
532532   PORT_START("IN.6") // O6
533   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME(")")
534   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("STO")
535   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME("SUM")
536   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_NAME("RCL")
537   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("(")
533   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(")")
534   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("STO")
535   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("SUM")
536   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("RCL")
537   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("(")
538538
539539   PORT_START("IN.7") // O7
540   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_NAME("=")
541   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_NAME("CE")
542   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_NAME(".")
543   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_NAME("0")
544   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("+/-")
540   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
541   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE")
542   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
543   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
544   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
545545
546546   // note: even though power buttons are on the matrix, they are not CPU-controlled
547547   PORT_START("IN.8") // Vss!
548   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("C/ON")
548   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_PGUP) PORT_NAME("C/ON")
549549   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("DEC")
550   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME("OCT")
551   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("HEX")
552   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("OFF")
550   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("OCT")
551   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME("HEX")
552   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF")
553553INPUT_PORTS_END
554554
555555
556556static INPUT_PORTS_START( tibusan1 )
557557   // PORT_NAME lists functions under [2nd] as secondaries.
558558   PORT_START("IN.0") // O0
559   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("y"UTF8_POW_X"  "UTF8_POW_X""UTF8_SQUAREROOT"y") // 2nd one implies xth root of y
560   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_NAME("%  "UTF8_CAPITAL_DELTA"%")
561   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("SEL")
562   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME("CST")
563   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("MAR")
559   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("y"UTF8_POW_X"  "UTF8_POW_X""UTF8_SQUAREROOT"y") // 2nd one implies xth root of y
560   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("%  "UTF8_CAPITAL_DELTA"%")
561   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("SEL")
562   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("CST")
563   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME("MAR")
564564
565565   PORT_START("IN.1") // O1
566   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME(UTF8_MULTIPLY)
567   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("STO  m")
568   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_NAME("8")
569   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_NAME("7")
570   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
566   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
567   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("STO  m")
568   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
569   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
570   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
571571
572572   PORT_START("IN.2") // O2
573   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_NAME("-")
574   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_NAME("RCL  b")
575   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("5")
576   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_NAME("4")
577   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
573   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
574   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("RCL  b")
575   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
576   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
577   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
578578
579579   PORT_START("IN.3") // O3
580580   PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED )
581581
582582   PORT_START("IN.4") // O4
583   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_NAME(UTF8_DIVIDE)
584   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME(UTF8_CAPITAL_SIGMA"+  "UTF8_CAPITAL_SIGMA"-")
585   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("(  AN-CI\"")
586   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("x<>y  L.R.")
587   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME(")  1/x")
583   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
584   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME(UTF8_CAPITAL_SIGMA"+  "UTF8_CAPITAL_SIGMA"-")
585   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("(  AN-CI\"")
586   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("x<>y  L.R.")
587   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(")  1/x")
588588
589589   PORT_START("IN.5") // O5
590   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("+")
591   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_NAME("SUM  x"UTF8_PRIME)
592   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME("2")
593   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("1")
594   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
590   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
591   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("SUM  x"UTF8_PRIME)
592   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
593   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
594   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
595595
596596   PORT_START("IN.6") // O6
597   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME("FV")
598   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("N")
599   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME("PMT")
600   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_NAME("%i")
601   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV")
597   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("FV")
598   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("N")
599   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_NAME("PMT")
600   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_NAME("%i")
601   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_NAME("PV")
602602
603603   PORT_START("IN.7") // O7
604   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_NAME("=")
605   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_NAME("EXC  x"UTF8_PRIME)
606   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_NAME(".")
607   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_NAME("0")
608   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("+/-")
604   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
605   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("EXC  x"UTF8_PRIME)
606   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
607   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
608   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
609609
610610   // note: even though power buttons are on the matrix, they are not CPU-controlled
611611   PORT_START("IN.8") // Vss!
612   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("ON/C")
613   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("2nd")
614   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME("x"UTF8_POW_2"  "UTF8_SQUAREROOT"x")
615   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("ln(x)  e"UTF8_POW_X)
616   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("OFF")
612   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C")
613   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("2nd")
614   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x"UTF8_POW_2"  "UTF8_SQUAREROOT"x")
615   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME("ln(x)  e"UTF8_POW_X)
616   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF")
617617INPUT_PORTS_END
618618
619619
r242199r242200
632632   m_r = 0;
633633   m_o = 0;
634634
635   save_item(NAME(m_leds_state));
636   save_item(NAME(m_leds_cache));
637   save_item(NAME(m_leds_decay));
635638   save_item(NAME(m_r));
636639   save_item(NAME(m_o));
637640}
trunk/src/mess/layout/cnsector.lay
r242199r242200
33
44<!-- define elements -->
55
6   <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
7   <element name="static_white"><rect><color red="0.95" green="0.95" blue="0.95" /></rect></element>
8   <element name="static_gray"><rect><color red="0.60" green="0.75" blue="0.63" /></rect></element>
9   <element name="static_red"><rect><color red="0.35" green="0.02" blue="0.04" /></rect></element>
10
611   <element name="digit" defstate="0">
712      <led7seg><color red="1.0" green="0.25" blue="0.20" /></led7seg>
813   </element>
r242199r242200
1217      <disk state="0"><color red="0.2" green="0.0" blue="0.0" /></disk>
1318   </element>
1419
20   <element name="text_ship">
21      <text string="SHIP"><color red="0.95" green="0.95" blue="0.95" /></text>
22   </element>
23   <element name="text_speed">
24      <text string="SPEED"><color red="0.95" green="0.95" blue="0.95" /></text>
25   </element>
1526
27   <element name="text_north">
28      <text string="NORTH" align="2"><color red="0.95" green="0.95" blue="0.95" /></text>
29   </element>
30   <element name="text_east">
31      <text string="EAST" align="1"><color red="0.95" green="0.95" blue="0.95" /></text>
32   </element>
33
34   <element name="text_depth">
35      <text string="DEPTH"><color red="0.95" green="0.95" blue="0.95" /></text>
36   </element>
37   <element name="text_range">
38      <text string="RANGE"><color red="0.95" green="0.95" blue="0.95" /></text>
39   </element>
40
41   <element name="text_n">
42      <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
43      <text string="N"><color red="0.88" green="0.85" blue="0.85" /></text>
44   </element>
45   <element name="text_s">
46      <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
47      <text string="S"><color red="0.88" green="0.85" blue="0.85" /></text>
48   </element>
49   <element name="text_e">
50      <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
51      <text string="E"><color red="0.88" green="0.85" blue="0.85" /></text>
52   </element>
53   <element name="text_w">
54      <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
55      <text string="W"><color red="0.88" green="0.85" blue="0.85" /></text>
56   </element>
57
58
59
1660<!-- build screen -->
1761
1862   <view name="Internal Layout">
19      <bounds left="0" right="200" top="0" bottom="200" />
63      <bounds left="0" right="92" top="0" bottom="146" />
64      <bezel element="static_black">
65         <bounds left="0" right="92" top="0" bottom="146" />
66      </bezel>
2067
68   <!-- digits -->
69
70      <bezel element="static_white"><bounds x="0" y="4" width="100" height="1" /></bezel>
71      <bezel element="static_white"><bounds x="0" y="12" width="100" height="1" /></bezel>
72
73      <bezel element="static_white"><bounds x="20" y="4.5" width="1" height="40" /></bezel>
74      <bezel element="static_white"><bounds x="41" y="4.5" width="1" height="40" /></bezel>
75
76      <bezel element="static_white"><bounds x="67" y="4.5" width="1" height="8" /></bezel>
77
78      <bezel element="static_white"><bounds x="20.5" y="36" width="80" height="1" /></bezel>
79      <bezel element="static_white"><bounds x="0" y="44" width="100" height="1" /></bezel>
80
81      <bezel element="text_ship"><bounds x="0" y="5" width="20" height="7" /></bezel>
82      <bezel element="text_speed"><bounds x="21" y="5" width="20" height="7" /></bezel>
83
84      <bezel element="text_north"><bounds x="47" y="5" width="19" height="7" /></bezel>
85      <bezel element="text_east"><bounds x="69" y="5" width="19" height="7" /></bezel>
86
87      <bezel element="text_depth"><bounds x="21" y="37" width="20" height="7" /></bezel>
88      <bezel element="text_range"><bounds x="57" y="37" width="20" height="7" /></bezel>
89
90
2191      <bezel name="digit5" element="digit">
22         <bounds x="0" y="0" width="10" height="15" />
92         <bounds x="5" y="17" width="10" height="15" />
2393      </bezel>
94
2495      <bezel name="digit4" element="digit">
25         <bounds x="20" y="0" width="10" height="15" />
96         <bounds x="26" y="17" width="10" height="15" />
2697      </bezel>
98
2799      <bezel name="digit3" element="digit">
28         <bounds x="40" y="0" width="10" height="15" />
100         <bounds x="47" y="17" width="10" height="15" />
29101      </bezel>
30102      <bezel name="digit2" element="digit">
31         <bounds x="50" y="0" width="10" height="15" />
103         <bounds x="57" y="17" width="10" height="15" />
32104      </bezel>
33105      <bezel name="digit1" element="digit">
34         <bounds x="60" y="0" width="10" height="15" />
106         <bounds x="67" y="17" width="10" height="15" />
35107      </bezel>
36108      <bezel name="digit0" element="digit">
37         <bounds x="70" y="0" width="10" height="15" />
109         <bounds x="77" y="17" width="10" height="15" />
38110      </bezel>
39111
112
113   <!-- compass -->
114
115      <bezel element="static_gray"><bounds x="0" y="50" width="100" height="100" /></bezel>
116      <bezel element="static_red"><bounds x="0" y="55" width="100" height="86" /></bezel>
117
40118      <bezel name="lamp0" element="lamp">
41         <bounds x="20" y="20" width="5" height="5" />
119         <bounds x="42" y="62" width="8" height="8" />
42120      </bezel>
43121      <bezel name="lamp1" element="lamp">
44         <bounds x="20" y="30" width="5" height="5" />
122         <bounds x="42" y="126" width="8" height="8" />
45123      </bezel>
46124      <bezel name="lamp2" element="lamp">
47         <bounds x="30" y="25" width="5" height="5" />
125         <bounds x="74" y="94" width="8" height="8" />
48126      </bezel>
49127      <bezel name="lamp3" element="lamp">
50         <bounds x="10" y="25" width="5" height="5" />
128         <bounds x="10" y="94" width="8" height="8" />
51129      </bezel>
52130
131      <bezel element="text_n"><bounds x="41" y="72" width="10" height="10" /></bezel>
132      <bezel element="text_s"><bounds x="41" y="114" width="10" height="10" /></bezel>
133      <bezel element="text_e"><bounds x="63" y="93" width="10" height="10" /></bezel>
134      <bezel element="text_w"><bounds x="21" y="93" width="10" height="10" /></bezel>
135
136
137   <!-- crop borders -->
138
139      <bezel element="static_black"><bounds x="92" y="0" width="10" height="160" /></bezel>
140      <bezel element="static_black"><bounds x="0" y="146" width="100" height="10" /></bezel>
141
53142   </view>
54143</mamelayout>
trunk/src/mess/layout/starwbc.lay
r242199r242200
11<?xml version="1.0"?>
22<mamelayout version="2">
33
4<!-- define elements -->
5
6   <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
7   <element name="static_yellow"><rect><color red="0.67" green="0.65" blue="0.1" /></rect></element>
8   <element name="static_red"><rect><color red="0.6" green="0.05" blue="0.0" /></rect></element>
9   <element name="static_gray"><rect><color red="0.66" green="0.66" blue="0.66" /></rect></element>
10
11   <element name="digit" defstate="0">
12      <led7seg><color red="1.0" green="0.25" blue="0.23" /></led7seg>
13   </element>
14
15   <element name="lamp" defstate="0">
16      <rect><color red="0.0" green="0.0" blue="0.0" /></rect>
17      <disk state="1">
18         <color red="1.0" green="0.25" blue="0.23" />
19         <bounds x="0.4" y="0.4" width="0.2" height="0.2" />
20      </disk>
21      <disk state="0">
22         <color red="0.2" green="0.05" blue="0.04" />
23         <bounds x="0.4" y="0.4" width="0.2" height="0.2" />
24      </disk>
25   </element>
26
27   <element name="nlamp" defstate="0">
28      <disk state="1"><color red="1.0" green="0.25" blue="0.23" /></disk>
29      <disk state="0"><color red="0.2" green="0.05" blue="0.04" /></disk>
30   </element>
31
32   <element name="text_a"><text string="A"><color red="0.69" green="0.69" blue="0.69" /></text></element>
33   <element name="text_b"><text string="B"><color red="0.69" green="0.69" blue="0.69" /></text></element>
34   <element name="text_c"><text string="C"><color red="0.69" green="0.69" blue="0.69" /></text></element>
35   <element name="text_d"><text string="D"><color red="0.69" green="0.69" blue="0.69" /></text></element>
36
37   <element name="text_1"><text string="1"><color red="0.69" green="0.69" blue="0.69" /></text></element>
38   <element name="text_2"><text string="2"><color red="0.69" green="0.69" blue="0.69" /></text></element>
39   <element name="text_3"><text string="3"><color red="0.69" green="0.69" blue="0.69" /></text></element>
40   <element name="text_4"><text string="4"><color red="0.69" green="0.69" blue="0.69" /></text></element>
41
42   <element name="text_alert"><text string="ALERT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
43   <element name="text_combat"><text string="COMBAT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
44   <element name="text_force"><text string="FORCE UNITS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
45   <element name="text_players"><text string="PLAYERS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
46
47
48
49<!-- build screen -->
50
451   <view name="Internal Layout">
5      <bounds left="0" right="200" top="0" bottom="200" />
52      <bounds left="0" right="165" top="0" bottom="105" />
53     
54      <bezel element="static_yellow"><bounds x="3" y="17" width="10" height="83" /></bezel>
55      <bezel element="static_black"><bounds x="4" y="18" width="8" height="81" /></bezel>
656
57      <bezel element="static_red"><bounds x="17" y="3" width="83" height="10" /></bezel>
58      <bezel element="static_black"><bounds x="18" y="4" width="81" height="8" /></bezel>
59
60      <bezel element="static_yellow"><bounds x="3.5" y="38" width="9" height="1" /></bezel>
61      <bezel element="static_yellow"><bounds x="3.5" y="58" width="9" height="1" /></bezel>
62      <bezel element="static_yellow"><bounds x="3.5" y="78" width="9" height="1" /></bezel>
63
64      <bezel element="static_red"><bounds x="38" y="3.5" width="1" height="9" /></bezel>
65      <bezel element="static_red"><bounds x="58" y="3.5" width="1" height="9" /></bezel>
66      <bezel element="static_red"><bounds x="78" y="3.5" width="1" height="9" /></bezel>
67
68      <bezel element="text_a"><bounds x="4" y="24.5" width="8" height="8" /></bezel>
69      <bezel element="text_b"><bounds x="4" y="44.5" width="8" height="8" /></bezel>
70      <bezel element="text_c"><bounds x="4" y="64.5" width="8" height="8" /></bezel>
71      <bezel element="text_d"><bounds x="4" y="84.5" width="8" height="8" /></bezel>
72
73      <bezel element="text_1"><bounds x="24.5" y="4" width="8" height="8" /></bezel>
74      <bezel element="text_2"><bounds x="44.5" y="4" width="8" height="8" /></bezel>
75      <bezel element="text_3"><bounds x="64.5" y="4" width="8" height="8" /></bezel>
76      <bezel element="text_4"><bounds x="84.5" y="4" width="8" height="8" /></bezel>
77
78     
79   <!-- lamp matrix -->
80     
81      <bezel element="static_gray"><bounds x="17" y="17" width="83" height="83" /></bezel>
82
83      <bezel name="lamp20" element="lamp"><bounds x="20" y="20" width="17" height="17" /></bezel>
84      <bezel name="lamp21" element="lamp"><bounds x="40" y="20" width="17" height="17" /></bezel>
85      <bezel name="lamp22" element="lamp"><bounds x="60" y="20" width="17" height="17" /></bezel>
86      <bezel name="lamp23" element="lamp"><bounds x="80" y="20" width="17" height="17" /></bezel>
87
88      <bezel name="lamp24" element="lamp"><bounds x="20" y="40" width="17" height="17" /></bezel>
89      <bezel name="lamp25" element="lamp"><bounds x="40" y="40" width="17" height="17" /></bezel>
90      <bezel name="lamp26" element="lamp"><bounds x="60" y="40" width="17" height="17" /></bezel>
91      <bezel name="lamp27" element="lamp"><bounds x="80" y="40" width="17" height="17" /></bezel>
92
93      <bezel name="lamp40" element="lamp"><bounds x="20" y="60" width="17" height="17" /></bezel>
94      <bezel name="lamp41" element="lamp"><bounds x="40" y="60" width="17" height="17" /></bezel>
95      <bezel name="lamp42" element="lamp"><bounds x="60" y="60" width="17" height="17" /></bezel>
96      <bezel name="lamp43" element="lamp"><bounds x="80" y="60" width="17" height="17" /></bezel>
97
98      <bezel name="lamp44" element="lamp"><bounds x="20" y="80" width="17" height="17" /></bezel>
99      <bezel name="lamp45" element="lamp"><bounds x="40" y="80" width="17" height="17" /></bezel>
100      <bezel name="lamp46" element="lamp"><bounds x="60" y="80" width="17" height="17" /></bezel>
101      <bezel name="lamp47" element="lamp"><bounds x="80" y="80" width="17" height="17" /></bezel>
102
103
104   <!-- right side -->
105
106      <bezel element="static_gray"><bounds x="105" y="17" width="55" height="23" /></bezel>
107      <bezel element="static_black"><bounds x="106" y="18" width="53" height="21" /></bezel>
108      <bezel element="text_alert"><bounds x="106" y="18.5" width="53" height="8" /></bezel>
109
110      <bezel name="lamp5" element="nlamp"><bounds x="130.8" y="30.5" width="3.4" height="3.4" /></bezel>
111
112      <bezel element="static_gray"><bounds x="105" y="43" width="55" height="23" /></bezel>
113      <bezel element="static_black"><bounds x="106" y="44" width="53" height="21" /></bezel>
114      <bezel element="text_combat"><bounds x="106" y="44.5" width="53" height="8" /></bezel>
115
116      <bezel name="lamp4" element="nlamp"><bounds x="130.8" y="56.5" width="3.4" height="3.4" /></bezel>
117
118      <bezel element="static_gray"><bounds x="105" y="69" width="55" height="31" /></bezel>
119      <bezel element="static_black"><bounds x="106" y="70" width="53" height="29" /></bezel>
120      <bezel element="text_force"><bounds x="106" y="70.5" width="53" height="8" /></bezel>
121      <bezel element="text_players"><bounds x="106" y="90" width="53" height="8" /></bezel>
122
123      <bezel name="digit6" element="digit"><bounds x="126" y="79.7" width="6" height="9" /></bezel>
124      <bezel name="digit8" element="digit"><bounds x="132" y="79.7" width="6" height="9" /></bezel>
125
7126   </view>
8127</mamelayout>
trunk/src/mess/layout/ti1270.lay
r242199r242200
88   </element>
99
1010   <view name="Internal Layout">
11      <bounds left="0" right="120" top="0" bottom="15" />
11      <bounds left="0" right="80" top="0" bottom="15" />
1212
1313      <bezel name="digit7" element="digit">
1414         <bounds x="0" y="0" width="10" height="15" />
1515      </bezel>
1616      <bezel name="digit6" element="digit">
17         <bounds x="15" y="0" width="10" height="15" />
17         <bounds x="10" y="0" width="10" height="15" />
1818      </bezel>
1919      <bezel name="digit5" element="digit">
20         <bounds x="30" y="0" width="10" height="15" />
20         <bounds x="20" y="0" width="10" height="15" />
2121      </bezel>
2222      <bezel name="digit4" element="digit">
23         <bounds x="45" y="0" width="10" height="15" />
23         <bounds x="30" y="0" width="10" height="15" />
2424      </bezel>
2525      <bezel name="digit3" element="digit">
26         <bounds x="60" y="0" width="10" height="15" />
26         <bounds x="40" y="0" width="10" height="15" />
2727      </bezel>
2828      <bezel name="digit2" element="digit">
29         <bounds x="75" y="0" width="10" height="15" />
29         <bounds x="50" y="0" width="10" height="15" />
3030      </bezel>
3131      <bezel name="digit1" element="digit">
32         <bounds x="90" y="0" width="10" height="15" />
32         <bounds x="60" y="0" width="10" height="15" />
3333      </bezel>
3434      <bezel name="digit0" element="digit">
35         <bounds x="105" y="0" width="10" height="15" />
35         <bounds x="70" y="0" width="10" height="15" />
3636      </bezel>
3737
3838   </view>
trunk/src/mess/layout/ti30.lay
r242199r242200
88   </element>
99
1010   <view name="Internal Layout">
11      <bounds left="0" right="135" top="0" bottom="15" />
11      <bounds left="0" right="90" top="0" bottom="15" />
1212
1313      <bezel name="digit0" element="digit">
1414         <bounds x="0" y="0" width="10" height="15" />
1515      </bezel>
1616      <bezel name="digit1" element="digit">
17         <bounds x="15" y="0" width="10" height="15" />
17         <bounds x="10" y="0" width="10" height="15" />
1818      </bezel>
1919      <bezel name="digit2" element="digit">
20         <bounds x="30" y="0" width="10" height="15" />
20         <bounds x="20" y="0" width="10" height="15" />
2121      </bezel>
2222      <bezel name="digit3" element="digit">
23         <bounds x="45" y="0" width="10" height="15" />
23         <bounds x="30" y="0" width="10" height="15" />
2424      </bezel>
2525      <bezel name="digit4" element="digit">
26         <bounds x="60" y="0" width="10" height="15" />
26         <bounds x="40" y="0" width="10" height="15" />
2727      </bezel>
2828      <bezel name="digit5" element="digit">
29         <bounds x="75" y="0" width="10" height="15" />
29         <bounds x="50" y="0" width="10" height="15" />
3030      </bezel>
3131      <bezel name="digit6" element="digit">
32         <bounds x="90" y="0" width="10" height="15" />
32         <bounds x="60" y="0" width="10" height="15" />
3333      </bezel>
3434      <bezel name="digit7" element="digit">
35         <bounds x="105" y="0" width="10" height="15" />
35         <bounds x="70" y="0" width="10" height="15" />
3636      </bezel>
3737      <bezel name="digit8" element="digit">
38         <bounds x="120" y="0" width="10" height="15" />
38         <bounds x="80" y="0" width="10" height="15" />
3939      </bezel>
4040
4141   </view>
trunk/src/mess/layout/tisr16.lay
r242199r242200
88   </element>
99
1010   <view name="Internal Layout">
11      <bounds left="0" right="180" top="0" bottom="15" />
11      <bounds left="0" right="120" top="0" bottom="15" />
1212
1313      <bezel name="digit10" element="digit">
1414         <bounds x="0" y="0" width="10" height="15" />
1515      </bezel>
1616      <bezel name="digit9" element="digit">
17         <bounds x="15" y="0" width="10" height="15" />
17         <bounds x="10" y="0" width="10" height="15" />
1818      </bezel>
1919      <bezel name="digit8" element="digit">
20         <bounds x="30" y="0" width="10" height="15" />
20         <bounds x="20" y="0" width="10" height="15" />
2121      </bezel>
2222      <bezel name="digit7" element="digit">
23         <bounds x="45" y="0" width="10" height="15" />
23         <bounds x="30" y="0" width="10" height="15" />
2424      </bezel>
2525      <bezel name="digit6" element="digit">
26         <bounds x="60" y="0" width="10" height="15" />
26         <bounds x="40" y="0" width="10" height="15" />
2727      </bezel>
2828      <bezel name="digit5" element="digit">
29         <bounds x="75" y="0" width="10" height="15" />
29         <bounds x="50" y="0" width="10" height="15" />
3030      </bezel>
3131      <bezel name="digit4" element="digit">
32         <bounds x="90" y="0" width="10" height="15" />
32         <bounds x="60" y="0" width="10" height="15" />
3333      </bezel>
3434      <bezel name="digit3" element="digit">
35         <bounds x="105" y="0" width="10" height="15" />
35         <bounds x="70" y="0" width="10" height="15" />
3636      </bezel>
3737      <bezel name="digit2" element="digit">
38         <bounds x="120" y="0" width="10" height="15" />
38         <bounds x="80" y="0" width="10" height="15" />
3939      </bezel>
4040      <bezel name="digit11" element="digit">
41         <bounds x="135" y="0" width="10" height="15" />
41         <bounds x="90" y="0" width="10" height="15" />
4242      </bezel>
4343      <bezel name="digit1" element="digit">
44         <bounds x="150" y="0" width="10" height="15" />
44         <bounds x="100" y="0" width="10" height="15" />
4545      </bezel>
4646      <bezel name="digit0" element="digit">
47         <bounds x="165" y="0" width="10" height="15" />
47         <bounds x="110" y="0" width="10" height="15" />
4848      </bezel>
4949
5050   </view>
trunk/src/mess/layout/wizatron.lay
r242199r242200
1818
1919
2020   <view name="Internal Layout">
21      <bounds left="0" right="135" top="0" bottom="15" />
21      <bounds left="0" right="90" top="0" bottom="15" />
2222
2323      <bezel name="digit8" element="digit">
2424         <bounds x="0" y="0" width="10" height="15" />
2525      </bezel>
2626      <bezel name="digit7" element="digit">
27         <bounds x="15" y="0" width="10" height="15" />
27         <bounds x="10" y="0" width="10" height="15" />
2828      </bezel>
2929      <bezel name="digit6" element="digit14">
30         <bounds x="30" y="0" width="10" height="15" />
30         <bounds x="20" y="0" width="10" height="15" />
3131      </bezel>
3232      <bezel name="digit5" element="digit">
33         <bounds x="45" y="0" width="10" height="15" />
33         <bounds x="30" y="0" width="10" height="15" />
3434      </bezel>
3535      <bezel name="digit4" element="digit">
36         <bounds x="60" y="0" width="10" height="15" />
36         <bounds x="40" y="0" width="10" height="15" />
3737      </bezel>
3838      <bezel name="digit3" element="digit">
39         <bounds x="75" y="0" width="10" height="15" />
39         <bounds x="50" y="0" width="10" height="15" />
4040      </bezel>
4141      <bezel name="digit2" element="digit">
42         <bounds x="90" y="0" width="10" height="15" />
42         <bounds x="60" y="0" width="10" height="15" />
4343      </bezel>
4444      <bezel name="digit1" element="digit">
45         <bounds x="105" y="0" width="10" height="15" />
45         <bounds x="70" y="0" width="10" height="15" />
4646      </bezel>
4747      <bezel name="digit0" element="digit">
48         <bounds x="120" y="0" width="10" height="15" />
48         <bounds x="80" y="0" width="10" height="15" />
4949      </bezel>
5050
5151<!-- mask out DIVIDE sign -->
5252
5353      <bezel element="static_black">
54         <bounds x="34.5" y="1.80" width="1.8" height="2.00" />
54         <bounds x="24.5" y="1.80" width="1.8" height="2.00" />
5555      </bezel>
5656      <bezel element="static_black">
57         <bounds x="34.3" y="5.1" width="1.75" height="1.3" />
57         <bounds x="24.3" y="5.1" width="1.75" height="1.3" />
5858      </bezel>
5959
6060      <bezel element="static_black">
61         <bounds x="33.75" y="11.25" width="1.8" height="2.00" />
61         <bounds x="23.75" y="11.25" width="1.8" height="2.00" />
6262      </bezel>
6363      <bezel element="static_black">
64         <bounds x="33.95" y="8.65" width="1.75" height="1.3" />
64         <bounds x="23.95" y="8.65" width="1.75" height="1.3" />
6565      </bezel>
6666
6767   </view>
trunk/src/mess/mess.lst
r242199r242200
22382238mpf1p
22392239cnsector
22402240starwbc
2241starwbcp
22412242stopthie
22422243amico2k
22432244jtc
trunk/src/mess/video/maria.c
r242199r242200
44
55
66  - some history:
7    2014-12-01 Mike Saarna, Robert Tuccitto Implemented "colorburst kill" bit
8               of the MARIA CTRL register.
79    2014-10-05 Mike Saarna, Robert Tuccitto Last Line DMA value corrected
810                to 6. GCC and Atari docs both show a difference between
911                Other Line and Last Line as +6 at the lowest part of the
r242199r242200
317319            scanline[2 * i + 1] = m_maria_palette[d];
318320            break;
319321      }
322
323      if(m_color_kill) //remove color if there's no colorburst signal
324      {
325            scanline[2 * i] &= 0x0f;
326            scanline[2 * i + 1] &= 0x0f;
327      }
320328   }
321329
322330   for (int i = 0; i < 160; i++) // buffer automaticaly cleared once displayed


Previous 199869 Revisions Next


© 1997-2024 The MAME Team