Previous 199869 Revisions Next

r34033 Tuesday 23rd December, 2014 at 15:18:55 UTC by Miodrag Milanović
Merge branch 'master' of https://github.com/mamedev/mame
[hash]leapster.xml segacd.xml snspell.xml* sol20_cass.xml
[src/emu]device.c device.h didisasm.c diexec.c digfx.c diimage.c dimemory.c dinetwork.c dinvram.c dioutput.c dirtc.c diserial.c dislot.c disound.c distate.c divideo.c
[src/emu/bus/sms_ctrl]graphic.c
[src/emu/cpu/arcompact]arcompact.c arcompact.h arcompact_execute.c arcompactdasm_ops.c
[src/emu/cpu/tms0980]tms0980.c
[src/emu/cpu/z80]z80daisy.c
[src/emu/machine]am9517a.c
[src/emu/sound]mos7360.c
[src/emu/video]315_5124.c 315_5313.c
[src/mame/includes]galaxold.h
[src/mame/machine]315_5296.c
[src/mame/video]galaxold.c
[src/mess]mess.lst
[src/mess/drivers]excali64.c tispeak.c
[src/osd/modules/debugger]debugqt.c
[src/osd/modules/debugger/qt]debugqtdeviceinformationwindow.c* debugqtdeviceinformationwindow.h* debugqtdeviceswindow.c debugqtdeviceswindow.h
[src/osd/sdl]draw13.c drawogl.c sdl.mak video.c video.h
[src/osd/windows]windows.mak

trunk/hash/leapster.xml
r242544r242545
255255      </part>
256256   </software>
257257
258
259   <software name="princess" supported="no">
260      <description>Disney Princess (US)</description>
261      <year>2003</year>
262      <publisher>LeapFrog</publisher>
263      <part name="cart" interface="leapster_cart">
264         <dataarea name="rom" size="0x800000">
265            <rom name="500-13514-a - disney princess (us).bin" size="0x800000" crc="5ccb2ad3" sha1="42740f6597f4a2eb878a54ddbf75452a2cca301d" offset="0x00000" />
266         </dataarea>
267      </part>
268   </software>
269
270   <software name="backyard" supported="no">
271      <description>The Backyardigans (US)</description>
272      <year>2003</year>
273      <publisher>LeapFrog</publisher>
274      <part name="cart" interface="leapster_cart">
275         <dataarea name="rom" size="0x800000">
276            <rom name="500-13453-a - the backyardigans (us).bin" size="0x800000" crc="de5fb26e" sha1="2a1df737ec907d1f1b837f9b58323ee908cb45a9" offset="0x00000" />
277         </dataarea>
278      </part>
279   </software>
280
281   <software name="spongez" supported="no">
282      <description>Spongebob Schwammkopf - Zeitreise durch das Wurmloch (German)</description>
283      <year>2003</year>
284      <publisher>LeapFrog</publisher>
285      <part name="cart" interface="leapster_cart">
286         <dataarea name="rom" size="0x400000">
287            <rom name="500-13273-a - spongebob schwammkopf - zeitreise durch das wurmloch (german).bin" size="0x400000" crc="8761fc61" sha1="90b0e1faf6964ec74643a45b46f0b064ebf9ea8a" offset="0x00000" />
288         </dataarea>
289      </part>
290   </software>
291
292   <software name="sonicx" supported="no">
293      <description>SonicX (US)</description>
294      <year>2003</year>
295      <publisher>LeapFrog</publisher>
296      <part name="cart" interface="leapster_cart">
297         <dataarea name="rom" size="0x800000">
298            <rom name="500-12296-a - sonicx (us).bin" size="0x800000" crc="a9d2cdbd" sha1="e239b209239252f0f6cd2a4c71d2a46a3abfd5eb" offset="0x00000" />
299         </dataarea>
300      </part>
301   </software>
302
303   <software name="cosmicmt" supported="no">
304      <description>Cosmic Math - Arcade-Style Learning! (US)</description>
305      <year>2003</year>
306      <publisher>LeapFrog</publisher>
307      <part name="cart" interface="leapster_cart">
308         <dataarea name="rom" size="0x400000">
309            <rom name="500-11994-a - cosmic math - arcade-style learning! (us).bin" size="0x400000" crc="979346d5" sha1="ecd8d3f7bae4fea1710ee99c5637224180021dd6" offset="0x00000" />
310         </dataarea>
311      </part>
312   </software>
313
314   <software name="batman" supported="no">
315      <description>The Batman - Multipliziere, dividiere und regiere (German)</description>
316      <year>2003</year>
317      <publisher>LeapFrog</publisher>
318      <part name="cart" interface="leapster_cart">
319         <dataarea name="rom" size="0x800000">
320            <rom name="500-11972-a - the batman - multipliziere, dividiere und regiere (german).bin" size="0x800000" crc="a0a362aa" sha1="442455a0bf2c3ca4c1084a1e8761eb80a4cd71e2" offset="0x00000" />
321         </dataarea>
322      </part>
323   </software>
324
325   <software name="grund" supported="no">
326      <description>Grundschule 1 (German)</description>
327      <year>2003</year>
328      <publisher>LeapFrog</publisher>
329      <part name="cart" interface="leapster_cart">
330         <dataarea name="rom" size="0x800000">
331            <rom name="500-10935-a - grundschule 1 (german).bin" size="0x800000" crc="6fd44f1a" sha1="fe6e8e1aaf72901820ee99d22dcc40a01d627fac" offset="0x00000" />
332         </dataarea>
333      </part>
334   </software>
335
336   <software name="grund2" supported="no">
337      <description>Grundschule 2 - Musik in Gefahr (German)</description>
338      <year>2003</year>
339      <publisher>LeapFrog</publisher>
340      <part name="cart" interface="leapster_cart">
341         <dataarea name="rom" size="0x800000">
342            <rom name="500-11494-a - grundschule 2 - musik in gefahr (german).bin" size="0x800000" crc="96d30f93" sha1="61dd156ae456a370a021061da9b3a4e33bda371e" offset="0x00000" />
343         </dataarea>
344      </part>
345   </software>
346
347
258348</softwarelist>
trunk/hash/segacd.xml
r242544r242545
42784278   <!-- Some of these have been sourced from MP3 based rips, and are thus tagged as BAD_DUMP -->
42794279
42804280   <software name="bariarm">
4281      <!-- Unknown source
4282      <rom name="android_assault_-_sega_CD_T-163015-00.cue" size="1253" crc="0503be31" />
4283      <rom name="android_assault_-_sega_CD_T-163015-00.bin" size="362210352" crc="468cf3e8" />
4284      -->
42814285      <!-- Ringcode: T-163015-00 - Alt. Title: Android Assault - The Revenge of Bari-Arm -->
42824286      <description>Bari-Arm (USA)</description>
42834287      <year>1994</year>
r242544r242545
43594363
43604364   <software name="champs94">
43614365      <!-- Unknown source
4362      <rom name="Battletech - Gray Death Legion (2007)(Good Deal Games)(NTSC)(US)[!][unreleased beta].cue" size="173" crc="14ae9d68" />
43634366      <rom name="Championship Soccer '94 (1994)(Sony Imagesoft)(NTSC)(US)[CDAC-068200 1].cue" size="6128" crc="41e9637d" />
43644367      <rom name="Championship Soccer '94 (1994)(Sony Imagesoft)(NTSC)(US)[CDAC-068200 1].bin" size="344502144" crc="0e409c1f" />
43654368      -->
r242544r242545
43914394   </software>
43924395
43934396   <software name="cpatrol">
4394      <description>Crime Patrol</description>
4397      <!-- Unknown source
4398      <rom name="CRIMEPATROL.CUE" size="139" crc="5705c8a3" />
4399      <rom name="CRIMEPATROL.BIN" size="282661008" crc="16da07cc" />
4400      -->
4401      <description>Crime Patrol (USA)</description>
43954402      <year>1994</year>
43964403      <publisher>American Laser Games</publisher>
43974404      <info name="serial" value="T-111055"/>
r242544r242545
44034410   </software>
44044411
44054412   <software name="demoman">
4413      <!-- Unknown source
4414      <rom name="Demolition Man (U).cue" size="679" crc="d08eafa7" />
4415      <rom name="Demolition Man (U).bin" size="366314592" crc="426b8d81" />
4416      -->
44064417      <description>Demolition Man (USA)</description>
44074418      <year>1994</year>
44084419      <publisher>Acclaim Entertainment</publisher>
r242544r242545
44474458   </software>
44484459
44494460   <software name="espnnba">
4461      <!-- Unknown source
4462      <rom name="ESPN NBA Hang Time '95 (U).cue" size="1015" crc="69f92ad9" />
4463      <rom name="ESPN NBA Hang Time '95 (U).bin" size="558425952" crc="1969b96a" />
4464      -->
44504465      <description>ESPN NBA Hang Time '95 (USA)</description>
44514466      <year>1994</year>
44524467      <publisher>Sony Imagesoft</publisher>
r242544r242545
48274842   </software>
48284843
48294844   <software name="syndicat">
4845      <!-- Unknown source
4846      <rom name="Syndicate.cue" size="75" crc="76504918" />
4847      <rom name="Syndicate.bin" size="19411056" crc="a36311a7" />
4848      -->
48304849      <description>Syndicate (USA, Prototype)</description>
48314850      <year>19??</year>
48324851      <publisher>&lt;unknown&gt;</publisher>
trunk/hash/snspell.xml
r0r242545
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3
4<softwarelist name="snspell" description="Speak &amp; Spell modules">
5
6
7<!-- Speak N Spell (US) -->
8
9   <software name="basbuild">
10      <description>Basic Builders</description>
11      <year>1979</year>
12      <publisher>Texas Instruments</publisher>
13      <info name="serial" value="CD2308"/>
14      <part name="cart" interface="snspell">
15         <dataarea name="rom" size="0x4000">
16            <rom name="cd2308.vsm" size="0x4000" crc="7784f917" sha1="c985d0f9b7d85f4a702e7281f3ba29c078ea38a7" offset="0" />
17         </dataarea>
18      </part>
19   </software>
20
21   <software name="etf">
22      <description>E.T. Fantasy</description>
23      <year>1982</year>
24      <publisher>Texas Instruments</publisher>
25      <info name="serial" value="CD2360"/>
26      <part name="cart" interface="snspell">
27         <dataarea name="rom" size="0x4000">
28            <rom name="cd2360nl.vsm" size="0x4000" crc="a8446791" sha1="cfdfdea221395717d5d5e6ee8ef559f4b63f5a71" offset="0" />
29         </dataarea>
30      </part>
31   </software>
32
33   <software name="homohero">
34      <description>Homonym Heroes</description>
35      <year>1980</year>
36      <publisher>Texas Instruments</publisher>
37      <info name="serial" value="CD2310"/>
38      <part name="cart" interface="snspell">
39         <dataarea name="rom" size="0x4000">
40            <rom name="cd2310.vsm" size="0x4000" crc="91745409" sha1="71195611efa3ae24005584fac86fecf181f02c4c" offset="0" />
41         </dataarea>
42      </part>
43   </software>
44
45   <software name="magmods">
46      <description>Magnificent Modifiers</description>
47      <year>1980</year>
48      <publisher>Texas Instruments</publisher>
49      <info name="serial" value="CD2349"/>
50      <part name="cart" interface="snspell">
51         <dataarea name="rom" size="0x4000">
52            <rom name="cd2349a.vsm" size="0x4000" crc="4664a82e" sha1="59c2b6b245b01d767527a69e8471ef18a712e168" offset="0" />
53         </dataarea>
54      </part>
55   </software>
56
57   <software name="migverbs">
58      <description>Mighty Verbs</description>
59      <year>1979</year>
60      <publisher>Texas Instruments</publisher>
61      <info name="serial" value="CD2309"/>
62      <part name="cart" interface="snspell">
63         <dataarea name="rom" size="0x4000">
64            <rom name="cd2309b.vsm" size="0x4000" crc="53e3323f" sha1="4d5c67bb7a2250898c37a83a5b7a4b671eac0280" offset="0" />
65         </dataarea>
66      </part>
67   </software>
68
69   <software name="nounends">
70      <description>Noun Endings</description>
71      <year>1980</year>
72      <publisher>Texas Instruments</publisher>
73      <info name="serial" value="CD2348"/>
74      <part name="cart" interface="snspell">
75         <dataarea name="rom" size="0x4000">
76            <rom name="cd2348.vsm" size="0x4000" crc="5ce12b32" sha1="61a590a27b66c7cd2409f39e776a9bcf0bfe4b02" offset="0" />
77         </dataarea>
78      </part>
79   </software>
80
81   <software name="sstump46">
82      <description>Super Stumpers 4-6</description>
83      <year>1979</year>
84      <publisher>Texas Instruments</publisher>
85      <info name="serial" value="CD2305"/>
86      <part name="cart" interface="snspell">
87         <dataarea name="rom" size="0x4000">
88            <rom name="cd2305n.vsm" size="0x4000" crc="98b1f65a" sha1="a418f6e328196163d311cffba1f23d0306dc3ef7" offset="0" />
89         </dataarea>
90      </part>
91   </software>
92
93   <software name="sstump78">
94      <!-- note: cartridge label is "Super Stumpers 7-8", even though manual says it is for Grades 6-8 -->
95      <description>Super Stumpers 7-8</description>
96      <year>1979</year>
97      <publisher>Texas Instruments</publisher>
98      <info name="serial" value="CD2307"/>
99      <part name="cart" interface="snspell">
100         <dataarea name="rom" size="0x4000">
101            <rom name="cd2307a.vsm" size="0x4000" crc="c0467604" sha1="a75f3731f0a3285ecafa91c1ec6aa456c03946e0" offset="0" />
102         </dataarea>
103      </part>
104   </software>
105
106   <software name="vpower">
107      <description>Vowel Power</description>
108      <year>1978</year>
109      <publisher>Texas Instruments</publisher>
110      <info name="serial" value="CD2302"/>
111      <part name="cart" interface="snspell">
112         <dataarea name="rom" size="0x4000">
113            <rom name="cd2302.vsm" size="0x4000" crc="c9b82e72" sha1="f4ef0f72993c14eca62a2e3e013aeb2683fb82fc" offset="0" />
114         </dataarea>
115      </part>
116   </software>
117
118   <software name="vventure">
119      <description>Vowel Ventures</description>
120      <year>1980</year>
121      <publisher>Texas Instruments</publisher>
122      <info name="serial" value="CD2347"/>
123      <part name="cart" interface="snspell">
124         <dataarea name="rom" size="0x4000">
125            <rom name="cd2347c.vsm" size="0x4000" crc="2f2e5376" sha1="b014dde6f3fa1f9edca0b0d157ec7b760baebdef" offset="0" />
126         </dataarea>
127      </part>
128   </software>
129
130
131<!-- La Dictee Magique (France) -->
132
133   <software name="motsbase">
134      <description>Les Mots de Base (Module No. 1)</description>
135      <!-- 1st release was called "Module No. 1 de Jacques Capelovici" -->
136      <year>1980</year>
137      <publisher>Texas Instruments</publisher>
138      <info name="serial" value="CD2353"/>
139      <part name="cart" interface="snspell">
140         <dataarea name="rom" size="0x4000">
141            <rom name="cd2353.vsm" size="0x4000" crc="d29bd1fe" sha1="3bebf4370be3e6e5fff86d2ee27ff56f17368ba6" offset="0" />
142         </dataarea>
143      </part>
144   </software>
145
146   <software name="magasrue">
147      <description>Les Magasins de la Rue (Module No. 4)</description>
148      <year>1981</year>
149      <publisher>Texas Instruments</publisher>
150      <info name="serial" value="CD62048"/>
151      <part name="cart" interface="snspell">
152         <dataarea name="rom" size="0x4000">
153            <rom name="cd62048.vsm" size="0x4000" crc="543ab068" sha1="479eaecaadb31bdd99e9bb0f424191ec554202bd" offset="0" />
154         </dataarea>
155      </part>
156   </software>
157
158
159</softwarelist>
trunk/hash/sol20_cass.xml
r242544r242545
1111<!--
1212Proteus Cassette Software
1313
14    Proteus Cassette #1 -- Extended Cassette BASIC
15    Proteus Cassette #2 -- Extended Cassette BASIC
16    Proteus Cassette #3 -- Extended Cassette BASIC
17    Proteus Cassette #7 -- Assembly language source and object
18    Proteus Cassette #8 -- More Extended Cassette BASIC programs
14    Proteus Cassette #1 - Extended Cassette BASIC
15    Proteus Cassette #2 - Extended Cassette BASIC
16    Proteus Cassette #3 - Extended Cassette BASIC
17    Proteus Cassette #7 - Assembly language source and object
18    Proteus Cassette #8 - More Extended Cassette BASIC programs
1919
2020Contents of Proteus software collections at http://www.sol20.org/manuals/proteus_cass_library.txt
2121C7 User Manual at http://www.sol20.org/manuals/proteus_c7.pdf
r242544r242545
7777   </software>
7878
7979<!--
80TAD Enterprise -- utilities for moving PT BASIC
80TAD Enterprise - utilities for moving PT BASIC
8181
8282    MODPG P 4120 0CDF           ;program patches Proc Tech Extended Cassette BASIC to run under CP/M
8383    UTIL  B 3C20 1B16   (Ext BASIC) ;utilities allow for easily transferring programs to/from cassette/disk, and some other functions
r242544r242545
176176   </software>
177177
178178<!--
179Processor Technology Basic/5 -- a simple BASIC
179Processor Technology Basic/5 - a simple BASIC
180180
181181    BASIC B 0000 19B6
182182    MTCHS B 1AD9 034D       ;21 matches; you play against the computer; last one to pick up a match loses
r242544r242545
358358<!--
359359Processor Technology GAMEPAC 1; collection of four games
360360
361    TARG  G 0000 0E42       ;the famous target game --shoot down ASCII spaceships
361    TARG  G 0000 0E42       ;the famous target game - shoot down ASCII spaceships
362362    LIFE  G 0000 0CCC       ;conway's life
363363    PTRN  G 0000 056E       ;simple kaleidoscope
364    ZING  G 0000 046B       ;a multi-ball pong-like game --requires external input device
364    ZING  G 0000 046B       ;a multi-ball pong-like game - requires external input device
365365
366366In SOLOS monitor "XEQ name" to load/autorun or "GET name" and then "EXEC 0".
367367
r242544r242545
382382<!--
383383Processor Technology GAMEPAC 2; collection of two games
384384
385    HANG  G 0000 0E12       ;hangman --in speedy assembly language
385    HANG  G 0000 0E12       ;hangman -in speedy assembly language
386386    QUBIC G 0000 0712       :play 3D tic-tac-toe against the computer
387387
388388In SOLOS monitor "XEQ name" to load/autorun or "GET name" and then "EXEC 0".
r242544r242545
434434
435435In SOLOS monitor "XEQ MUSIC" to load/autorun or "GET MUSIC" and then "EXEC 0".
436436
437HOW TO USE THE MUSIC SYSTEM -- see manual p.22
438THE MUSIC SYSTEM CIRCUIT BOARD -- see manual p.3 (schematic p.7) (Note: Seems Solance emu support it but MESS dont!?)
437HOW TO USE THE MUSIC SYSTEM - see manual p.22
438THE MUSIC SYSTEM CIRCUIT BOARD - see manual p.3 (schematic p.7) (Note: Seems Solance emu support it but MESS dont!?)
439439
440440User Manual at http://www.sol20.org/manuals/music.pdf
441441-->
r242544r242545
612612<!--
613613Various games written by Ray White
614614
615#1  DHMZI   0000 1360       ;deathmaze_instr    -- instructions for the deathmaze game
616    DHMZP   0000 5714       ;deathmaze_play -- dungeons & dragons game
617#2  FEUDL   0000 1AF4       ;feudal     -- run a simulated kingdom (hammurabi-like)
618#3  GOBBL   0000 06F4       ;gobble     -- race the clock to pick up as many pieces as you can)
619#4  PACMN   0000 0D04       ;pacman     -- pacman "clone"
620#5  REVRS   0000 0DD2       ;reversi        -- play reversi against the computer
621#6  ROBOI   0000 29B4       ;robot_instr    -- instructions for the robot game
622    ROBOP   0000 1FE4       ;robot_play     -- write robot programs then pit them against each other
623#7  SKULC   0000 41D4       ;skullcave      -- adventure game
624#8  STOMP   0000 0822       ;stomp      -- try to swat the flies
625#9  TICTT   0000 06A0       ;tic_tac_toe    -- play tic-tac-toe against the computer
615#1  DHMZI   0000 1360       ;deathmaze_instr    - instructions for the deathmaze game
616    DHMZP   0000 5714       ;deathmaze_play - dungeons & dragons game
617#2  FEUDL   0000 1AF4       ;feudal     - run a simulated kingdom (hammurabi-like)
618#3  GOBBL   0000 06F4       ;gobble     - race the clock to pick up as many pieces as you can)
619#4  PACMN   0000 0D04       ;pacman     - pacman "clone"
620#5  REVRS   0000 0DD2       ;reversi        - play reversi against the computer
621#6  ROBOI   0000 29B4       ;robot_instr    - instructions for the robot game
622    ROBOP   0000 1FE4       ;robot_play     - write robot programs then pit them against each other
623#7  SKULC   0000 41D4       ;skullcave      - adventure game
624#8  STOMP   0000 0822       ;stomp      - try to swat the flies
625#9  TICTT   0000 06A0       ;tic_tac_toe    - play tic-tac-toe against the computer
626626
627627In SOLOS monitor "XEQ name" to load/autorun or "GET name" and then "EXEC 0".
628628
r242544r242545
684684Standalone software of various origins
685685
686686#1  BTSHP G 0000 1121       ;battleship game ;from Proteus Cassette #7
687#2  CHASE G 0000 05E6       ;the game of chase ;evade robots before they grab you --from Dr. Dobbs --modified for Sol
687#2  CHASE G 0000 05E6       ;the game of chase ;evade robots before they grab you -from Dr. Dobbs -modified for Sol
688688#3  CHKR2 G 0000 2741       ;TCD checkers
689#4  DFLCT G 0000 0291       ;the game of deflection ;deflect target by typing a "/" or a "\" --by Andrew A. Recupero
690#5  MCHSS G 0000 1000       ;microchess ;a classic early chess program for microcomputers --written by Peter Jennings
691#6  MINE  G 0000 1495       ;mine field --by Carl E.Dawson, Programmer for ESV Computer Service
689#4  DFLCT G 0000 0291       ;the game of deflection ;deflect target by typing a "/" or a "\" -by Andrew A. Recupero
690#5  MCHSS G 0000 1000       ;microchess ;a classic early chess program for microcomputers -written by Peter Jennings
691#6  MINE  G 0000 1495       ;mine field -by Carl E.Dawson, Programmer for ESV Computer Service
692692#7  PIRAN G 0000 0876       ;piranha ;use the keypad to evade swarming piranhas
693#8  RAIDS G 0000 1124       ;space raiders ;space invaders clone --by Steve Maguire
693#8  RAIDS G 0000 1124       ;space raiders ;space invaders clone -by Steve Maguire
694694#9  TARGT G 0000 00E4       ;target ;a simple shooting game (not the famous target)
695695
696696In SOLOS monitor "XEQ name" to load/autorun or "GET name" and then "EXEC 0".
r242544r242545
767767
768768#1  GALAX   0000 0876       ;galaxy ;logic game from Access Vol 1, #4
769769#2  TRAIN   0000 0287       ;a screen saver, of sorts
770#3  WINZI   C900 01D0       ;chase, hic, opps, and life --see the newsletter for more details on the program
770#3  WINZI   C900 01D0       ;chase, hic, opps, and life -see the newsletter for more details on the program
771771
772772In SOLOS monitor "XEQ name" to load/autorun or "GET name" and then "EXEC address".
773773
r242544r242545
800800<!--
801801Collection of selected BASIC/5 programs
802802
803#1  BOMB  B 1AD9 1381       ;bomb a dam while under enemy fire --has hidden assembly language routines & isn't entirely LIST'able
804#2  BOMRN B 1AD9 1D7E       ;BOMBRUN ;bombing run simulation --Jim Prelesnik Rev.A 2-2-78
805#3  KORPS B 1AD9 4A95       ;AFRIKA KORPS pits you as a 1942 German Commander against British armored units --Ralph Hopkins
806#4  PANZR B 1AD9 4958       ;PANZER pits you as a 1944 German Commander playing against the British & Americans --Ralph Hopkins; late 1970's
807#5  STRWR B 1AD9 2822       ;STARWAR ;Simulation: destroy the infamous 'STARWARS' Death Star --MECC "STRWAR1" === reworked  03-20-78
808#6  STTR  B 1AD9 2EDE       ;classic game of StarTrek ;a SOL-20 version of Univac 1100 Basic's STTR2 --Ralph Hopkins; late 1970's
809#7  SWOLF B 1AD9 4925       ;SeaWolf ;WWII pacific submarine game --by Ralph Hopkins; (Era Jun-79)
810#8  TANKS B 1AD9 4A78       ;you are an american commander playing against the germans post normandy --Ralph Hopkins; late 1970's
811#9  TANKZ B 1AD9 49DB       ;you command a Russian tank unit playing against the Germans on the Russian Front --Ralph Hopkins; late 1970's
803#1  BOMB  B 1AD9 1381       ;bomb a dam while under enemy fire -has hidden assembly language routines & isn't entirely LIST'able
804#2  BOMRN B 1AD9 1D7E       ;BOMBRUN ;bombing run simulation -Jim Prelesnik Rev.A 2-2-78
805#3  KORPS B 1AD9 4A95       ;AFRIKA KORPS pits you as a 1942 German Commander against British armored units -Ralph Hopkins
806#4  PANZR B 1AD9 4958       ;PANZER pits you as a 1944 German Commander playing against the British & Americans -Ralph Hopkins; late 1970's
807#5  STRWR B 1AD9 2822       ;STARWAR ;Simulation: destroy the infamous 'STARWARS' Death Star -MECC "STRWAR1" === reworked  03-20-78
808#6  STTR  B 1AD9 2EDE       ;classic game of StarTrek ;a SOL-20 version of Univac 1100 Basic's STTR2 -Ralph Hopkins; late 1970's
809#7  SWOLF B 1AD9 4925       ;SeaWolf ;WWII pacific submarine game -by Ralph Hopkins; (Era Jun-79)
810#8  TANKS B 1AD9 4A78       ;you are an american commander playing against the germans post normandy -Ralph Hopkins; late 1970's
811#9  TANKZ B 1AD9 49DB       ;you command a Russian tank unit playing against the Germans on the Russian Front -Ralph Hopkins; late 1970's
812812
813813How to load BASIC/5 programs:
8148141)mount the tape bs5 .wav file into cass1 and Sol BASIC/5 .wav file into cass2
r242544r242545
874874<!--
875875Collection of selected ECB programs
876876
877#1  BOULE C 3C20 2AB5       ;impressive european variation of roulette (The Bowl) --Ralph Hopkins Eagan, MN (SOL-20 Ext BASIC) 9/1/78
878#2  ILAND C 3C20 5020       ;TREASURE ISLAND ;adventure --by Ralph Hopkins
879#3  NUMBR C 3C20 2E24       ;6 number games --RALPH HOPKINS  12-01-78
880#4  PLUS  C 3C20 3A3F       ;dots and pluses *WORD* game --by Ralph Hopkins, EAGAN, MINN. 06-06-78
881#5  ROLET C 3C20 30FA       ;play standard european computer roulette --author unknown; 5/1/78
877#1  BOULE C 3C20 2AB5       ;impressive european variation of roulette (The Bowl) -Ralph Hopkins Eagan, MN (SOL-20 Ext BASIC) 9/1/78
878#2  ILAND C 3C20 5020       ;TREASURE ISLAND ;adventure -by Ralph Hopkins
879#3  NUMBR C 3C20 2E24       ;6 number games -RALPH HOPKINS  12-01-78
880#4  PLUS  C 3C20 3A3F       ;dots and pluses *WORD* game -by Ralph Hopkins, EAGAN, MINN. 06-06-78
881#5  ROLET C 3C20 30FA       ;play standard european computer roulette -author unknown; 5/1/78
882882
883883How to load EC BASIC programs:
8848841)mount the tape ecb .wav file into cass1 and Extended Cassette BASIC .wav file into cass2
trunk/src/emu/bus/sms_ctrl/graphic.c
r242544r242545
7777//-------------------------------------------------
7878
7979sms_graphic_device::sms_graphic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
80   : device_t(mconfig, SMS_GRAPHIC, "Graphic Board", tag, owner, clock, "sms_joypad", __FILE__)
80   : device_t(mconfig, SMS_GRAPHIC, "Graphic Board", tag, owner, clock, "sms_graphic", __FILE__)
8181   , device_sms_control_port_interface(mconfig, *this)
8282   , m_buttons(*this, "BUTTONS")
8383   , m_x(*this, "X")
trunk/src/emu/cpu/arcompact/arcompact.c
r242544r242545
6161   m_program = &space(AS_PROGRAM);
6262
6363   state_add( 0,  "PC", m_debugger_temp).callimport().callexport().formatstr("%08X");
64
65   state_add( 0x10,  "STATUS32", m_debugger_temp).callimport().callexport().formatstr("%08X");
66
6467   state_add(STATE_GENPC, "GENPC", m_debugger_temp).callexport().noshow();
6568
6669   for (int i = 0x100; i < 0x140; i++)
r242544r242545
8285         m_debugger_temp = m_pc;
8386         break;
8487
88      case 0x10:
89         m_debugger_temp = m_status32;
90         break;
91
8592      case STATE_GENPC:
8693         m_debugger_temp = m_pc;
8794         break;
r242544r242545
106113         m_pc = (m_debugger_temp & 0xfffffffe);
107114         break;
108115
116      case 0x10:
117         m_status32 = m_debugger_temp;
118         break;
119
109120      default:
110121         if ((index >= 0x100) && (index < 0x140))
111122         {
r242544r242545
121132
122133   m_delayactive = 0;
123134   m_delayjump = 0x00000000;
135
136   for (int i = 0; i < 0x40; i++)
137      m_regs[i] = 0;
138
139   m_status32 = 0;
124140}
125141
126142/*****************************************************************************/
trunk/src/emu/cpu/arcompact/arcompact.h
r242544r242545
146146   ARCOMPACT_RETTYPE arcompact_handle01_01_01_0f(OPS_32);
147147   ARCOMPACT_RETTYPE arcompact_handle02(OPS_32);
148148   ARCOMPACT_RETTYPE arcompact_handle03(OPS_32);
149   ARCOMPACT_RETTYPE arcompact_handle04_00(OPS_32);
149//   ARCOMPACT_RETTYPE arcompact_handle04_00(OPS_32);
150150   ARCOMPACT_RETTYPE arcompact_handle04_01(OPS_32);
151151   ARCOMPACT_RETTYPE arcompact_handle04_02(OPS_32);
152152   ARCOMPACT_RETTYPE arcompact_handle04_03(OPS_32);
153   ARCOMPACT_RETTYPE arcompact_handle04_04(OPS_32);
153//   ARCOMPACT_RETTYPE arcompact_handle04_04(OPS_32);
154154   ARCOMPACT_RETTYPE arcompact_handle04_05(OPS_32);
155   ARCOMPACT_RETTYPE arcompact_handle04_06(OPS_32);
155//   ARCOMPACT_RETTYPE arcompact_handle04_06(OPS_32);
156156   ARCOMPACT_RETTYPE arcompact_handle04_07(OPS_32);
157157   ARCOMPACT_RETTYPE arcompact_handle04_08(OPS_32);
158158   ARCOMPACT_RETTYPE arcompact_handle04_09(OPS_32);
r242544r242545
767767
768768   ARCOMPACT_RETTYPE get_insruction(OPS_32);
769769
770
770   ARCOMPACT_HANDLER04_TYPE_PM(04_00);
771   ARCOMPACT_HANDLER04_TYPE_PM(04_04);
772   ARCOMPACT_HANDLER04_TYPE_PM(04_06);
773   ARCOMPACT_HANDLER04_TYPE_PM(04_0a);
771774   ARCOMPACT_HANDLER04_TYPE_PM(04_20);
772   ARCOMPACT_HANDLER04_TYPE_PM(04_0a);
773775
774
775776private:
776777   address_space_config m_program_config;
777778
r242544r242545
797798   int m_delaylinks;
798799   UINT32 m_delayjump;
799800
800
801//   f  e  d  c| b  a  9  8| 7  6  5  4| 3  2  1  0
802//  -  -  -  L| Z  N  C  V| U DE AE A2|A1 E2 E1  H
803   UINT32 m_status32;
801804};
802805
806#define V_OVERFLOW_FLAG (0x00000100)
807#define C_CARRY_FLAG (0x00000200)
808#define N_NEGATIVE_FLAG (0x00000400)
809#define Z_ZERO_FLAG (0x00000800)
803810
811// V = overflow (set if signed operation would overflow)
812#define STATUS32_SET_V   (m_status32 |=  V_OVERFLOW_FLAG)
813#define STATUS32_CLEAR_V (m_status32 &= ~V_OVERFLOW_FLAG)
814#define STATUS32_CHECK_V (m_status32 &   V_OVERFLOW_FLAG)
815
816// C = carry (unsigned op, carry set is same condition as LO Lower Than, carry clear is same condition as HS Higher Same)
817#define STATUS32_SET_C   (m_status32 |=  C_CARRY_FLAG)
818#define STATUS32_CLEAR_C (m_status32 &= ~C_CARRY_FLAG)
819#define STATUS32_CHECK_C (m_status32 &   C_CARRY_FLAG)
820
821// N = negative (set if most significant bit of result is set)
822#define STATUS32_SET_N   (m_status32 |=  N_NEGATIVE_FLAG)
823#define STATUS32_CLEAR_N (m_status32 &= ~N_NEGATIVE_FLAG)
824#define STATUS32_CHECK_N (m_status32 &   N_NEGATIVE_FLAG)
825
826// Z = zero (set if result is zero, ie both values the same for CMP)
827#define STATUS32_SET_Z   (m_status32 |=  Z_ZERO_FLAG)
828#define STATUS32_CLEAR_Z (m_status32 &= ~Z_ZERO_FLAG)
829#define STATUS32_CHECK_Z (m_status32 &   Z_ZERO_FLAG)
830
831
804832extern const device_type ARCA5;
805833
806834
trunk/src/emu/cpu/arcompact/arcompact_execute.c
r242544r242545
1717
1818   while (m_icount > 0)
1919   {
20      debugger_instruction_hook(this, m_pc<<1);
20      debugger_instruction_hook(this, m_pc);
2121
2222//      printf("new pc %04x\n", m_pc);
2323
r242544r242545
11231123   return m_pc + (size>>0);
11241124}
11251125
1126
1127
11261128ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_00_01dasm(OPS_32)
11271129{
11281130   int size = 4;
r242544r242545
11451147   }
11461148   else
11471149   {
1150      m_regs[REG_BLINK] = m_pc + (size >> 0);
11481151      return realaddress;
11491152   }
11501153
r242544r242545
11821185
11831186
11841187// register - register cases
1185ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_00(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BREQ"); }
1186ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_01(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BRNE"); }
1188
1189#define BR_REGREG_SETUP \
1190   /* Branch on Compare / Bit Test - Register-Register */ \
1191   int size = 4; \
1192   GET_01_01_01_BRANCH_ADDR; \
1193   COMMON32_GET_creg; \
1194   COMMON32_GET_breg; \
1195   int n = (op & 0x00000020) >> 5; \
1196   UINT32 b,c; \
1197   if ((breg != LIMM_REG) && (creg != LIMM_REG)) \
1198   { \
1199      b = m_regs[breg]; \
1200      c = m_regs[creg]; \
1201   } \
1202   else \
1203   { \
1204      UINT32 limm; \
1205      GET_LIMM_32; \
1206      size = 8; \
1207         \
1208      if (breg == LIMM_REG) \
1209         b = limm; \
1210      else \
1211         b = m_regs[breg]; \
1212        \
1213      if (creg == LIMM_REG) \
1214         c = limm; \
1215      else \
1216         c = m_regs[creg]; \
1217   } \
1218
1219#define BR_TAKEJUMP \
1220   /* take jump */ \
1221   UINT32 realaddress = PC_ALIGNED32 + (address * 2); \
1222    \
1223   if (n) \
1224   { \
1225      m_delayactive = 1; \
1226      m_delayjump = realaddress; \
1227      m_delaylinks = 0; \
1228   } \
1229   else \
1230   { \
1231      return realaddress; \
1232   } \
1233
1234
1235
1236ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_00(OPS_32)  // register - register BREQ
1237{
1238   BR_REGREG_SETUP
1239
1240   // BREQ
1241   if (b == c)
1242   {
1243      BR_TAKEJUMP
1244   }
1245   
1246   return m_pc + (size>>0);
1247}
1248
1249ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_01(OPS_32) // register - register BRNE
1250{
1251   BR_REGREG_SETUP
1252
1253   // BRNE
1254   if (b != c)
1255   {
1256      BR_TAKEJUMP
1257   }
1258   
1259   return m_pc + (size>>0);
1260}
1261
11871262ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_02(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BRLT"); }
11881263ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_03(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BRGE"); }
1189ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_04(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BRLO"); }
1190ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_05(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BRHS"); }
1264
1265ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_04(OPS_32) // register - register BRLO
1266{
1267   BR_REGREG_SETUP
1268
1269   // BRLO (unsigned operation)
1270   if (b < c)
1271   {
1272      BR_TAKEJUMP
1273   }
1274   
1275   return m_pc + (size>>0);
1276}
1277
1278
1279ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_05(OPS_32) // register - register BRHS
1280{
1281   BR_REGREG_SETUP
1282
1283   // BRHS (unsigned operation)
1284   if (b >= c)
1285   {
1286      BR_TAKEJUMP
1287   }
1288   
1289   return m_pc + (size>>0);
1290}
1291
1292
11911293ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_0e(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BBIT0");}
11921294ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_0f(OPS_32)  { return arcompact_01_01_00_helper( PARAMS, "BBIT1");}
11931295
r242544r242545
11981300   return m_pc + (size>>0);
11991301}
12001302
1303#define BR_REGIMM_SETUP \
1304   int size = 4; \
1305   GET_01_01_01_BRANCH_ADDR \
1306   COMMON32_GET_u6; \
1307   COMMON32_GET_breg; \
1308   int n = (op & 0x00000020) >> 5; \
1309   UINT32 b,c; \
1310   c = u; \
1311   /* comparing a LIMM  to an immediate is pointless, is it a valid encoding? */ \
1312   if ((breg != LIMM_REG)) \
1313   { \
1314      b = m_regs[breg]; \
1315   } \
1316   else \
1317   { \
1318      UINT32 limm; \
1319      GET_LIMM_32; \
1320      size = 8; \
1321      b = limm; \
1322   } \
1323
1324
12011325// register -immediate cases
1202ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_00(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BREQ"); }
1203ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_01(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRNE"); }
1204ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_02(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRLT"); }
1326ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_00(OPS_32) // BREQ reg-imm
1327{
1328   BR_REGIMM_SETUP
1329   
1330   // BREQ
1331   if (b == c)
1332   {
1333      BR_TAKEJUMP
1334   }
1335   
1336   return m_pc + (size>>0);
1337}
1338
1339ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_01(OPS_32) // BRNE reg-imm
1340{
1341   BR_REGIMM_SETUP
1342   
1343   // BRNE
1344   if (b != c)
1345   {
1346      BR_TAKEJUMP
1347   }
1348   
1349   return m_pc + (size>>0);
1350}
1351
1352
1353
1354ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_02(OPS_32) // BRLT reg-imm
1355{
1356   BR_REGIMM_SETUP
1357   
1358   // BRLT  (signed operation)
1359   if ((INT32)b < (INT32)c)
1360   {
1361      BR_TAKEJUMP
1362   }
1363   
1364   return m_pc + (size>>0);
1365
1366}
12051367ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_03(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRGE"); }
12061368ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRLO"); }
1207ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_05(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRHS"); }
1369
1370ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_05(OPS_32) // register - immediate BRHS
1371{
1372   BR_REGIMM_SETUP
1373
1374   // BRHS (unsigned operation)
1375   if (b >= c)
1376   {
1377      BR_TAKEJUMP
1378   }
1379   
1380   return m_pc + (size>>0);
1381}
1382
12081383ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_0e(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BBIT0"); }
12091384ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_0f(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BBIT1"); }
12101385
r242544r242545
12121387ARCOMPACT_RETTYPE arcompact_device::arcompact_handle02(OPS_32)
12131388{
12141389   int size = 4;
1390   UINT32 limm = 0;
1391
1392   int S = (op & 0x00008000) >> 15;// op &= ~0x00008000;
1393   int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000;
1394   if (S) s = -0x100 + s;
1395
12151396   COMMON32_GET_breg;
1397   COMMON32_GET_areg
12161398
1217   //UINT32 limm = 0;
1399   int X = (op & 0x00000040) >> 6;  //op &= ~0x00000040;
1400   int Z = (op & 0x00000180) >> 7;  //op &= ~0x00000180;
1401   int a = (op & 0x00000600) >> 9;  //op &= ~0x00000600;
1402//   int D = (op & 0x00000800) >> 11;// op &= ~0x00000800; // we don't use the data cache currently
1403
1404   UINT32 address = m_regs[breg];
1405
12181406   if (breg == LIMM_REG)
12191407   {
1220      //GET_LIMM_32;
1408      GET_LIMM_32;
12211409      size = 8;
1410
1411      address = limm;
12221412   }
12231413
1224   arcompact_log("unimplemented LD %08x", op);
1414   // address manipulation
1415   if ((a == 0) || (a == 1))
1416   {
1417      address = address + s;
1418   }
1419   else if (a == 2)
1420   {
1421      //address = address;
1422   }
1423   else if (a == 3)
1424   {
1425      if (Z == 0)
1426         address = address + (s << 2);
1427      else if (Z==2)
1428         address = address + (s << 1);
1429      else // Z == 1 and Z == 3 are invalid here
1430         arcompact_fatal("illegal LD %08x (data size %d mode %d)", op, Z, a);
1431   }
1432
1433   UINT32 readdata = 0;
1434
1435   // read data
1436   if (Z == 0)
1437   {
1438      readdata = READ32(address >> 2);
1439
1440      if (X) // sign extend is not supported for long reads
1441         arcompact_fatal("illegal LD %08x (data size %d mode %d with X)", op, Z, a);
1442
1443   }
1444   else if (Z == 1)
1445   {
1446      readdata = READ8(address >> 0);
1447
1448      if (X) // todo
1449         arcompact_fatal("illegal LD %08x (data size %d mode %d with X)", op, Z, a);
1450
1451   }
1452   else if (Z == 2)
1453   {
1454      readdata = READ16(address >> 1);
1455
1456      if (X) // todo
1457         arcompact_fatal("illegal LD %08x (data size %d mode %d with X)", op, Z, a);
1458
1459   }
1460   else if (Z == 3)
1461   { // Z == 3 is always illegal
1462      arcompact_fatal("illegal LD %08x (data size %d mode %d)", op, Z, a);
1463   }
1464
1465   m_regs[areg] = readdata;
1466
1467   // writeback / increment
1468   if ((a == 1) || (a == 2))
1469   {
1470      if (breg==limm)
1471         arcompact_fatal("illegal LD %08x (data size %d mode %d)", op, Z, a); // using the LIMM as the base register and an increment mode is illegal
1472
1473      m_regs[breg] = m_regs[breg] + s;
1474   }
1475
12251476   return m_pc + (size>>0);
12261477
12271478}
r242544r242545
12331484   int got_limm = 0;
12341485   int S = (op & 0x00008000) >> 15;
12351486   int s = (op & 0x00ff0000) >> 16;
1487   if (S) s = -0x100 + s;
12361488
12371489   COMMON32_GET_breg;
12381490   COMMON32_GET_creg;
1239
1240   if (S) s = -0x100 + s;
1241
1491   
12421492//   int R = (op & 0x00000001) >> 0; // bit 0 is reserved
12431493   int Z = (op & 0x00000006) >> 1;
12441494   int a = (op & 0x00000018) >> 3;
r242544r242545
14061656   return m_pc + (size>>0);
14071657}
14081658
1409ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00(OPS_32) 
1659
1660ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p00(OPS_32)
14101661{
1411   return arcompact_handle04_helper(PARAMS, opcodes_04[0x00], /*"ADD"*/ 0,0);
1662   int size = 4;
1663   UINT32 limm = 0;
1664   int got_limm = 0;
1665
1666   COMMON32_GET_breg;
1667   COMMON32_GET_F;
1668   COMMON32_GET_creg
1669   COMMON32_GET_areg
1670
1671   UINT32 b, c;
1672
1673   if (breg == LIMM_REG)
1674   {
1675      GET_LIMM_32;
1676      size = 8;
1677      got_limm = 1;
1678      b = limm;
1679   }
1680   else
1681   {
1682      b = m_regs[breg];
1683   }
1684
1685   if (creg == LIMM_REG)
1686   {
1687      if (!got_limm)
1688      {
1689         GET_LIMM_32;
1690         size = 8;
1691      }
1692      c = limm;
1693   }
1694   else
1695   {
1696      c = m_regs[creg];
1697   }
1698
1699   // todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?)
1700   m_regs[areg] = b + c;
1701
1702   if (F)
1703   {
1704      arcompact_fatal("arcompact_handle04_00_p00 (ADD) (F set)\n"); // not yet supported
1705   }
1706
1707   return m_pc + (size >> 0);
14121708}
14131709
1710ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p01(OPS_32)
1711{
1712   int size = 4;
1713   arcompact_fatal("arcompact_handle04_00_p01 (ADD)\n");
1714   return m_pc + (size >> 0);
1715}
1716
1717ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p10(OPS_32)
1718{
1719   int size = 4;
1720   arcompact_fatal("arcompact_handle04_00_p10 (ADD)\n");
1721   return m_pc + (size >> 0);
1722}
1723
1724ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m0(OPS_32)
1725{
1726   int size = 4;
1727   arcompact_fatal("arcompact_handle04_00_p11_m0 (ADD)\n");
1728   return m_pc + (size >> 0);
1729}
1730
1731ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m1(OPS_32)
1732{
1733   int size = 4;
1734   arcompact_fatal("arcompact_handle04_00_p11_m1 (ADD)\n");
1735   return m_pc + (size >> 0);
1736}
1737
1738
14141739ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_01(OPS_32) 
14151740{
14161741   return arcompact_handle04_helper(PARAMS, opcodes_04[0x01], /*"ADC"*/ 0,0);
r242544r242545
14261751   return arcompact_handle04_helper(PARAMS, opcodes_04[0x03], /*"SBC"*/ 0,0);
14271752}
14281753
1429ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04(OPS_32) 
1754
1755ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p00(OPS_32)
14301756{
1431   return arcompact_handle04_helper(PARAMS, opcodes_04[0x04], /*"AND"*/ 0,0);
1757   int size = 4;
1758   UINT32 limm = 0;
1759   int got_limm = 0;
1760
1761   COMMON32_GET_breg;
1762   COMMON32_GET_F;
1763   COMMON32_GET_creg
1764   COMMON32_GET_areg
1765
1766   UINT32 b, c;
1767
1768   if (breg == LIMM_REG)
1769   {
1770      GET_LIMM_32;
1771      size = 8;
1772      got_limm = 1;
1773      b = limm;
1774   }
1775   else
1776   {
1777      b = m_regs[breg];
1778   }
1779
1780   if (creg == LIMM_REG)
1781   {
1782      if (!got_limm)
1783      {
1784         GET_LIMM_32;
1785         size = 8;
1786      }
1787      c = limm;
1788   }
1789   else
1790   {
1791      c = m_regs[creg];
1792   }
1793   // todo: is and a, limm, limm valid? (it's pointless.)
1794
1795   // todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?)
1796   m_regs[areg] = b & c;
1797
1798   if (F)
1799   {
1800      arcompact_fatal("arcompact_handle04_04_p00 (AND) (F set)\n"); // not yet supported
1801   }
1802
1803   return m_pc + (size >> 0);}
1804
1805ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p01(OPS_32)
1806{
1807   int size = 4;
1808   arcompact_fatal("arcompact_handle04_04_p01 (AND)\n");
1809   return m_pc + (size >> 0);
14321810}
14331811
1812ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p10(OPS_32)
1813{
1814   int size = 4;
1815   arcompact_fatal("arcompact_handle04_04_p10 (AND)\n");
1816   return m_pc + (size >> 0);
1817}
1818
1819ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m0(OPS_32)
1820{
1821   int size = 4;
1822   arcompact_fatal("arcompact_handle04_04_p11_m0 (AND)\n");
1823   return m_pc + (size >> 0);
1824}
1825
1826ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m1(OPS_32)
1827{
1828   int size = 4;
1829   arcompact_fatal("arcompact_handle04_04_p11_m1 (AND)\n");
1830   return m_pc + (size >> 0);
1831}
1832
1833
14341834ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05(OPS_32) 
14351835{
14361836   return arcompact_handle04_helper(PARAMS, opcodes_04[0x05], /*"OR"*/ 0,0);
14371837}
14381838
1439ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06(OPS_32) 
1839
1840ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p00(OPS_32)
14401841{
1441   return arcompact_handle04_helper(PARAMS, opcodes_04[0x06], /*"BIC"*/ 0,0);
1842   int size = 4;
1843   arcompact_fatal("arcompact_handle04_06_p00 (BIC)\n");
1844   return m_pc + (size >> 0);
1845
14421846}
14431847
1848ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p01(OPS_32)
1849{
1850   int size = 4;
1851   arcompact_fatal("arcompact_handle04_06_p01 (BIC)\n");
1852   return m_pc + (size >> 0);
1853}
1854
1855ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p10(OPS_32)
1856{
1857   int size = 4;
1858   arcompact_fatal("arcompact_handle04_06_p10 (BIC)\n");
1859   return m_pc + (size >> 0);
1860}
1861
1862ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m0(OPS_32)
1863{
1864   int size = 4;
1865   arcompact_fatal("arcompact_handle04_06_p11_m0 (BIC)\n");
1866   return m_pc + (size >> 0);
1867}
1868
1869ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m1(OPS_32)
1870{
1871   int size = 4;
1872   arcompact_fatal("arcompact_handle04_06_p11_m1 (BIC)\n");
1873   return m_pc + (size >> 0);
1874}
1875
1876
14441877ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07(OPS_32) 
14451878{
14461879   return arcompact_handle04_helper(PARAMS, opcodes_04[0x07], /*"XOR"*/ 0,0);
r242544r242545
20172450   {
20182451   }   
20192452
2020   arcompact_log("unimplemented LD %08x", op);
2453   arcompact_log("unimplemented LD %08x (type 04_3x)", op);
20212454   return m_pc + (size>>0);
20222455}
20232456
r242544r242545
21082541ARCOMPACT_RETTYPE arcompact_device::arcompact_handle06(OPS_32)
21092542{
21102543   arcompact_log("op a,b,c (06 ARC ext) (%08x)", op );
2111   return m_pc + (4 >> 0);;
2544   return m_pc + (4 >> 0);
21122545}
21132546
21142547ARCOMPACT_RETTYPE arcompact_device::arcompact_handle07(OPS_32)
21152548{
21162549   arcompact_log("op a,b,c (07 User ext) (%08x)", op );
2117   return m_pc + (4 >> 0);;
2550   return m_pc + (4 >> 0);
21182551}
21192552
21202553ARCOMPACT_RETTYPE arcompact_device::arcompact_handle08(OPS_32)
21212554{
21222555   arcompact_log("op a,b,c (08 User ext) (%08x)", op );
2123   return m_pc + (4 >> 0);;
2556   return m_pc + (4 >> 0);
21242557}
21252558
21262559ARCOMPACT_RETTYPE arcompact_device::arcompact_handle09(OPS_32)
21272560{
21282561   arcompact_log("op a,b,c (09 Market ext) (%08x)", op );
2129   return m_pc + (4 >> 0);;
2562   return m_pc + (4 >> 0);
21302563}
21312564
21322565ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0a(OPS_32)
21332566{
21342567   arcompact_log("op a,b,c (0a Market ext) (%08x)",  op );
2135   return m_pc + (4 >> 0);;
2568   return m_pc + (4 >> 0);
21362569}
21372570
21382571ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0b(OPS_32)
21392572{
21402573   arcompact_log("op a,b,c (0b Market ext) (%08x)",  op );
2141   return m_pc + (4 >> 0);;
2574   return m_pc + (4 >> 0);
21422575}
21432576
21442577
r242544r242545
21462579ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0c_helper(OPS_16, const char* optext)
21472580{
21482581   arcompact_log("unimplemented %s %04x (0x0c group)", optext, op);
2149   return m_pc + (2 >> 0);;
2582   return m_pc + (2 >> 0);
21502583}
21512584
21522585
r242544r242545
21652598   return arcompact_handle0c_helper(PARAMS, "LDW_S");
21662599}
21672600
2168ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0c_03(OPS_16)
2601ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0c_03(OPS_16) // ADD_S a <- b + c
21692602{
2170   return arcompact_handle0c_helper(PARAMS, "ADD_S");
2603   int areg, breg, creg;
2604
2605   COMMON16_GET_areg;
2606   COMMON16_GET_breg;
2607   COMMON16_GET_creg;
2608
2609   REG_16BIT_RANGE(areg);
2610   REG_16BIT_RANGE(breg);
2611   REG_16BIT_RANGE(creg);
2612
2613   m_regs[areg] = m_regs[breg] + m_regs[creg];
2614
2615   return m_pc + (2 >> 0);
21712616}
21722617
21732618
21742619ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_helper(OPS_16, const char* optext)
21752620{
2176   arcompact_log("unimplemented %s %04x", optext, op);
2177   return m_pc + (2 >> 0);;
2621   arcompact_log("unimplemented %s %04x (0x0d group)", optext, op);
2622   return m_pc + (2 >> 0);
21782623}
21792624
21802625
r242544r242545
22182663
22192664   }
22202665
2221   arcompact_log("unimplemented %s %04x", optext, op);
2666   arcompact_log("unimplemented %s %04x (0x0e_0x group)", optext, op);
22222667
22232668   return m_pc+ (size>>0);
22242669
r242544r242545
22662711   return arcompact_handle0e_0x_helper(PARAMS, "CMP_S", 0);
22672712}
22682713
2269ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0e_03(OPS_16)
2714ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0e_03(OPS_16) // MOV_S h <- b
22702715{
2271   return arcompact_handle0e_0x_helper(PARAMS, "MOV_S (0e_03 type)", 1);
2716   int h,breg;
2717   int size = 2;
2718
2719   GROUP_0e_GET_h;
2720   COMMON16_GET_breg;
2721   REG_16BIT_RANGE(breg);
2722   
2723   if (h == LIMM_REG) // no result..
2724   {
2725
2726   }
2727
2728   m_regs[h] = m_regs[breg];
2729
2730   return m_pc+ (size>>0);
22722731}
22732732
22742733
r242544r242545
22762735ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_0x_helper(OPS_16, const char* optext)
22772736{
22782737   arcompact_log("unimplemented %s %04x", optext, op);
2279   return m_pc + (2 >> 0);;
2738   return m_pc + (2 >> 0);
22802739}
22812740
22822741
r242544r242545
22842743ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_00(OPS_16)  { return arcompact_handle0f_00_0x_helper(PARAMS, "J_S"); }
22852744ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_01(OPS_16)  { return arcompact_handle0f_00_0x_helper(PARAMS, "J_S.D"); }
22862745ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_02(OPS_16)  { return arcompact_handle0f_00_0x_helper(PARAMS, "JL_S");  }
2287ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_03(OPS_16)  { return arcompact_handle0f_00_0x_helper(PARAMS, "JL_S.D");  }
2746
2747ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_03(OPS_16) // JL_S.D
2748{
2749   int breg;
2750
2751   COMMON16_GET_breg;
2752   REG_16BIT_RANGE(breg);
2753   
2754   m_delayactive = 1;
2755   m_delayjump = m_regs[breg];
2756   m_delaylinks = 1;
2757   
2758   return m_pc + (2 >> 0);
2759}
2760
22882761ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_06(OPS_16)  { return arcompact_handle0f_00_0x_helper(PARAMS, "SUB_S.NE"); }
22892762
22902763
22912764
22922765
22932766// Zero parameters (ZOP)
2294ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { arcompact_log("NOP_S"); return m_pc + (2 >> 0);;}
2295ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_01(OPS_16)  { arcompact_log("UNIMP_S"); return m_pc + (2 >> 0);;} // Unimplemented Instruction, same as illegal, but recommended to fill blank space
2296ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_04(OPS_16)  { arcompact_log("JEQ_S [blink]"); return m_pc + (2 >> 0);;}
2297ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_05(OPS_16)  { arcompact_log("JNE_S [blink]"); return m_pc + (2 >> 0);;}
2298ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_06(OPS_16)  { arcompact_log("J_S [blink]"); return m_pc + (2 >> 0);;}
2299ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_07(OPS_16)  { arcompact_log("J_S.D [blink]"); return m_pc + (2 >> 0);;}
2767ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { arcompact_log("NOP_S"); return m_pc + (2 >> 0);}
2768ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_01(OPS_16)  { arcompact_log("UNIMP_S"); return m_pc + (2 >> 0);} // Unimplemented Instruction, same as illegal, but recommended to fill blank space
2769ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_04(OPS_16)  { arcompact_log("JEQ_S [blink]"); return m_pc + (2 >> 0);}
2770ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_05(OPS_16)  { arcompact_log("JNE_S [blink]"); return m_pc + (2 >> 0);}
23002771
2772ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_06(OPS_16) // J_S [blink]
2773{
2774   return m_regs[REG_BLINK];
2775}
23012776
23022777
2778ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_07(OPS_16)  { arcompact_log("J_S.D [blink]"); return m_pc + (2 >> 0);}
23032779
23042780
2781
2782
2783
23052784ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0x_helper(OPS_16, const char* optext, int nodst)
23062785{
2307   arcompact_log("unimplemented %s %04x", optext, op);
2308   return m_pc + (2 >> 0);;
2786   arcompact_log("unimplemented %s %04x (0xf_0x group)", optext, op);
2787   return m_pc + (2 >> 0);
23092788}
23102789
23112790ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_02(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SUB_S",0);  }
r242544r242545
23172796ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0c(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "MUL64_S",2);  } // actual destination is special multiply registers
23182797ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0d(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXB_S",0); }
23192798ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0e(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXW_S",0); }
2320ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0f(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "EXTB_S",0); }
2799
2800ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0f(OPS_16) // EXTB_S
2801{
2802   int breg, creg;
2803
2804   COMMON16_GET_breg;
2805   COMMON16_GET_creg;
2806
2807   REG_16BIT_RANGE(breg);
2808   REG_16BIT_RANGE(creg);
2809
2810   m_regs[breg] = m_regs[creg] & 0xff;
2811
2812   return m_pc + (2 >> 0);
2813
2814}
2815
23212816ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_10(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "EXTW_S",0); }
23222817ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_11(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ABS_S",0);  }
23232818ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_12(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "NOT_S",0);  }
r242544r242545
23362831ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1e(OPS_16)  // special
23372832{
23382833   arcompact_log("unimplemented TRAP_S %04x",  op);
2339   return m_pc + (2 >> 0);;
2834   return m_pc + (2 >> 0);
23402835}
23412836
23422837ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1f(OPS_16)  // special
23432838{
23442839   arcompact_log("unimplemented BRK_S %04x",  op);
2345   return m_pc + (2 >> 0);;
2840   return m_pc + (2 >> 0);
23462841}
23472842
23482843
23492844ARCOMPACT_RETTYPE arcompact_device::arcompact_handle_ld_helper(OPS_16, const char* optext, int shift, int swap)
23502845{
23512846   arcompact_log("unimplemented %s %04x (ld/st group %d %d)", optext, op, shift, swap);
2352   return m_pc + (2 >> 0);;
2847   return m_pc + (2 >> 0);
23532848}
23542849
23552850
r242544r242545
24162911
24172912ARCOMPACT_RETTYPE arcompact_device::arcompact_handle_l7_0x_helper(OPS_16, const char* optext)
24182913{
2419   arcompact_log("unimplemented %s %04x", optext, op);
2420   return m_pc + (2 >> 0);;
2914   arcompact_log("unimplemented %s %04x (l7_0x group)", optext, op);
2915   return m_pc + (2 >> 0);
24212916}
24222917
2423ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_00(OPS_16)
2918ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_00(OPS_16) // ASL_S b, b, u5
24242919{
2425   return arcompact_handle_l7_0x_helper(PARAMS, "ASL_S");
2920   int breg, u;
2921
2922   COMMON16_GET_breg;
2923   COMMON16_GET_u5;
2924
2925   REG_16BIT_RANGE(breg);
2926
2927   // only bottom 5 bits are used if ASL operations, we only have 5 bits anyway here
2928   m_regs[breg] = m_regs[breg] << (u&0x1f);
2929
2930   return m_pc + (2 >> 0);
2931
24262932}
24272933
24282934ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_01(OPS_16)
r242544r242545
24302936   return arcompact_handle_l7_0x_helper(PARAMS, "LSR_S");
24312937}
24322938
2433ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_02(OPS_16)
2939ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_02(OPS_16) // ASR_S b,b,u5
24342940{
2435   return arcompact_handle_l7_0x_helper(PARAMS, "ASR_S");
2941   int breg, u;
2942
2943   COMMON16_GET_breg;
2944   COMMON16_GET_u5;
2945
2946   REG_16BIT_RANGE(breg);
2947
2948   // only bottom 5 bits are used if ASR operations, we only have 5 bits anyway here
2949   INT32 temp = (INT32)m_regs[breg]; // treat it as a signed value, so sign extension occurs during shift
2950   
2951   m_regs[breg] = temp >> (u&0x1f);
2952
2953   return m_pc + (2 >> 0);
24362954}
24372955
24382956ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_03(OPS_16)
r242544r242545
24632981ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_0x_helper(OPS_16, const char* optext, int st)
24642982{
24652983   arcompact_log("unimplemented %s %04x (0x18_0x group)", optext, op);
2466   return m_pc + (2 >> 0);;
2984   return m_pc + (2 >> 0);
24672985}
24682986
24692987ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_00(OPS_16)
r242544r242545
24943012// op bits remaining for 0x18_05_xx subgroups 0x001f
24953013ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_00(OPS_16)
24963014{
2497   arcompact_log("unimplemented ADD_S SP, SP %04x", op);
2498   return m_pc + (2 >> 0);;
3015   int u;
3016   COMMON16_GET_u5;
3017
3018   m_regs[REG_SP] = m_regs[REG_SP] + (u << 2);
3019
3020   return m_pc + (2 >> 0);
24993021}
25003022
25013023ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_01(OPS_16)
25023024{
2503   arcompact_log("unimplemented SUB_S SP, SP %04x", op);
2504   return m_pc + (2 >> 0);;
3025   int u;
3026   COMMON16_GET_u5;
3027
3028   m_regs[REG_SP] = m_regs[REG_SP] - (u << 2);
3029
3030   return m_pc + (2 >> 0);
25053031}
25063032
25073033// op bits remaining for 0x18_06_xx subgroups 0x0700
2508ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_01(OPS_16)
3034ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_01(OPS_16) // POP_S b
25093035{
2510   arcompact_log("unimplemented POP_S %04x", op);
2511   return m_pc + (2 >> 0);;
3036   int breg;
3037   COMMON16_GET_breg;
3038   REG_16BIT_RANGE(breg);
3039   
3040   m_regs[breg] = READ32(m_regs[REG_SP] >> 2);
3041   m_regs[REG_SP] += 4;
3042
3043   return m_pc + (2 >> 0);
25123044}
25133045
2514ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_11(OPS_16)
3046ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_11(OPS_16) // POP_S blink
25153047{
2516   arcompact_log("unimplemented POP_S [BLINK] %04x", op);
2517   return m_pc + (2 >> 0);;
3048   // breg bits are reserved
3049   m_regs[REG_BLINK] = READ32(m_regs[REG_SP] >> 2 );
3050   m_regs[REG_SP] += 4;
3051
3052   return m_pc + (2 >> 0);
25183053}
25193054
25203055// op bits remaining for 0x18_07_xx subgroups 0x0700
2521ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_01(OPS_16)
3056ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_01(OPS_16) // PUSH_S b
25223057{
25233058   int breg;
25243059   COMMON16_GET_breg;
r242544r242545
25323067}
25333068
25343069
2535ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_11(OPS_16)
3070ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_11(OPS_16) // PUSH_S [blink]
25363071{
25373072   // breg bits are reserved
25383073
r242544r242545
25473082ARCOMPACT_RETTYPE arcompact_device::arcompact_handle19_0x_helper(OPS_16, const char* optext, int shift, int format)
25483083{
25493084   arcompact_log("unimplemented %s %04x (0x19_0x group)", optext, op);
2550   return m_pc + (2 >> 0);;
3085   return m_pc + (2 >> 0);
25513086}
25523087
25533088ARCOMPACT_RETTYPE arcompact_device::arcompact_handle19_00(OPS_16)  { return arcompact_handle19_0x_helper(PARAMS, "LD_S", 2, 0); }
r242544r242545
25583093ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1a(OPS_16)
25593094{
25603095   arcompact_log("unimplemented MOV_S x, [PCL, x] %04x",  op);
2561   return m_pc + (2 >> 0);;
3096   return m_pc + (2 >> 0);
25623097}
25633098
2564ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1b(OPS_16)
3099ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1b(OPS_16) // MOV_S b, u8
25653100{
2566   arcompact_log("unimplemented MOV_S (1b type) %04x",  op);
2567   return m_pc + (2 >> 0);;
3101   int breg;
3102   UINT32 u;
3103   COMMON16_GET_breg;
3104   COMMON16_GET_u8;
3105   REG_16BIT_RANGE(breg);
3106
3107   m_regs[breg] = u;
3108
3109   return m_pc + (2 >> 0);
25683110}
25693111
2570ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_00(OPS_16)
3112ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_00(OPS_16) // ADD_S b, b, u7
25713113{
2572   arcompact_log("unimplemented ADD_S %04x",  op);
2573   return m_pc + (2 >> 0);;
3114   int breg;
3115   UINT32 u;
3116   COMMON16_GET_breg;
3117   COMMON16_GET_u7;
3118   REG_16BIT_RANGE(breg);
3119
3120   m_regs[breg] = m_regs[breg] + u;
3121
3122   return m_pc + (2 >> 0);
25743123}
25753124
2576ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_01(OPS_16)
3125ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_01(OPS_16) // CMP b, u7
25773126{
2578   arcompact_log("unimplemented CMP_S %04x",  op);
2579   return m_pc + (2 >> 0);;
3127   int breg;
3128   UINT32 u;
3129   COMMON16_GET_breg;
3130   COMMON16_GET_u7;
3131   REG_16BIT_RANGE(breg);
3132
3133   // flag setting ALWAYS occurs on CMP operations, even 16-bit ones even without a .F opcode type
3134
3135   // TODO: verify this flag setting logic
3136
3137   // unsigned checks
3138   if (m_regs[breg] == u)
3139   {
3140      STATUS32_SET_Z;
3141   }
3142   else
3143   {
3144      STATUS32_CLEAR_Z;
3145   }
3146
3147   if (m_regs[breg] < u)
3148   {
3149      STATUS32_SET_C;
3150   }
3151   else
3152   {
3153      STATUS32_CLEAR_C;
3154   }
3155   // signed checks
3156   INT32 temp = (INT32)m_regs[breg] - (INT32)u;
3157
3158   if (temp < 0)
3159   {
3160      STATUS32_SET_N;
3161   }
3162   else
3163   {
3164      STATUS32_CLEAR_N;
3165   }
3166
3167   // if signs of source values don't match, and sign of result doesn't match the first source value, then we've overflowed?
3168   if ((m_regs[breg] & 0x80000000) != (u & 0x80000000))
3169   {
3170      if ((m_regs[breg] & 0x80000000) != (temp & 0x80000000))
3171      {
3172         STATUS32_SET_V;
3173      }
3174      else
3175      {
3176         STATUS32_CLEAR_V;
3177      }
3178   }
3179
3180   // only sets flags, no result written
3181
3182   return m_pc + (2 >> 0);
25803183}
25813184
25823185ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_helper(OPS_16, const char* optext)
25833186{
25843187   arcompact_log("unimplemented %s %04x", optext, op);
2585   return m_pc + (2 >> 0);;
3188   return m_pc + (2 >> 0);
25863189}
25873190
25883191
2589ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_00(OPS_16)  { return arcompact_handle1d_helper(PARAMS,"BREQ_S"); }
3192ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_00(OPS_16) // BREQ b,0,s8
3193{
3194   int breg;
3195   COMMON16_GET_breg;
3196   REG_16BIT_RANGE(breg);
3197
3198   if (!m_regs[breg])
3199   {
3200      int s = (op & 0x007f) >> 0;   op &= ~0x007f;
3201      if (s & 0x40) s = -0x40 + (s & 0x3f);
3202      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
3203      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
3204      return realaddress;
3205   }
3206
3207   return m_pc + (2 >> 0);
3208}
3209
3210
25903211ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_01(OPS_16)  { return arcompact_handle1d_helper(PARAMS,"BRNE_S"); }
25913212
25923213
25933214ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_0x_helper(OPS_16, const char* optext)
25943215{
2595   arcompact_log("unimplemented %s %04x", optext, op);
2596   return m_pc + (2 >> 0);;
3216   arcompact_log("unimplemented %s %04x (1e_0x type)", optext, op);
3217   return m_pc + (2 >> 0);
25973218}
25983219
25993220
26003221
2601ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_00(OPS_16)  { return arcompact_handle1e_0x_helper(PARAMS, "BL_S");  }
3222ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_00(OPS_16) // B_S s10  (branch always)
3223{
3224   int s = (op & 0x01ff) >> 0;   op &= ~0x01ff;
3225   if (s & 0x100) s = -0x100 + (s & 0xff);
3226   UINT32 realaddress = PC_ALIGNED32 + (s * 2);
3227   //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
3228   return realaddress;
3229}
3230
26023231ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_01(OPS_16)  { return arcompact_handle1e_0x_helper(PARAMS, "BEQ_S"); }
2603ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_02(OPS_16)  { return arcompact_handle1e_0x_helper(PARAMS, "BNE_S"); }
26043232
3233ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_02(OPS_16) // BNE_S s10  (branch if zero bit isn't set)
3234{
3235   if (!STATUS32_CHECK_Z)
3236   {
3237      int s = (op & 0x01ff) >> 0;   op &= ~0x01ff;
3238      if (s & 0x100) s = -0x100 + (s & 0xff);
3239      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
3240      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
3241      return realaddress;
3242   }
3243
3244   return m_pc + (2 >> 0);
3245}
3246
26053247ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_0x_helper(OPS_16, const char* optext)
26063248{
26073249   arcompact_log("unimplemented %s %04x", optext, op);
2608   return m_pc + (2 >> 0);;
3250   return m_pc + (2 >> 0);
26093251}
26103252
26113253ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_00(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BGT_S"); }
r242544r242545
26173259ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_06(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BLO_S"); }
26183260ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_07(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BLS_S"); }
26193261
2620ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1f(OPS_16)
3262ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1f(OPS_16) // BL_S s13
26213263{
2622   arcompact_log("unimplemented BL_S %04x", op);
2623   return m_pc + (2 >> 0);;
3264   int s = (op & 0x07ff) >> 0;   op &= ~0x07ff;
3265   if (s & 0x400) s = -0x400 + (s & 0x3ff);
3266
3267   UINT32 realaddress = PC_ALIGNED32 + (s * 4);
3268
3269   m_regs[REG_BLINK] = m_pc + (2 >> 0);
3270   return realaddress;
26243271}
26253272
26263273/************************************************************************************************************************************
r242544r242545
29603607ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_3e(OPS_32)  { arcompact_fatal("<illegal 0x05_3e> (%08x)", op); return m_pc + (4 >> 0);}
29613608ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_3f(OPS_32)  { arcompact_fatal("<illegal 0x05_3f> (%08x)", op); return m_pc + (4 >> 0);}
29623609
2963ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_04(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);;}
2964ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_05(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);;}
2965ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_02(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_07_02> (%08x)", op); return m_pc + (2 >> 0);;}
2966ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_03(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_07_03> (%08x)", op); return m_pc + (2 >> 0);;}
2967ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_01(OPS_16)  { arcompact_fatal("<illegal 0x0f_01> (%08x)", op); return m_pc + (2 >> 0);;}
2968ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_03(OPS_16)  { arcompact_fatal("<illegal 0x0f_03> (%08x)", op); return m_pc + (2 >> 0);;}
2969ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_08(OPS_16)  { arcompact_fatal("<illegal 0x0f_08> (%08x)", op); return m_pc + (2 >> 0);;}
2970ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_09(OPS_16)  { arcompact_fatal("<illegal 0x0f_09> (%08x)", op); return m_pc + (2 >> 0);;}
2971ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0a(OPS_16)  { arcompact_fatal("<illegal 0x0f_0a> (%08x)", op); return m_pc + (2 >> 0);;}
2972ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_17(OPS_16)  { arcompact_fatal("<illegal 0x0f_17> (%08x)", op); return m_pc + (2 >> 0);;}
3610ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_04(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);}
3611ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_05(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);}
3612ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_02(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_07_02> (%08x)", op); return m_pc + (2 >> 0);}
3613ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_03(OPS_16)  { arcompact_fatal("<illegal 0x0f_00_07_03> (%08x)", op); return m_pc + (2 >> 0);}
3614ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_01(OPS_16)  { arcompact_fatal("<illegal 0x0f_01> (%08x)", op); return m_pc + (2 >> 0);}
3615ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_03(OPS_16)  { arcompact_fatal("<illegal 0x0f_03> (%08x)", op); return m_pc + (2 >> 0);}
3616ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_08(OPS_16)  { arcompact_fatal("<illegal 0x0f_08> (%08x)", op); return m_pc + (2 >> 0);}
3617ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_09(OPS_16)  { arcompact_fatal("<illegal 0x0f_09> (%08x)", op); return m_pc + (2 >> 0);}
3618ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0a(OPS_16)  { arcompact_fatal("<illegal 0x0f_0a> (%08x)", op); return m_pc + (2 >> 0);}
3619ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_17(OPS_16)  { arcompact_fatal("<illegal 0x0f_17> (%08x)", op); return m_pc + (2 >> 0);}
29733620
2974ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_02(OPS_16)  { arcompact_fatal("<illegal 0x18_05_02> (%04x)", op); return m_pc + (2 >> 0);;}
2975ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_03(OPS_16)  { arcompact_fatal("<illegal 0x18_05_03> (%04x)", op); return m_pc + (2 >> 0);;}
2976ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_04(OPS_16)  { arcompact_fatal("<illegal 0x18_05_04> (%04x)", op); return m_pc + (2 >> 0);;}
2977ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_05(OPS_16)  { arcompact_fatal("<illegal 0x18_05_05> (%04x)", op); return m_pc + (2 >> 0);;}
2978ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_06(OPS_16)  { arcompact_fatal("<illegal 0x18_05_06> (%04x)", op); return m_pc + (2 >> 0);;}
2979ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_07(OPS_16)  { arcompact_fatal("<illegal 0x18_05_07> (%04x)", op); return m_pc + (2 >> 0);;}
2980ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_00(OPS_16)  { arcompact_fatal("<illegal 0x18_06_00> (%04x)",  op); return m_pc + (2 >> 0);;}
2981ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_02(OPS_16)  { arcompact_fatal("<illegal 0x18_06_02> (%04x)", op); return m_pc + (2 >> 0);;}
2982ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_03(OPS_16)  { arcompact_fatal("<illegal 0x18_06_03> (%04x)", op); return m_pc + (2 >> 0);;}
2983ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_04(OPS_16)  { arcompact_fatal("<illegal 0x18_06_04> (%04x)", op); return m_pc + (2 >> 0);;}
2984ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_05(OPS_16)  { arcompact_fatal("<illegal 0x18_06_05> (%04x)", op); return m_pc + (2 >> 0);;}
2985ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_06(OPS_16)  { arcompact_fatal("<illegal 0x18_06_06> (%04x)", op); return m_pc + (2 >> 0);;}
2986ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_07(OPS_16)  { arcompact_fatal("<illegal 0x18_06_07> (%04x)", op); return m_pc + (2 >> 0);;}
2987ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_08(OPS_16)  { arcompact_fatal("<illegal 0x18_06_08> (%04x)", op); return m_pc + (2 >> 0);;}
2988ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_09(OPS_16)  { arcompact_fatal("<illegal 0x18_06_09> (%04x)", op); return m_pc + (2 >> 0);;}
2989ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0a(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0a> (%04x)", op); return m_pc + (2 >> 0);;}
2990ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0b(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0b> (%04x)", op); return m_pc + (2 >> 0);;}
2991ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0c(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0c> (%04x)", op); return m_pc + (2 >> 0);;}
2992ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0d(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0d> (%04x)", op); return m_pc + (2 >> 0);;}
2993ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0e(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0e> (%04x)", op); return m_pc + (2 >> 0);;}
2994ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0f(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0f> (%04x)", op); return m_pc + (2 >> 0);;}
2995ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_10(OPS_16)  { arcompact_fatal("<illegal 0x18_06_10> (%04x)", op); return m_pc + (2 >> 0);;}
2996ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_12(OPS_16)  { arcompact_fatal("<illegal 0x18_06_12> (%04x)",  op); return m_pc + (2 >> 0);;}
2997ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_13(OPS_16)  { arcompact_fatal("<illegal 0x18_06_13> (%04x)",  op); return m_pc + (2 >> 0);;}
2998ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_14(OPS_16)  { arcompact_fatal("<illegal 0x18_06_14> (%04x)",  op); return m_pc + (2 >> 0);;}
2999ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_15(OPS_16)  { arcompact_fatal("<illegal 0x18_06_15> (%04x)",  op); return m_pc + (2 >> 0);;}
3000ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_16(OPS_16)  { arcompact_fatal("<illegal 0x18_06_16> (%04x)",  op); return m_pc + (2 >> 0);;}
3001ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_17(OPS_16)  { arcompact_fatal("<illegal 0x18_06_17> (%04x)",  op); return m_pc + (2 >> 0);;}
3002ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_18(OPS_16)  { arcompact_fatal("<illegal 0x18_06_18> (%04x)",  op); return m_pc + (2 >> 0);;}
3003ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_19(OPS_16)  { arcompact_fatal("<illegal 0x18_06_19> (%04x)",  op); return m_pc + (2 >> 0);;}
3004ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1a(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1a> (%04x)",  op); return m_pc + (2 >> 0);;}
3005ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1b(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1b> (%04x)",  op); return m_pc + (2 >> 0);;}
3006ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1c(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1c> (%04x)",  op); return m_pc + (2 >> 0);;}
3007ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1d(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1d> (%04x)",  op); return m_pc + (2 >> 0);;}
3008ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1e(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1e> (%04x)",  op); return m_pc + (2 >> 0);;}
3009ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1f(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1f> (%04x)",  op); return m_pc + (2 >> 0);;}
3010ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_00(OPS_16)  { arcompact_fatal("<illegal 0x18_07_00> (%04x)",  op); return m_pc + (2 >> 0);;}
3011ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_02(OPS_16)  { arcompact_fatal("<illegal 0x18_07_02> (%04x)", op); return m_pc + (2 >> 0);;}
3012ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_03(OPS_16)  { arcompact_fatal("<illegal 0x18_07_03> (%04x)", op); return m_pc + (2 >> 0);;}
3013ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_04(OPS_16)  { arcompact_fatal("<illegal 0x18_07_04> (%04x)", op); return m_pc + (2 >> 0);;}
3014ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_05(OPS_16)  { arcompact_fatal("<illegal 0x18_07_05> (%04x)", op); return m_pc + (2 >> 0);;}
3015ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_06(OPS_16)  { arcompact_fatal("<illegal 0x18_07_06> (%04x)", op); return m_pc + (2 >> 0);;}
3016ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_07(OPS_16)  { arcompact_fatal("<illegal 0x18_07_07> (%04x)", op); return m_pc + (2 >> 0);;}
3017ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_08(OPS_16)  { arcompact_fatal("<illegal 0x18_07_08> (%04x)", op); return m_pc + (2 >> 0);;}
3018ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_09(OPS_16)  { arcompact_fatal("<illegal 0x18_07_09> (%04x)", op); return m_pc + (2 >> 0);;}
3019ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0a(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0a> (%04x)", op); return m_pc + (2 >> 0);;}
3020ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0b(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0b> (%04x)", op); return m_pc + (2 >> 0);;}
3021ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0c(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0c> (%04x)", op); return m_pc + (2 >> 0);;}
3022ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0d(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0d> (%04x)", op); return m_pc + (2 >> 0);;}
3023ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0e(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0e> (%04x)", op); return m_pc + (2 >> 0);;}
3024ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0f(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0f> (%04x)", op); return m_pc + (2 >> 0);;}
3025ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_10(OPS_16)  { arcompact_fatal("<illegal 0x18_07_10> (%04x)", op); return m_pc + (2 >> 0);;}
3026ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_12(OPS_16)  { arcompact_fatal("<illegal 0x18_07_12> (%04x)",  op); return m_pc + (2 >> 0);;}
3027ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_13(OPS_16)  { arcompact_fatal("<illegal 0x18_07_13> (%04x)",  op); return m_pc + (2 >> 0);;}
3028ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_14(OPS_16)  { arcompact_fatal("<illegal 0x18_07_14> (%04x)",  op); return m_pc + (2 >> 0);;}
3029ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_15(OPS_16)  { arcompact_fatal("<illegal 0x18_07_15> (%04x)",  op); return m_pc + (2 >> 0);;}
3030ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_16(OPS_16)  { arcompact_fatal("<illegal 0x18_07_16> (%04x)",  op); return m_pc + (2 >> 0);;}
3031ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_17(OPS_16)  { arcompact_fatal("<illegal 0x18_07_17> (%04x)",  op); return m_pc + (2 >> 0);;}
3032ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_18(OPS_16)  { arcompact_fatal("<illegal 0x18_07_18> (%04x)",  op); return m_pc + (2 >> 0);;}
3033ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_19(OPS_16)  { arcompact_fatal("<illegal 0x18_07_19> (%04x)",  op); return m_pc + (2 >> 0);;}
3034ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1a(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1a> (%04x)",  op); return m_pc + (2 >> 0);;}
3035ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1b(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1b> (%04x)",  op); return m_pc + (2 >> 0);;}
3036ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1c(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1c> (%04x)",  op); return m_pc + (2 >> 0);;}
3037ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1d(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1d> (%04x)",  op); return m_pc + (2 >> 0);;}
3038ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1e(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1e> (%04x)",  op); return m_pc + (2 >> 0);;}
3039ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1f(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1f> (%04x)",  op); return m_pc + (2 >> 0);;}
3621ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_02(OPS_16)  { arcompact_fatal("<illegal 0x18_05_02> (%04x)", op); return m_pc + (2 >> 0);}
3622ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_03(OPS_16)  { arcompact_fatal("<illegal 0x18_05_03> (%04x)", op); return m_pc + (2 >> 0);}
3623ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_04(OPS_16)  { arcompact_fatal("<illegal 0x18_05_04> (%04x)", op); return m_pc + (2 >> 0);}
3624ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_05(OPS_16)  { arcompact_fatal("<illegal 0x18_05_05> (%04x)", op); return m_pc + (2 >> 0);}
3625ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_06(OPS_16)  { arcompact_fatal("<illegal 0x18_05_06> (%04x)", op); return m_pc + (2 >> 0);}
3626ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_07(OPS_16)  { arcompact_fatal("<illegal 0x18_05_07> (%04x)", op); return m_pc + (2 >> 0);}
3627ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_00(OPS_16)  { arcompact_fatal("<illegal 0x18_06_00> (%04x)",  op); return m_pc + (2 >> 0);}
3628ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_02(OPS_16)  { arcompact_fatal("<illegal 0x18_06_02> (%04x)", op); return m_pc + (2 >> 0);}
3629ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_03(OPS_16)  { arcompact_fatal("<illegal 0x18_06_03> (%04x)", op); return m_pc + (2 >> 0);}
3630ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_04(OPS_16)  { arcompact_fatal("<illegal 0x18_06_04> (%04x)", op); return m_pc + (2 >> 0);}
3631ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_05(OPS_16)  { arcompact_fatal("<illegal 0x18_06_05> (%04x)", op); return m_pc + (2 >> 0);}
3632ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_06(OPS_16)  { arcompact_fatal("<illegal 0x18_06_06> (%04x)", op); return m_pc + (2 >> 0);}
3633ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_07(OPS_16)  { arcompact_fatal("<illegal 0x18_06_07> (%04x)", op); return m_pc + (2 >> 0);}
3634ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_08(OPS_16)  { arcompact_fatal("<illegal 0x18_06_08> (%04x)", op); return m_pc + (2 >> 0);}
3635ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_09(OPS_16)  { arcompact_fatal("<illegal 0x18_06_09> (%04x)", op); return m_pc + (2 >> 0);}
3636ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0a(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0a> (%04x)", op); return m_pc + (2 >> 0);}
3637ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0b(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0b> (%04x)", op); return m_pc + (2 >> 0);}
3638ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0c(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0c> (%04x)", op); return m_pc + (2 >> 0);}
3639ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0d(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0d> (%04x)", op); return m_pc + (2 >> 0);}
3640ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0e(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0e> (%04x)", op); return m_pc + (2 >> 0);}
3641ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0f(OPS_16)  { arcompact_fatal("<illegal 0x18_06_0f> (%04x)", op); return m_pc + (2 >> 0);}
3642ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_10(OPS_16)  { arcompact_fatal("<illegal 0x18_06_10> (%04x)", op); return m_pc + (2 >> 0);}
3643ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_12(OPS_16)  { arcompact_fatal("<illegal 0x18_06_12> (%04x)",  op); return m_pc + (2 >> 0);}
3644ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_13(OPS_16)  { arcompact_fatal("<illegal 0x18_06_13> (%04x)",  op); return m_pc + (2 >> 0);}
3645ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_14(OPS_16)  { arcompact_fatal("<illegal 0x18_06_14> (%04x)",  op); return m_pc + (2 >> 0);}
3646ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_15(OPS_16)  { arcompact_fatal("<illegal 0x18_06_15> (%04x)",  op); return m_pc + (2 >> 0);}
3647ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_16(OPS_16)  { arcompact_fatal("<illegal 0x18_06_16> (%04x)",  op); return m_pc + (2 >> 0);}
3648ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_17(OPS_16)  { arcompact_fatal("<illegal 0x18_06_17> (%04x)",  op); return m_pc + (2 >> 0);}
3649ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_18(OPS_16)  { arcompact_fatal("<illegal 0x18_06_18> (%04x)",  op); return m_pc + (2 >> 0);}
3650ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_19(OPS_16)  { arcompact_fatal("<illegal 0x18_06_19> (%04x)",  op); return m_pc + (2 >> 0);}
3651ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1a(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1a> (%04x)",  op); return m_pc + (2 >> 0);}
3652ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1b(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1b> (%04x)",  op); return m_pc + (2 >> 0);}
3653ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1c(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1c> (%04x)",  op); return m_pc + (2 >> 0);}
3654ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1d(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1d> (%04x)",  op); return m_pc + (2 >> 0);}
3655ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1e(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1e> (%04x)",  op); return m_pc + (2 >> 0);}
3656ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1f(OPS_16)  { arcompact_fatal("<illegal 0x18_06_1f> (%04x)",  op); return m_pc + (2 >> 0);}
3657ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_00(OPS_16)  { arcompact_fatal("<illegal 0x18_07_00> (%04x)",  op); return m_pc + (2 >> 0);}
3658ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_02(OPS_16)  { arcompact_fatal("<illegal 0x18_07_02> (%04x)", op); return m_pc + (2 >> 0);}
3659ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_03(OPS_16)  { arcompact_fatal("<illegal 0x18_07_03> (%04x)", op); return m_pc + (2 >> 0);}
3660ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_04(OPS_16)  { arcompact_fatal("<illegal 0x18_07_04> (%04x)", op); return m_pc + (2 >> 0);}
3661ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_05(OPS_16)  { arcompact_fatal("<illegal 0x18_07_05> (%04x)", op); return m_pc + (2 >> 0);}
3662ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_06(OPS_16)  { arcompact_fatal("<illegal 0x18_07_06> (%04x)", op); return m_pc + (2 >> 0);}
3663ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_07(OPS_16)  { arcompact_fatal("<illegal 0x18_07_07> (%04x)", op); return m_pc + (2 >> 0);}
3664ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_08(OPS_16)  { arcompact_fatal("<illegal 0x18_07_08> (%04x)", op); return m_pc + (2 >> 0);}
3665ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_09(OPS_16)  { arcompact_fatal("<illegal 0x18_07_09> (%04x)", op); return m_pc + (2 >> 0);}
3666ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0a(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0a> (%04x)", op); return m_pc + (2 >> 0);}
3667ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0b(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0b> (%04x)", op); return m_pc + (2 >> 0);}
3668ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0c(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0c> (%04x)", op); return m_pc + (2 >> 0);}
3669ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0d(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0d> (%04x)", op); return m_pc + (2 >> 0);}
3670ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0e(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0e> (%04x)", op); return m_pc + (2 >> 0);}
3671ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0f(OPS_16)  { arcompact_fatal("<illegal 0x18_07_0f> (%04x)", op); return m_pc + (2 >> 0);}
3672ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_10(OPS_16)  { arcompact_fatal("<illegal 0x18_07_10> (%04x)", op); return m_pc + (2 >> 0);}
3673ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_12(OPS_16)  { arcompact_fatal("<illegal 0x18_07_12> (%04x)",  op); return m_pc + (2 >> 0);}
3674ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_13(OPS_16)  { arcompact_fatal("<illegal 0x18_07_13> (%04x)",  op); return m_pc + (2 >> 0);}
3675ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_14(OPS_16)  { arcompact_fatal("<illegal 0x18_07_14> (%04x)",  op); return m_pc + (2 >> 0);}
3676ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_15(OPS_16)  { arcompact_fatal("<illegal 0x18_07_15> (%04x)",  op); return m_pc + (2 >> 0);}
3677ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_16(OPS_16)  { arcompact_fatal("<illegal 0x18_07_16> (%04x)",  op); return m_pc + (2 >> 0);}
3678ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_17(OPS_16)  { arcompact_fatal("<illegal 0x18_07_17> (%04x)",  op); return m_pc + (2 >> 0);}
3679ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_18(OPS_16)  { arcompact_fatal("<illegal 0x18_07_18> (%04x)",  op); return m_pc + (2 >> 0);}
3680ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_19(OPS_16)  { arcompact_fatal("<illegal 0x18_07_19> (%04x)",  op); return m_pc + (2 >> 0);}
3681ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1a(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1a> (%04x)",  op); return m_pc + (2 >> 0);}
3682ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1b(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1b> (%04x)",  op); return m_pc + (2 >> 0);}
3683ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1c(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1c> (%04x)",  op); return m_pc + (2 >> 0);}
3684ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1d(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1d> (%04x)",  op); return m_pc + (2 >> 0);}
3685ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1e(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1e> (%04x)",  op); return m_pc + (2 >> 0);}
3686ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1f(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1f> (%04x)",  op); return m_pc + (2 >> 0);}
30403687
30413688
30423689
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242544r242545
209209
210210   if ((breg != LIMM_REG) && (creg != LIMM_REG))
211211   {
212      print("%s%s %s, %s %08x (%08x)", optext, delaybit[n], regnames[breg], regnames[creg], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
212      print("%s%s %s, %s to 0x%08x", optext, delaybit[n], regnames[breg], regnames[creg], PC_ALIGNED32 + (address * 2) );
213213   }
214214   else
215215   {
r242544r242545
219219
220220      if ((breg == LIMM_REG) && (creg != LIMM_REG))
221221      {
222         print("%s%s (%08x) %s %08x (%08x)", optext, delaybit[n], limm, regnames[creg], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
222         print("%s%s 0x%08x, %s to 0x%08x", optext, delaybit[n], limm, regnames[creg], PC_ALIGNED32 + (address * 2) );
223223      }
224224      else if ((creg == LIMM_REG) && (breg != LIMM_REG))
225225      {
226         print("%s%s %s, (%08x) %08x (%08x)", optext, delaybit[n], regnames[breg], limm, PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
226         print("%s%s %s, 0x%08x to 0x%08x", optext, delaybit[n], regnames[breg], limm, PC_ALIGNED32 + (address * 2) );
227227      }
228228      else
229229      {
230230         // b and c are LIMM? invalid??
231         print("%s%s (%08x), (%08x) (illegal?) %08x (%08x)", optext, delaybit[n], limm, limm, PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
231         print("%s%s 0x%08x, 0x%08x (illegal?) to 0x%08x", optext, delaybit[n], limm, limm, PC_ALIGNED32 + (address * 2) );
232232
233233      }
234234   }
r242544r242545
404404   //   output  += sprintf( output, " p(%d)", p);
405405
406406
407   if (!b_reserved)
407   if ((!b_reserved) && (breg == LIMM_REG))
408408   {
409      if (breg == LIMM_REG)
410      {
411         GET_LIMM_32;
412         size = 8;
413         got_limm = 1;
414         output += sprintf(output, " 0x%08x ", limm);
415
416      }
417      else
418      {
419         output += sprintf(output, " %s, ", regnames[breg]);
420      }
409      GET_LIMM_32;
410      size = 8;
411      got_limm = 1;
421412   }
422   else
423   {
424      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
425   }
426413
427414   if (creg == LIMM_REG)
428415   {
r242544r242545
431418         GET_LIMM_32;
432419         size = 8;
433420      }
421   }
434422
435      output += sprintf(output, " 0x%08x ", limm);
436      if (ignore_dst == 0)
437      {
438         if (areg != LIMM_REG) output += sprintf(output, "DST(%s)", regnames[areg]);
439         else output += sprintf(output, "<no dst>");
440      }
423   // areg can be LIMM too, but in that case LIMM indicates 'no destination' rather than an actual LIMM value following
424
425   if (ignore_dst == 0)
426   {
427      if (areg != LIMM_REG)  output += sprintf(output, " %s <-", regnames[areg]);
428      else output += sprintf(output, " <no dst> <-");
429   }
430   else if (ignore_dst == 1) // certain opcode types ignore the 'a' field entirely, it should be set to 0.
431   {
432       if (areg) output += sprintf(output, " <reserved %d> <-", areg);
433   }
434   else if (ignore_dst == 2) // for multiply operations areg should always be set to LIMM
435   {
436      if (areg != LIMM_REG) output += sprintf(output, " <invalid %d> <-", areg);
437      else  output += sprintf(output, " <mulres> <-");
438   }
439
440   if (!b_reserved)
441   {
442      if (breg == LIMM_REG)
443         output += sprintf(output, " 0x%08x,", limm);
441444      else
442      {
443         if (ignore_dst == 1) { if (areg) output += sprintf(output, "unused(%s)", regnames[areg]); }
444         else
445         {
446            if (areg != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[areg]);
447            else  output += sprintf(output, "<mulres>");
448         } // mul operations expect A to be set to LIMM (no output)
449      }
445         output += sprintf(output, " %s,", regnames[breg]);
450446   }
451447   else
452448   {
453      output += sprintf(output, "C(%s) ", regnames[creg]);
454      if (ignore_dst == 0)
455      {
456         if (areg != LIMM_REG)  output += sprintf(output, "DST(%s)", regnames[areg]);
457         else output += sprintf(output, "<no dst>");
458      }
459      else
460      {
461         if (ignore_dst == 1) { if (areg) output += sprintf(output, "unused(%s)", regnames[areg]); }
462         else
463         {
464            if (areg != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[areg]);
465            else  output += sprintf(output, "<mulres>");
466         } // mul operations expect A to be set to LIMM (no output)
467      }
468
449      if (breg) output += sprintf(output, "<reserved %d>,", breg);
469450   }
451
452   if (creg == LIMM_REG)
453      output += sprintf(output, " 0x%08x", limm);
454   else
455      output += sprintf(output, " %s", regnames[creg]);
456
470457   return size;
471458}
472459
r242544r242545
13851372
13861373
13871374
1388int arcompact_handle0c_helper_dasm(DASM_OPS_16, const char* optext)
1375int arcompact_handle0c_helper_dasm(DASM_OPS_16, const char* optext, int format)
13891376{
13901377   int areg, breg, creg;
13911378
r242544r242545
13981385   REG_16BIT_RANGE(creg);
13991386
14001387
1401   print("%s %s <- [%s, %s]", optext, regnames[areg], regnames[breg], regnames[creg]);
1388   if (format==0) print("%s %s <- [%s, %s]", optext, regnames[areg], regnames[breg], regnames[creg]);
1389   else print("%s %s <- %s, %s", optext, regnames[areg], regnames[breg], regnames[creg]);
1390
14021391   return 2;
14031392}
14041393
14051394
14061395int arcompact_handle0c_00_dasm(DASM_OPS_16)
14071396{
1408   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LD_S");
1397   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LD_S", 0);
14091398}
14101399
14111400int arcompact_handle0c_01_dasm(DASM_OPS_16)
14121401{
1413   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDB_S");
1402   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDB_S", 0);
14141403}
14151404
14161405int arcompact_handle0c_02_dasm(DASM_OPS_16)
14171406{
1418   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDW_S");
1407   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDW_S", 0);
14191408}
14201409
14211410int arcompact_handle0c_03_dasm(DASM_OPS_16)
14221411{
1423   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "ADD_S");
1412   return arcompact_handle0c_helper_dasm(DASM_PARAMS, "ADD_S", 1);
14241413}
14251414
14261415
r242544r242545
17721761// op bits remaining for 0x18_05_xx subgroups 0x001f
17731762int arcompact_handle18_05_00_dasm(DASM_OPS_16)
17741763{
1775   int u = op & 0x001f;
1776   op &= ~0x001f; // all bits now used
1764   int u;
1765   COMMON16_GET_u5;
17771766
1778   print("ADD_S SP, SP, %02x", u*4);
1767   print("ADD_S SP, SP, 0x%02x", u*4);
17791768   return 2;
17801769
17811770}
17821771
17831772int arcompact_handle18_05_01_dasm(DASM_OPS_16)
17841773{
1785   int u = op & 0x001f;
1786   op &= ~0x001f; // all bits now used
1774   int u;
1775   COMMON16_GET_u5;
17871776
1788   print("SUB_S SP, SP, %02x", u*4);
1777   print("SUB_S SP, SP, 0x%02x", u*4);
17891778   return 2;
17901779}
17911780
r242544r242545
18871876   COMMON16_GET_u8;
18881877   REG_16BIT_RANGE(breg);
18891878
1890   print("MOV_S %s, %02x", regnames[breg], u);
1879   print("MOV_S %s <- 0x%02x", regnames[breg], u);
18911880   return 2;
18921881}
18931882
r242544r242545
18981887   COMMON16_GET_u7;
18991888   REG_16BIT_RANGE(breg);
19001889
1901   print("ADD_S %s, %02x", regnames[breg], u);
1890   print("ADD_S %s <- %s, %02x", regnames[breg], regnames[breg], u);
19021891   return 2;
19031892}
19041893
r242544r242545
19221911   int s = (op & 0x007f) >> 0;   op &= ~0x007f;
19231912   if (s & 0x40) s = -0x40 + (s & 0x3f);
19241913
1925   print("%s %s %08x", optext, regnames[breg], PC_ALIGNED32 + s*2);
1914   print("%s %s, 0 to 0x%08x", optext, regnames[breg], PC_ALIGNED32 + s*2);
19261915   return 2;
19271916}
19281917
r242544r242545
19421931
19431932
19441933
1945int arcompact_handle1e_00_dasm(DASM_OPS_16)  { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "BL_S");  }
1934int arcompact_handle1e_00_dasm(DASM_OPS_16)  { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "B_S");  }
19461935int arcompact_handle1e_01_dasm(DASM_OPS_16)  { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "BEQ_S"); }
19471936int arcompact_handle1e_02_dasm(DASM_OPS_16)  { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "BNE_S"); }
19481937
trunk/src/emu/cpu/tms0980/tms0980.c
r242544r242545
161161// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions plus optional separate lines for custom opcode handling
162162// - 48-term output PLA above the RAM (rotate opla 90 degrees)
163163const device_type TMS0270 = &device_creator<tms0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O)
164// newer TMS0270 chips (eg. Speak & Math) have 42 pins
164165// TMS0260 is similar? except opla is 32 instead of 48 terms
165166
166167
trunk/src/emu/cpu/z80/z80daisy.c
r242544r242545
1919//-------------------------------------------------
2020
2121device_z80daisy_interface::device_z80daisy_interface(const machine_config &mconfig, device_t &device)
22   : device_interface(device)
22   : device_interface(device, "z80daisy")
2323{
2424}
2525
trunk/src/emu/device.c
r242544r242545
841841//  device_interface - constructor
842842//-------------------------------------------------
843843
844device_interface::device_interface(device_t &device)
844device_interface::device_interface(device_t &device, const char *type)
845845   : m_interface_next(NULL),
846      m_device(device)
846      m_device(device),
847      m_type(type)
847848{
848849   device_interface **tailptr;
849850   for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) ;
trunk/src/emu/device.h
r242544r242545
132132   astring default_bios_tag() const { return m_default_bios_tag; }
133133
134134   // interface helpers
135   device_interface *first_interface() const { return m_interface_list; }
135136   template<class _DeviceClass> bool interface(_DeviceClass *&intf) { intf = dynamic_cast<_DeviceClass *>(this); return (intf != NULL); }
136137   template<class _DeviceClass> bool interface(_DeviceClass *&intf) const { intf = dynamic_cast<const _DeviceClass *>(this); return (intf != NULL); }
137138
r242544r242545
297298
298299protected:
299300   // construction/destruction
300   device_interface(device_t &device);
301   device_interface(device_t &device, const char *type);
301302   virtual ~device_interface();
302303
303304public:
305   const char *interface_type() const { return m_type; }
306
304307   // casting helpers
305308   device_t &device() { return m_device; }
306309   const device_t &device() const { return m_device; }
r242544r242545
333336   // internal state
334337   device_interface *      m_interface_next;
335338   device_t &              m_device;
339   const char *            m_type;
336340};
337341
338342
trunk/src/emu/didisasm.c
r242544r242545
2020//-------------------------------------------------
2121
2222device_disasm_interface::device_disasm_interface(const machine_config &mconfig, device_t &device)
23   : device_interface(device)
23   : device_interface(device, "disasm")
2424{
2525}
2626
trunk/src/emu/diexec.c
r242544r242545
4242//-------------------------------------------------
4343
4444device_execute_interface::device_execute_interface(const machine_config &mconfig, device_t &device)
45   : device_interface(device),
45   : device_interface(device, "execute"),
4646      m_disabled(false),
4747      m_vblank_interrupt_screen(NULL),
4848      m_timed_interrupt_period(attotime::zero),
trunk/src/emu/digfx.c
r242544r242545
2020
2121device_gfx_interface::device_gfx_interface(const machine_config &mconfig, device_t &device,
2222                              const gfx_decode_entry *gfxinfo, const char *palette_tag)
23   : device_interface(device),
23   : device_interface(device, "gfx"),
2424   m_gfxdecodeinfo(gfxinfo),
2525   m_palette_tag(palette_tag),
2626   m_palette_is_sibling(palette_tag == NULL),
trunk/src/emu/diimage.c
r242544r242545
5353//-------------------------------------------------
5454
5555device_image_interface::device_image_interface(const machine_config &mconfig, device_t &device)
56   : device_interface(device),
56   : device_interface(device, "image"),
5757      m_file(NULL),
5858      m_mame_file(NULL),
5959      m_software_info_ptr(NULL),
trunk/src/emu/dimemory.c
r242544r242545
115115//-------------------------------------------------
116116
117117device_memory_interface::device_memory_interface(const machine_config &mconfig, device_t &device)
118   : device_interface(device)
118   : device_interface(device, "memory")
119119{
120120   memset(m_address_map, 0, sizeof(m_address_map));
121121   memset(m_addrspace, 0, sizeof(m_addrspace));
trunk/src/emu/dinetwork.c
r242544r242545
22#include "osdnet.h"
33
44device_network_interface::device_network_interface(const machine_config &mconfig, device_t &device, float bandwidth)
5   : device_interface(device)
5   : device_interface(device, "network")
66{
77   m_promisc = false;
88   m_bandwidth = bandwidth;
trunk/src/emu/dinvram.c
r242544r242545
2121//-------------------------------------------------
2222
2323device_nvram_interface::device_nvram_interface(const machine_config &mconfig, device_t &device)
24   : device_interface(device)
24   : device_interface(device, "nvram")
2525{
2626}
2727
trunk/src/emu/dioutput.c
r242544r242545
2121//-------------------------------------------------
2222
2323device_output_interface::device_output_interface(const machine_config &mconfig, device_t &device) :
24   device_interface(device),
24   device_interface(device, "output"),
2525   m_output_index(0),
2626   m_output_name(NULL)
2727{
trunk/src/emu/dirtc.c
r242544r242545
2929//-------------------------------------------------
3030
3131device_rtc_interface::device_rtc_interface(const machine_config &mconfig, device_t &device)
32   : device_interface(device)
32   : device_interface(device, "rtc")
3333{
3434}
3535
trunk/src/emu/diserial.c
r242544r242545
88#include "emu.h"
99
1010device_serial_interface::device_serial_interface(const machine_config &mconfig, device_t &device)
11   : device_interface(device),
11   : device_interface(device, "serial"),
1212   m_start_bit_hack_for_external_clocks(false),
1313   m_df_start_bit_count(0),
1414   m_df_word_length(0),
trunk/src/emu/dislot.c
r242544r242545
1010#include "emuopts.h"
1111
1212device_slot_interface::device_slot_interface(const machine_config &mconfig, device_t &device)
13   : device_interface(device),
13   : device_interface(device, "slot"),
1414   m_default_option(NULL),
1515   m_fixed(false)
1616{
r242544r242545
8181
8282
8383device_slot_card_interface::device_slot_card_interface(const machine_config &mconfig, device_t &device)
84   : device_interface(device)
84   : device_interface(device, "slot")
8585{
8686}
8787
trunk/src/emu/disound.c
r242544r242545
2121//-------------------------------------------------
2222
2323device_sound_interface::device_sound_interface(const machine_config &mconfig, device_t &device)
24   : device_interface(device),
24   : device_interface(device, "sound"),
2525      m_outputs(0),
2626      m_auto_allocated_inputs(0)
2727{
trunk/src/emu/distate.c
r242544r242545
390390//-------------------------------------------------
391391
392392device_state_interface::device_state_interface(const machine_config &mconfig, device_t &device)
393   : device_interface(device)
393   : device_interface(device, "state")
394394{
395395   memset(m_fast_state, 0, sizeof(m_fast_state));
396396
trunk/src/emu/divideo.c
r242544r242545
2424//-------------------------------------------------
2525
2626device_video_interface::device_video_interface(const machine_config &mconfig, device_t &device, bool screen_required)
27   : device_interface(device),
27   : device_interface(device, "video"),
2828      m_screen_required(screen_required),
2929      m_screen_tag(s_unconfigured_screen_tag),
3030      m_screen(NULL)
trunk/src/emu/machine/am9517a.c
r242544r242545
523523   save_item(NAME(m_status));
524524   save_item(NAME(m_temp));
525525   save_item(NAME(m_request));
526   
527   for (int i = 0; i < 4; i++)
528   {
529      save_item(NAME(m_channel[i].m_address), i);
530      save_item(NAME(m_channel[i].m_count), i);
531      save_item(NAME(m_channel[i].m_base_address), i);
532      save_item(NAME(m_channel[i].m_base_count), i);
533      save_item(NAME(m_channel[i].m_mode), i);
534   }
526535}
527536
528537
trunk/src/emu/sound/mos7360.c
r242544r242545
343343   save_item(NAME(m_cursor1));
344344   save_item(NAME(m_chargenaddr));
345345   save_item(NAME(m_bitmapaddr));
346   save_item(NAME(m_videoaddr));
346347   save_item(NAME(m_x_begin));
347348   save_item(NAME(m_x_end));
348349   save_item(NAME(m_y_begin));
trunk/src/emu/video/315_5124.c
r242544r242545
190190
191191
192192sega315_5378_device::sega315_5378_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
193   : sega315_5124_device( mconfig, SEGA315_5378, "Sega 315-5378", tag, owner, clock, SEGA315_5378_CRAM_SIZE, 0x10, true, "sega315_5378", __FILE__, X_SCROLL_HPOS_5378)
193   : sega315_5124_device( mconfig, SEGA315_5378, "Sega 315-5378 VDP", tag, owner, clock, SEGA315_5378_CRAM_SIZE, 0x10, true, "sega315_5378", __FILE__, X_SCROLL_HPOS_5378)
194194{
195195}
196196
trunk/src/emu/video/315_5313.c
r242544r242545
1313const device_type SEGA315_5313 = &device_creator<sega315_5313_device>;
1414
1515sega315_5313_device::sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
16   : sega315_5124_device( mconfig, SEGA315_5246, "Sega 315-5313 (Genesis VDP)", tag, owner, clock, SEGA315_5124_CRAM_SIZE, 0, true, "sega315_5313", __FILE__),
16   : sega315_5124_device( mconfig, SEGA315_5313, "Sega 315-5313 Megadrive VDP", tag, owner, clock, SEGA315_5124_CRAM_SIZE, 0, true, "sega315_5313", __FILE__),
1717   m_sndirqline_callback(*this),
1818   m_lv6irqline_callback(*this),
1919   m_lv4irqline_callback(*this),
trunk/src/mame/includes/galaxold.h
r242544r242545
2727public:
2828   galaxold_state(const machine_config &mconfig, device_type type, const char *tag)
2929      : driver_device(mconfig, type, tag),
30         m_maincpu(*this, "maincpu"),
31         m_audiocpu(*this, "audiocpu"),
32         m_7474_9m_1(*this, "7474_9m_1"),
33         m_7474_9m_2(*this, "7474_9m_2"),
34         m_gfxdecode(*this, "gfxdecode"),
35         m_screen(*this, "screen"),
36         m_palette(*this, "palette"),
3037         m_videoram(*this,"videoram"),
3138         m_spriteram(*this,"spriteram"),
3239         m_spriteram2(*this,"spriteram2"),
3340         m_attributesram(*this,"attributesram"),
3441         m_bulletsram(*this,"bulletsram"),
3542         m_rockclim_videoram(*this,"rockclim_vram"),
36         m_racknrol_tiles_bank(*this,"racknrol_tbank"),
37         m_maincpu(*this, "maincpu"),
38         m_audiocpu(*this, "audiocpu"),
39         m_7474_9m_1(*this, "7474_9m_1"),
40         m_7474_9m_2(*this, "7474_9m_2"),
41         m_gfxdecode(*this, "gfxdecode"),
42         m_screen(*this, "screen"),
43         m_palette(*this, "palette")
43         m_racknrol_tiles_bank(*this,"racknrol_tbank")
4444   {
4545   }
4646
47   /* devices */
48   required_device<cpu_device> m_maincpu;
49   optional_device<cpu_device> m_audiocpu;
50   optional_device<ttl7474_device> m_7474_9m_1;
51   optional_device<ttl7474_device> m_7474_9m_2;
52   required_device<gfxdecode_device> m_gfxdecode;
53   required_device<screen_device> m_screen;
54   required_device<palette_device> m_palette;
55   
56   /* memory pointers */
4757   required_shared_ptr<UINT8> m_videoram;
4858   required_shared_ptr<UINT8> m_spriteram;
4959   optional_shared_ptr<UINT8> m_spriteram2;
r242544r242545
6474   UINT8 m_color_mask;
6575   tilemap_t *m_dambustr_tilemap2;
6676   UINT8 *m_dambustr_videoram2;
77   
6778   void (galaxold_state::*m_modify_charcode)(UINT16 *code, UINT8 x);     /* function to call to do character banking */
6879   void (galaxold_state::*m_modify_spritecode)(UINT8 *spriteram, int*, int*, int*, int); /* function to call to do sprite banking */
6980   void (galaxold_state::*m_modify_color)(UINT8 *color);   /* function to call to do modify how the color codes map to the PROM */
r242544r242545
132143   DECLARE_WRITE8_MEMBER(rockclim_videoram_w);
133144   DECLARE_WRITE8_MEMBER(rockclim_scroll_w);
134145   DECLARE_WRITE8_MEMBER(guttang_rombank_w);
135
136
137
138146   DECLARE_READ8_MEMBER(rockclim_videoram_r);
139147   DECLARE_WRITE8_MEMBER(dambustr_bg_split_line_w);
140148   DECLARE_WRITE8_MEMBER(dambustr_bg_color_w);
149   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback);
150   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback);   
151   
141152   DECLARE_CUSTOM_INPUT_MEMBER(_4in1_fake_port_r);
142153   DECLARE_CUSTOM_INPUT_MEMBER(vpool_lives_r);
143154   DECLARE_CUSTOM_INPUT_MEMBER(ckongg_coinage_r);
144155   DECLARE_CUSTOM_INPUT_MEMBER(dkongjrm_coinage_r);
156   
145157   DECLARE_DRIVER_INIT(bullsdrtg);
146158   DECLARE_DRIVER_INIT(ladybugg);
147159   DECLARE_DRIVER_INIT(4in1);
148160   DECLARE_DRIVER_INIT(guttangt);
149161   DECLARE_DRIVER_INIT(ckonggx);
162   
150163   TILE_GET_INFO_MEMBER(drivfrcg_get_tile_info);
151164   TILE_GET_INFO_MEMBER(racknrol_get_tile_info);
152165   TILE_GET_INFO_MEMBER(dambustr_get_tile_info2);
153166   TILE_GET_INFO_MEMBER(get_tile_info);
154167   TILE_GET_INFO_MEMBER(rockclim_get_tile_info);
155168   TILE_GET_INFO_MEMBER(harem_get_tile_info);
169   
156170   DECLARE_MACHINE_RESET(galaxold);
171   DECLARE_MACHINE_RESET(devilfsg);
172   DECLARE_MACHINE_RESET(hunchbkg);
173   
174   DECLARE_PALETTE_INIT(galaxold);
175   DECLARE_PALETTE_INIT(rockclim);
176   DECLARE_PALETTE_INIT(scrambold);
177   DECLARE_PALETTE_INIT(stratgyx);
178   DECLARE_PALETTE_INIT(darkplnt);
179   DECLARE_PALETTE_INIT(minefld);
180   DECLARE_PALETTE_INIT(rescue);
181   DECLARE_PALETTE_INIT(mariner);
182   DECLARE_PALETTE_INIT(dambustr);
183   DECLARE_PALETTE_INIT(turtles);
184   
157185   DECLARE_VIDEO_START(galaxold);
158   DECLARE_PALETTE_INIT(galaxold);
159186   DECLARE_VIDEO_START(drivfrcg);
160   DECLARE_PALETTE_INIT(rockclim);
161187   DECLARE_VIDEO_START(racknrol);
162188   DECLARE_VIDEO_START(batman2);
163189   DECLARE_VIDEO_START(mooncrst);
164190   DECLARE_VIDEO_START(scrambold);
165   DECLARE_PALETTE_INIT(scrambold);
166191   DECLARE_VIDEO_START(pisces);
167   DECLARE_MACHINE_RESET(devilfsg);
168192   DECLARE_VIDEO_START(dkongjrm);
169193   DECLARE_VIDEO_START(rockclim);
170194   DECLARE_VIDEO_START(galaxold_plain);
171195   DECLARE_VIDEO_START(ozon1);
172196   DECLARE_VIDEO_START(bongo);
173   DECLARE_MACHINE_RESET(hunchbkg);
174197   DECLARE_VIDEO_START(ckongs);
175   DECLARE_PALETTE_INIT(stratgyx);
176   DECLARE_PALETTE_INIT(darkplnt);
177   DECLARE_PALETTE_INIT(minefld);
178   DECLARE_PALETTE_INIT(rescue);
179   DECLARE_PALETTE_INIT(mariner);
180   DECLARE_PALETTE_INIT(dambustr);
181   DECLARE_PALETTE_INIT(turtles);
182198   DECLARE_VIDEO_START(darkplnt);
183199   DECLARE_VIDEO_START(rescue);
184200   DECLARE_VIDEO_START(minefld);
r242544r242545
189205   DECLARE_VIDEO_START(ad2083);
190206   DECLARE_VIDEO_START(dambustr);
191207   DECLARE_VIDEO_START(harem);
208   DECLARE_VIDEO_START(bagmanmc);
209   
192210   UINT32 screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
193211   UINT32 screen_update_dambustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
212   
194213   INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt);
195214   TIMER_CALLBACK_MEMBER(stars_blink_callback);
196215   TIMER_CALLBACK_MEMBER(stars_scroll_callback);
197216   TIMER_DEVICE_CALLBACK_MEMBER(galaxold_interrupt_timer);
198   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback);
199   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback);
200   DECLARE_VIDEO_START(bagmanmc);
201217   IRQ_CALLBACK_MEMBER(hunchbkg_irq_callback);
218   
202219   void state_save_register();
203220   void video_start_common();
204221   void pisces_modify_spritecode(UINT8 *spriteram, int *code, int *flipx, int *flipy, int offs);
r242544r242545
247264   void bagmanmc_modify_charcode(UINT16 *code, UINT8 x);
248265   void bagmanmc_modify_spritecode(UINT8 *spriteram, int *code, int *flipx, int *flipy, int offs);
249266   void machine_reset_common(int line);
250   required_device<cpu_device> m_maincpu;
251   optional_device<cpu_device> m_audiocpu;
252   optional_device<ttl7474_device> m_7474_9m_1;
253   optional_device<ttl7474_device> m_7474_9m_2;
254   required_device<gfxdecode_device> m_gfxdecode;
255   required_device<screen_device> m_screen;
256   required_device<palette_device> m_palette;
257267};
258268
259269#define galaxold_coin_counter_0_w galaxold_coin_counter_w
trunk/src/mame/machine/315_5296.c
r242544r242545
3030//-------------------------------------------------
3131
3232sega_315_5296_device::sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
33   : device_t(mconfig, SEGA_315_5296, "Sega 315-5296", tag, owner, clock, "315-5296", __FILE__),
33   : device_t(mconfig, SEGA_315_5296, "Sega 315-5296 I/O", tag, owner, clock, "315-5296", __FILE__),
3434   m_in_pa_cb(*this),
3535   m_in_pb_cb(*this),
3636   m_in_pc_cb(*this),
trunk/src/mame/video/galaxold.c
r242544r242545
387387   save_item(NAME(m_stars_on));
388388   save_item(NAME(m_stars_scrollpos));
389389   save_item(NAME(m_stars_blink_state));
390   save_item(NAME(m_timer_adjusted));
390391
391392   save_item(NAME(m_darkplnt_bullet_color));
392393
trunk/src/mess/drivers/excali64.c
r242544r242545
2020ToDo:
2121- Colours are approximate.
2222- Disk controller, works with old wd17xx but crashes on new wd.
23- Hardware supports 8 and 5.25 inch floppies, but we only support 5.25 as this
23- Hardware supports 20cm and 13cm floppies, but we only support 13cm as this
2424  is the only software that exists.
2525- The schematic shows the audio counter connected to 2MHz, but this produces
2626  sounds that are too high. Connected to 1MHz for now.
2727- Serial
28- Parallel / Centronics
29- Need more software
3028- Pasting can sometimes drop a character.
3129
3230****************************************************************************/
r242544r242545
4240//#include "machine/clock.h"
4341#include "machine/pit8253.h"
4442#include "machine/i8255.h"
45//#include "bus/centronics/ctronics.h"
43#include "bus/centronics/ctronics.h"
4644#include "imagedev/cassette.h"
4745#include "sound/wave.h"
4846#include "sound/speaker.h"
r242544r242545
7068      , m_io_keyboard(*this, "KEY")
7169      , m_dma(*this, "dma")
7270      , m_u12(*this, "u12")
71      , m_centronics(*this, "centronics")
7372      , m_fdc(*this, "fdc")
7473#if NEWFDC
7574      , m_floppy0(*this, "fdc:0")
r242544r242545
9089#if NEWFDC
9190   DECLARE_FLOPPY_FORMATS(floppy_formats);
9291#endif
92   DECLARE_WRITE_LINE_MEMBER(cent_busy_w);
9393   DECLARE_WRITE_LINE_MEMBER(busreq_w);
9494   DECLARE_READ8_MEMBER(memory_read_byte);
9595   DECLARE_WRITE8_MEMBER(memory_write_byte);
r242544r242545
111111   bool m_crtc_vs;
112112   bool m_crtc_hs;
113113   bool m_motor;
114   bool m_centronics_busy;
114115   required_device<cpu_device> m_maincpu;
115116   required_device<cassette_image_device> m_cass;
116117   required_device<mc6845_device> m_crtc;
117118   required_ioport_array<8> m_io_keyboard;
118119   required_device<z80dma_device> m_dma;
119120   required_device<ttl74123_device> m_u12;
121   required_device<centronics_device> m_centronics;
120122#if NEWFDC
121123   required_device<wd2793_t> m_fdc;
122124   required_device<floppy_connector> m_floppy0;
r242544r242545
239241   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 &") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
240242INPUT_PORTS_END
241243
244WRITE_LINE_MEMBER( excali64_state::cent_busy_w )
245{
246   m_centronics_busy = state;
247}
248
242249#if NEWFDC
243250FLOPPY_FORMATS_MEMBER( excali64_state::floppy_formats )
244251   FLOPPY_EXCALI64_FORMAT
r242544r242545
270277{
271278   m_motor = BIT(data, 0);
272279#if NEWFDC
280   m_floppy1->get_device()->mon_w(!m_motor);
273281   m_floppy0->get_device()->mon_w(!m_motor);
274282#else
275   //const char *floppy_tags[4] = { FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3 };
276283   legacy_floppy_image_device *flop = subdevice<legacy_floppy_image_device>(FLOPPY_0);
277284   flop->floppy_mon_w(!m_motor); // motor on
278   //flop->floppy_drive_set_ready_state(1, 0); // this is commented out in flopdrv.c, so does nothing
285   flop = subdevice<legacy_floppy_image_device>(FLOPPY_1);
286   flop->floppy_mon_w(!m_motor); // motor on
279287#endif
280288}
281289
r242544r242545
288296{
289297#if NEWFDC
290298   floppy_image_device *floppy = NULL;
291   if (BIT(data, 0)) floppy = m_floppy0->get_device();
292   //if (BIT(data, 1)) floppy = m_floppy1->get_device();
293   m_fdc->set_floppy(floppy);
299   if (BIT(data, 0))
300      floppy = m_floppy0->get_device();
301
302   if (BIT(data, 1))
303      floppy = m_floppy1->get_device();
304
294305   if (floppy)
306   {
307      m_fdc->set_floppy(floppy);
295308      floppy->ss_w(BIT(data, 4));
309   }
296310#else
297   //UINT8 i;
298   //for (i = 0; i < 4; i++)
299   //{
300   //   if BIT(data, i)
301   //   {
302   //      m_fdc->set_drive(i);
303   //      break;
304   //   }
305   //}
306   if BIT(data, 0) m_fdc->set_drive(0);
307   //if BIT(data, 1) m_fdc->set_drive(1);
308   //if BIT(data, 2) m_fdc->set_drive(2);
309   //if BIT(data, 3) m_fdc->set_drive(3);
311   if BIT(data, 0)
312      m_fdc->set_drive(0);
313
314   if BIT(data, 1)
315      m_fdc->set_drive(1);
316
310317   m_fdc->set_side(BIT(data, 4));
318#endif
311319
312   m_fdc->dden_w(1);//!BIT(data, 6)); // we want double density
313#endif
314   m_u12->b_w(space,offset, BIT(data, 5));
320   m_u12->b_w(space,offset, BIT(data, 5)); // motor pulse
315321}
316322
323/*
324d0 = precomp (selectable by jumper)
325d1 = size select (we only support 13cm)
326d2 = density select (0 = double)
327*/
317328WRITE8_MEMBER( excali64_state::portec_w )
318329{
330#if NEWFDC
331   m_fdc->dden_w(BIT(data, 2));
332#else
333   m_fdc->dden_w(!BIT(data, 2));
334#endif
319335}
320336
321337WRITE_LINE_MEMBER( excali64_state::busreq_w )
322338{
323339// since our Z80 has no support for BUSACK, we assume it is granted immediately
324340   m_maincpu->set_input_line(Z80_INPUT_LINE_BUSRQ, state);
325   //m_maincpu->set_input_line(INPUT_LINE_HALT, state); // do we need this?
326341   m_dma->bai_w(state); // tell dma that bus has been granted
327342}
328343
r242544r242545
357372
358373READ8_MEMBER( excali64_state::ppic_r )
359374{
360   UINT8 data = 0xf7;
375   UINT8 data = 0xf4; // READY line must be low to print
376   data |= (UINT8)m_centronics_busy;
361377   data |= (m_cass->input() > 0.1) << 3;
362378   return data;
363379}
r242544r242545
365381WRITE8_MEMBER( excali64_state::ppic_w )
366382{
367383   m_cass->output(BIT(data, 7) ? -1.0 : +1.0);
384   m_centronics->write_strobe(BIT(data, 4));
368385}
369386
370387READ8_MEMBER( excali64_state::port00_r )
r242544r242545
521538   membank("bankr4")->configure_entry(2, &m_p_hiresram[0x0000]);
522539   membank("bankw4")->configure_entry(2, &m_p_hiresram[0x0000]);
523540
524   // Set up foreground palettes
541   // Set up foreground colours
525542   UINT8 r,g,b,i,code;
526543   for (i = 0; i < 32; i++)
527544   {
r242544r242545
599616   MCFG_DEVICE_ADD("pit", PIT8253, 0)
600617   MCFG_PIT8253_CLK0(XTAL_16MHz / 16) /* Timer 0: tone gen for speaker */
601618   MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("speaker", speaker_sound_device, level_w))
602   MCFG_PIT8253_CLK1(XTAL_16MHz / 8) /* Timer 1: baud rate gen for 8251 */
619   //MCFG_PIT8253_CLK1(XTAL_16MHz / 16) /* Timer 1: baud rate gen for 8251 */
603620   //MCFG_PIT8253_OUT1_HANDLER(WRITELINE(excali64_state, write_uart_clock))
604   //MCFG_PIT8253_CLK2(XTAL_16MHz / 8) /* Timer 2: not used */
621   //MCFG_PIT8253_CLK2(XTAL_16MHz / 16) /* Timer 2: not used */
605622
606623   MCFG_DEVICE_ADD("ppi", I8255A, 0 )
607   //MCFG_I8255_IN_PORTA_CB(READ8(excali64_state, ppia_r))
608   //MCFG_I8255_OUT_PORTA_CB(WRITE8(excali64_state, ppia_w)) // parallel port
609   //MCFG_I8255_IN_PORTB_CB(READ8(excali64_state, ppib_r))
624   MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("cent_data_out", output_latch_device, write)) // parallel port
610625   MCFG_I8255_OUT_PORTB_CB(WRITE8(excali64_state, ppib_w))
611626   MCFG_I8255_IN_PORTC_CB(READ8(excali64_state, ppic_r))
612627   MCFG_I8255_OUT_PORTC_CB(WRITE8(excali64_state, ppic_w))
613628
614   //MCFG_DEVICE_ADD("acia_clock", CLOCK, 153600)
615   //MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(excali64_state, write_acia_clock))
616
617629   /* sound hardware */
618630   MCFG_SPEAKER_STANDARD_MONO("mono")
619631   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
r242544r242545
645657   MCFG_WD_FDC_FORCE_READY
646658   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w))
647659   MCFG_FLOPPY_DRIVE_ADD("fdc:0", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats)// excali64_state::floppy_formats)
648   //MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats)
660   MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats)
649661#else
650662   MCFG_DEVICE_ADD("fdc", WD2793, 0)
651   MCFG_WD17XX_DEFAULT_DRIVE1_TAGS
663   MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
652664   MCFG_WD17XX_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w))
653   MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, excali64_floppy_interface)
654   //MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(excali64_floppy_interface)
665   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(excali64_floppy_interface)
655666#endif
656667   MCFG_DEVICE_ADD("dma", Z80DMA, XTAL_16MHz/4)
657668   MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(excali64_state, busreq_w))
r242544r242545
661672   MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(excali64_state, io_write_byte))
662673
663674   MCFG_DEVICE_ADD("u12", TTL74123, 0)
664   MCFG_TTL74123_CONNECTION_TYPE(TTL74123_GROUNDED)    /* the hook up type (no idea what this means */
675   MCFG_TTL74123_CONNECTION_TYPE(TTL74123_GROUNDED)    /* Hook up type (no idea what this means) */
665676   MCFG_TTL74123_RESISTOR_VALUE(RES_K(100))               /* resistor connected between RCext & 5v */
666677   MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(100))               /* capacitor connected between Cext and RCext */
667678   MCFG_TTL74123_A_PIN_VALUE(0)                  /* A pin - grounded */
668679   MCFG_TTL74123_B_PIN_VALUE(1)                  /* B pin - driven by port e4 bit 5 */
669680   MCFG_TTL74123_CLEAR_PIN_VALUE(1)                  /* Clear pin - pulled high */
670681   MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(excali64_state, motor_w))
682
683   MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
684   MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
685   MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(excali64_state, cent_busy_w))
671686MACHINE_CONFIG_END
672687
673688/* ROM definition */
r242544r242545
692707/* Driver */
693708
694709/*    YEAR  NAME      PARENT  COMPAT   MACHINE    INPUT     CLASS         INIT        COMPANY         FULLNAME        FLAGS */
695COMP( 1984, excali64, 0,      0,       excali64,  excali64, driver_device, 0,  "BGR Computers", "Excalibur 64", GAME_NOT_WORKING )
710COMP( 1984, excali64, 0,      0,       excali64,  excali64, driver_device, 0,  "BGR Computers", "Excalibur 64", 0 )
trunk/src/mess/drivers/tispeak.c
r242544r242545
33/***************************************************************************
44
55  Texas Instruments Speak & Spell hardware
6 
7  (still need to write notes here..)
68
79***************************************************************************/
810
r242544r242545
1012#include "cpu/tms0980/tms0980.h"
1113#include "sound/tms5110.h"
1214#include "machine/tms6100.h"
15#include "bus/generic/slot.h"
16#include "bus/generic/carts.h"
1317
1418#include "tispeak.lh"
1519
20// The master clock is a single stage RC oscillator into TMS5100 RCOSC:
21// C is 68pf, R is a 50kohm trimpot wich is set to 33.6kohm. CPUCLK is this/2, ROMCLK is this/4.
22// The typical osc freq curve for TMS5100 is unknown. Let's assume it is set to the default frequency,
23// which is 640kHz according to the TMS5100 documentation.
1624
25#define MASTER_CLOCK (640000)
26
27
1728class tispeak_state : public driver_device
1829{
1930public:
r242544r242545
2233      m_maincpu(*this, "maincpu"),
2334      m_tms5100(*this, "tms5100"),
2435      m_tms6100(*this, "tms6100"),
36      m_cart(*this, "cartslot"),
2537      m_filoff_timer(*this, "filoff"),
2638      m_button_matrix(*this, "IN")
2739   { }
r242544r242545
2941   required_device<tms0270_cpu_device> m_maincpu;
3042   required_device<tms5100_device> m_tms5100;
3143   required_device<tms6100_device> m_tms6100;
44   optional_device<generic_slot_device> m_cart;
3245   required_device<timer_device> m_filoff_timer;
3346   required_ioport_array<9> m_button_matrix;
3447
r242544r242545
5063   DECLARE_WRITE_LINE_MEMBER(auto_power_off);
5164   void power_off();
5265
66   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
5367   virtual void machine_reset();
5468   virtual void machine_start();
5569};
r242544r242545
5872
5973/***************************************************************************
6074
75  File Handling
76
77***************************************************************************/
78
79DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge)
80{
81   UINT32 size = m_cart->common_get_size("rom");
82
83   // max size is 16KB
84   if (size > 0x4000)
85   {
86      image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size");
87      return IMAGE_INIT_FAIL;
88   }
89
90   m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
91   m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
92
93   return IMAGE_INIT_PASS;
94}
95
96
97
98/***************************************************************************
99
61100  VFD Display
62101
63102***************************************************************************/
r242544r242545
188227{
189228   int on = (int)(FPTR)param;
190229   
191   if (on)
230   if (on && !m_power_on)
192231   {
193232      m_power_on = 1;
194233      m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
195234   }
196   else if (m_power_on)
235   else if (!on && m_power_on)
197236      power_off();
198237}
199238
r242544r242545
345384   save_item(NAME(m_o));
346385   save_item(NAME(m_filament_on));
347386   save_item(NAME(m_power_on));
387   
388   // init cartridge
389   if (m_cart != NULL && m_cart->exists())
390   {
391      astring region_tag;
392      memory_region *src = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
393      if (src)
394      {
395         UINT8 *dest_ptr = memregion("tms6100")->base() + 0x8000;
396         memcpy(dest_ptr, src->base(), src->bytes());
397      }
398   }
348399}
349400
350401
351static MACHINE_CONFIG_START( snspell, tispeak_state )
402static MACHINE_CONFIG_START( snmath, tispeak_state )
352403
353404   /* basic machine hardware */
354   MCFG_CPU_ADD("maincpu", TMS0270, XTAL_640kHz/2)
405   MCFG_CPU_ADD("maincpu", TMS0270, MASTER_CLOCK/2)
355406   MCFG_TMS1XXX_READ_K_CB(READ8(tispeak_state, snspell_read_k))
356   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o))
407   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snmath_write_o))
357408   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tispeak_state, snspell_write_r))
358409   MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(tispeak_state, auto_power_off))
359410
r242544r242545
367418   /* no video! */
368419
369420   /* sound hardware */
370   MCFG_DEVICE_ADD("tms6100", TMS6100, 0)
421   MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4)
371422
372423   MCFG_SPEAKER_STANDARD_MONO("mono")
373   MCFG_SOUND_ADD("tms5100", TMS5100, XTAL_640kHz)
424   MCFG_SOUND_ADD("tms5100", TMS5100, MASTER_CLOCK)
374425   MCFG_TMS5110_M0_CB(DEVWRITELINE("tms6100", tms6100_device, tms6100_m0_w))
375426   MCFG_TMS5110_M1_CB(DEVWRITELINE("tms6100", tms6100_device, tms6100_m1_w))
376427   MCFG_TMS5110_ADDR_CB(DEVWRITE8("tms6100", tms6100_device, tms6100_addr_w))
r242544r242545
379430   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
380431MACHINE_CONFIG_END
381432
382static MACHINE_CONFIG_DERIVED( snmath, snspell )
433static MACHINE_CONFIG_DERIVED( snspell, snmath )
383434
384435   /* basic machine hardware */
385436   MCFG_CPU_MODIFY("maincpu")
386   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snmath_write_o))
437   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o))
438   
439   /* cartridge */
440   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "snspell")
441   MCFG_GENERIC_EXTENSIONS("vsm")
442   MCFG_GENERIC_LOAD(tispeak_state, tispeak_cartridge)
443
444   MCFG_SOFTWARE_LIST_ADD("cart_list", "snspell")
387445MACHINE_CONFIG_END
388446
389447
r242544r242545
396454
397455ROM_START( snspell )
398456   ROM_REGION( 0x1000, "maincpu", 0 )
457   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
458
459   ROM_REGION( 1246, "maincpu:ipla", 0 )
460   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
461   ROM_REGION( 2127, "maincpu:mpla", 0 )
462   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0271
463   ROM_REGION( 1246, "maincpu:opla", 0 )
464   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
465
466   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
467   ROM_LOAD( "tmc0351.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) ) // cd2300
468   ROM_LOAD( "tmc0352.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) ) // cd2301
469ROM_END
470
471ROM_START( snspella )
472   ROM_REGION( 0x1000, "maincpu", 0 )
473   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
474
475   ROM_REGION( 1246, "maincpu:ipla", 0 )
476   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
477   ROM_REGION( 2127, "maincpu:mpla", 0 )
478   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
479   ROM_REGION( 1246, "maincpu:opla", 0 )
480   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
481
482   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge
483   ROM_LOAD( "cd2350a.vsm", 0x0000, 0x4000, CRC(2adda742) SHA1(3f868ed8284b723c815a30343057e03467c043b5) )
484ROM_END
485
486ROM_START( snspellp )
487   ROM_REGION( 0x1000, "maincpu", 0 )
399488   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // typed in from patent 4189779, may have errors
400489
401490   ROM_REGION( 1246, "maincpu:ipla", 0 )
r242544r242545
405494   ROM_REGION( 1246, "maincpu:opla", 0 )
406495   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
407496
408   ROM_REGION( 0x8000, "tms6100", 0 )
497   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
409498   ROM_LOAD( "tmc0351.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) )
410499   ROM_LOAD( "tmc0352.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) )
411500ROM_END
412501
502ROM_START( snspelluk )
503   ROM_REGION( 0x1000, "maincpu", 0 )
504   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
505
506   ROM_REGION( 1246, "maincpu:ipla", 0 )
507   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
508   ROM_REGION( 2127, "maincpu:mpla", 0 )
509   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0271
510   ROM_REGION( 1246, "maincpu:opla", 0 )
511   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
512
513   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
514   ROM_LOAD( "cd2303.vsm", 0x0000, 0x4000, CRC(0fae755c) SHA1(b68c3120a63a61db474feb5d71a6e5dd67910d80) )
515   ROM_LOAD( "cd2304.vsm", 0x4000, 0x4000, CRC(e2a270eb) SHA1(c13c95ad15f1923a4841f66504e0f22646e71d99) )
516ROM_END
517
518ROM_START( snspelluka )
519   ROM_REGION( 0x1000, "maincpu", 0 )
520   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
521
522   ROM_REGION( 1246, "maincpu:ipla", 0 )
523   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
524   ROM_REGION( 2127, "maincpu:mpla", 0 )
525   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
526   ROM_REGION( 1246, "maincpu:opla", 0 )
527   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
528
529   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge
530   ROM_LOAD( "cd62175.vsm", 0x0000, 0x4000, CRC(6e1063d4) SHA1(b5c66c51148c5921ecb8ffccd7a460ae639cdb68) )
531ROM_END
532
533ROM_START( ladictee )
534   ROM_REGION( 0x1000, "maincpu", 0 )
535   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
536
537   ROM_REGION( 1246, "maincpu:ipla", 0 )
538   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
539   ROM_REGION( 2127, "maincpu:mpla", 0 )
540   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
541   ROM_REGION( 1246, "maincpu:opla", 0 )
542   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, BAD_DUMP CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) // placeholder, use the one we have
543
544   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge
545   ROM_LOAD( "cd2352.vsm", 0x0000, 0x4000, CRC(181a239e) SHA1(e16043766c385e152b7005c1c010be4c5fccdd9b) )
546ROM_END
547
548
549
413550ROM_START( snmath )
414551   ROM_REGION( 0x1000, "maincpu", 0 )
415   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure)
552   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // placeholder, use the one we have
416553
417554   ROM_REGION( 1246, "maincpu:ipla", 0 )
418555   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
419556   ROM_REGION( 2127, "maincpu:mpla", 0 )
557   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
558   ROM_REGION( 1246, "maincpu:opla", 0 )
559   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // placeholder, use the one we have
560
561   ROM_REGION( 0x8000, "tms6100", 0 )
562   ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
563   ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) )
564ROM_END
565
566ROM_START( snmatha )
567   ROM_REGION( 0x1000, "maincpu", 0 )
568   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // placeholder, use the one we have
569
570   ROM_REGION( 1246, "maincpu:ipla", 0 )
571   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
572   ROM_REGION( 2127, "maincpu:mpla", 0 )
573   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
574   ROM_REGION( 1246, "maincpu:opla", 0 )
575   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // placeholder, use the one we have
576
577   ROM_REGION( 0x8000, "tms6100", 0 )
578   ROM_LOAD( "cd2381.vsm", 0x0000, 0x4000, CRC(f048dc81) SHA1(e97667d1002de40ab3d702c63b82311480032e0f) )
579   ROM_LOAD( "cd2614.vsm", 0x4000, 0x1000, CRC(11989074) SHA1(0e9cf906de9bcdf4acb425535dc442846fc48fa2) )
580   ROM_RELOAD(             0x5000, 0x1000 )
581   ROM_RELOAD(             0x6000, 0x1000 )
582   ROM_RELOAD(             0x7000, 0x1000 )
583ROM_END
584
585ROM_START( snmathp )
586   ROM_REGION( 0x1000, "maincpu", 0 )
587   // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure)
588   // BTANB note: Mix It does not work at all, this is an original bug in the prototype. There are probably other minor bugs too.
589   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) )
590
591   ROM_REGION( 1246, "maincpu:ipla", 0 )
592   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
593   ROM_REGION( 2127, "maincpu:mpla", 0 )
420594   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as cd2704
421595   ROM_REGION( 1246, "maincpu:opla", 0 )
422596   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // "
r242544r242545
427601ROM_END
428602
429603
430COMP( 1978, snspell, 0, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US, prototype)", GAME_NOT_WORKING )
431COMP( 1980, snmath,  0, 0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US, prototype)", GAME_NOT_WORKING )
604
605COMP( 1978, snspell,    0,       0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
606COMP( 1980, snspella,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
607COMP( 1978, snspellp,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND )
608COMP( 1978, snspelluk,  snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
609COMP( 1981, snspelluka, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // different voice actor
610COMP( 1980, ladictee,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "La Dictee Magnifique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work, custom MCU ROM?
611
612COMP( 1980, snmath,     0,       0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
613COMP( 1986, snmatha,    snmath,  0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
614COMP( 1980, snmathp,    snmath,  0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND )
trunk/src/mess/mess.lst
r242544r242545
10641064
10651065// TI Speak & Spell
10661066snspell
1067snspellp
1068snspella
1069snspelluk
1070snspelluka
1071ladictee
10671072snmath
1073snmatha
1074snmathp
10681075
10691076// Texas Instruments Calculators
10701077tisr16    // 1974 SR-16
trunk/src/osd/modules/debugger/debugqt.c
r242544r242545
2626#include "qt/debugqtmemorywindow.h"
2727#include "qt/debugqtbreakpointswindow.h"
2828#include "qt/debugqtdeviceswindow.h"
29#include "qt/debugqtdeviceinformationwindow.h"
2930#include "debugqt.h"
3031
3132
r242544r242545
8687      WindowQtConfig::WindowType type = (WindowQtConfig::WindowType)xml_get_attribute_int(wnode, "type", WindowQtConfig::WIN_TYPE_UNKNOWN);
8788      switch (type)
8889      {
89         case WindowQtConfig::WIN_TYPE_MAIN:         xmlConfigurations.push_back(new MainWindowQtConfig()); break;
90         case WindowQtConfig::WIN_TYPE_MEMORY:       xmlConfigurations.push_back(new MemoryWindowQtConfig()); break;
91         case WindowQtConfig::WIN_TYPE_DASM:         xmlConfigurations.push_back(new DasmWindowQtConfig()); break;
92         case WindowQtConfig::WIN_TYPE_LOG:          xmlConfigurations.push_back(new LogWindowQtConfig()); break;
93         case WindowQtConfig::WIN_TYPE_BREAK_POINTS: xmlConfigurations.push_back(new BreakpointsWindowQtConfig()); break;
94         case WindowQtConfig::WIN_TYPE_DEVICES:      xmlConfigurations.push_back(new DevicesWindowQtConfig()); break;
90         case WindowQtConfig::WIN_TYPE_MAIN:               xmlConfigurations.push_back(new MainWindowQtConfig()); break;
91         case WindowQtConfig::WIN_TYPE_MEMORY:             xmlConfigurations.push_back(new MemoryWindowQtConfig()); break;
92         case WindowQtConfig::WIN_TYPE_DASM:               xmlConfigurations.push_back(new DasmWindowQtConfig()); break;
93         case WindowQtConfig::WIN_TYPE_LOG:                xmlConfigurations.push_back(new LogWindowQtConfig()); break;
94         case WindowQtConfig::WIN_TYPE_BREAK_POINTS:       xmlConfigurations.push_back(new BreakpointsWindowQtConfig()); break;
95         case WindowQtConfig::WIN_TYPE_DEVICES:            xmlConfigurations.push_back(new DevicesWindowQtConfig()); break;
96         case WindowQtConfig::WIN_TYPE_DEVICE_INFORMATION: xmlConfigurations.push_back(new DeviceInformationWindowQtConfig()); break;
9597         default: continue;
9698      }
9799      xmlConfigurations.back()->recoverFromXmlNode(wnode);
r242544r242545
149151         xmlConfigurations.push_back(new BreakpointsWindowQtConfig());
150152      else if (dynamic_cast<DevicesWindow*>(widget))
151153         xmlConfigurations.push_back(new DevicesWindowQtConfig());
154      else if (dynamic_cast<DeviceInformationWindow*>(widget))
155         xmlConfigurations.push_back(new DeviceInformationWindowQtConfig());
152156
153157      xmlConfigurations.back()->buildFromQWidget(widget);
154158   }
r242544r242545
193197            foo = new BreakpointsWindow(&machine); break;
194198         case WindowQtConfig::WIN_TYPE_DEVICES:
195199            foo = new DevicesWindow(&machine); break;
200         case WindowQtConfig::WIN_TYPE_DEVICE_INFORMATION:
201            foo = new DeviceInformationWindow(&machine); break;
196202         default: break;
197203      }
198204      config->applyToQWidget(foo);
trunk/src/osd/modules/debugger/qt/debugqtdeviceinformationwindow.c
r0r242545
1#define NO_MEM_TRACKING
2
3#include "debugqtdeviceinformationwindow.h"
4
5
6DeviceInformationWindow::DeviceInformationWindow(running_machine* machine, device_t* device, QWidget* parent) :
7   WindowQt(machine, NULL)
8{
9   m_device = device;
10
11   if (parent != NULL)
12   {
13      QPoint parentPos = parent->pos();
14      setGeometry(parentPos.x()+100, parentPos.y()+100, 600, 400);
15   }
16
17   if(m_device)
18      fill_device_information();
19}
20
21
22DeviceInformationWindow::~DeviceInformationWindow()
23{
24}
25
26void DeviceInformationWindow::fill_device_information()
27{
28   char title[4069];
29   sprintf(title, "Debug: Device %s", m_device->tag());
30   setWindowTitle(title);
31
32
33   QFrame *mainWindowFrame = new QFrame(this);
34   QVBoxLayout *vLayout = new QVBoxLayout(mainWindowFrame);
35   vLayout->setObjectName("vlayout");
36   vLayout->setSpacing(3);
37   vLayout->setContentsMargins(2,2,2,2);
38
39   QFrame *primaryFrame = new QFrame(mainWindowFrame);
40   primaryFrame->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
41   QGridLayout *gl1 = new QGridLayout(primaryFrame);
42   gl1->addWidget(new QLabel(QString("Tag"), primaryFrame), 0, 0);
43   gl1->addWidget(new QLabel(QString(m_device->tag()), primaryFrame), 0, 1);
44   gl1->addWidget(new QLabel(QString("Name"), primaryFrame), 1, 0);
45   gl1->addWidget(new QLabel(QString(m_device->name()), primaryFrame), 1, 1);
46   gl1->addWidget(new QLabel(QString("Shortname"), primaryFrame), 2, 0);
47   gl1->addWidget(new QLabel(QString(m_device->shortname()), primaryFrame), 2, 1);
48
49   int cpos = 3;
50   device_interface *intf = m_device->first_interface();
51   if(intf) {
52      gl1->addWidget(new QLabel(QString("Interfaces"), primaryFrame), cpos, 0);
53      while(intf) {
54         gl1->addWidget(new QLabel(QString(intf->interface_type()), primaryFrame), cpos, 1);
55         cpos++;
56         intf = intf->interface_next();
57      }
58   }
59
60   vLayout->addWidget(primaryFrame);
61
62   device_memory_interface *d_memory;
63   if(m_device->interface(d_memory)) {
64      QFrame *f = new QFrame(mainWindowFrame);
65      f->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
66      QVBoxLayout *vb = new QVBoxLayout(f);
67      bool first = true;
68      for(address_spacenum i=AS_0; i<ADDRESS_SPACES; i++)
69         if(d_memory->has_space(i)) {
70            QFrame *ff = new QFrame(f);
71            QHBoxLayout *hb = new QHBoxLayout(ff);
72            if(first) {
73               hb->addWidget(new QLabel("Memory maps"));
74               first = false;
75            }
76            hb->addStretch();
77            hb->addWidget(new QLabel(d_memory->space_config(i)->name()));
78            vb->addWidget(ff);
79         }
80      vLayout->addWidget(f);
81   }
82
83   vLayout->addStretch();
84
85   setCentralWidget(mainWindowFrame);
86}
87
88void DeviceInformationWindow::set_device(const char *tag)
89{
90   m_device = m_machine->device(tag);
91   if(!m_device)
92      m_device = &m_machine->root_device();
93   fill_device_information();
94}
95
96const char *DeviceInformationWindow::device_tag() const
97{
98   return m_device->tag();
99}
100
101
102//=========================================================================
103//  DeviceInformationWindowQtConfig
104//=========================================================================
105void DeviceInformationWindowQtConfig::buildFromQWidget(QWidget* widget)
106{
107   WindowQtConfig::buildFromQWidget(widget);
108   DeviceInformationWindow* window = dynamic_cast<DeviceInformationWindow*>(widget);
109   m_device_tag = window->device_tag();
110}
111
112
113void DeviceInformationWindowQtConfig::applyToQWidget(QWidget* widget)
114{
115   WindowQtConfig::applyToQWidget(widget);
116   DeviceInformationWindow* window = dynamic_cast<DeviceInformationWindow*>(widget);
117   window->set_device(m_device_tag.cstr());
118}
119
120
121void DeviceInformationWindowQtConfig::addToXmlDataNode(xml_data_node* node) const
122{
123   WindowQtConfig::addToXmlDataNode(node);
124   xml_set_attribute(node, "device-tag", m_device_tag);
125}
126
127
128void DeviceInformationWindowQtConfig::recoverFromXmlNode(xml_data_node* node)
129{
130   WindowQtConfig::recoverFromXmlNode(node);
131   m_device_tag = xml_get_attribute_string(node, "device-tag", ":");
132}
trunk/src/osd/modules/debugger/qt/debugqtdeviceinformationwindow.h
r0r242545
1#ifndef __DEBUG_QT_DEVICE_INFORMATION_WINDOW_H__
2#define __DEBUG_QT_DEVICE_INFORMATION_WINDOW_H__
3
4#include <QtGui/QtGui>
5
6#include "debugqtwindow.h"
7
8//============================================================
9//  The Device Information Window.
10//============================================================
11class DeviceInformationWindow : public WindowQt
12{
13   Q_OBJECT
14
15public:
16   DeviceInformationWindow(running_machine* machine, device_t* device = NULL, QWidget* parent=NULL);
17   virtual ~DeviceInformationWindow();
18
19   void set_device(const char *tag);
20   const char *device_tag() const;
21
22private:
23   device_t *m_device;
24
25   void fill_device_information();
26};
27
28
29
30
31//=========================================================================
32//  A way to store the configuration of a window long enough to read/write.
33//=========================================================================
34class DeviceInformationWindowQtConfig : public WindowQtConfig
35{
36public:
37   astring m_device_tag;
38
39   DeviceInformationWindowQtConfig() :
40      WindowQtConfig(WIN_TYPE_DEVICE_INFORMATION)
41   {
42   }
43
44   ~DeviceInformationWindowQtConfig() {}
45
46   void buildFromQWidget(QWidget* widget);
47   void applyToQWidget(QWidget* widget);
48   void addToXmlDataNode(xml_data_node* node) const;
49   void recoverFromXmlNode(xml_data_node* node);
50};
51
52
53#endif
trunk/src/osd/modules/debugger/qt/debugqtdeviceswindow.c
r242544r242545
11#define NO_MEM_TRACKING
22
33#include "debugqtdeviceswindow.h"
4#include "debugqtdeviceinformationwindow.h"
45
56DevicesWindowModel::DevicesWindowModel(running_machine *machine, QObject *parent)
67{
r242544r242545
1819
1920   device_t *dev = static_cast<device_t *>(index.internalPointer());
2021   switch(index.column()) {
21   case 0: return QString(dev->basetag()); break;
22   case 1: return QString(dev->name()); break;
22   case 0: return dev == &m_machine->root_device() ? QString("<root>") : QString(dev->basetag());
23   case 1: return QString(dev->name());
2324   }
2425
2526   return QVariant();
r242544r242545
108109   WindowQt(machine, NULL),
109110   m_devices_model(machine)
110111{
112   m_selected_device = NULL;
113
111114   setWindowTitle("Debug: All Devices");
112115
113116   if (parent != NULL)
r242544r242545
123126   m_devices_view->setModel(&m_devices_model);
124127   m_devices_view->expandAll();
125128   m_devices_view->resizeColumnToContents(0);
129   connect(m_devices_view->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &,const QModelIndex &)), this, SLOT(currentRowChanged(const QModelIndex &,const QModelIndex &)));
130   connect(m_devices_view, SIGNAL(activated(const QModelIndex &)), this, SLOT(activated(const QModelIndex &)));
126131   setCentralWidget(m_devices_view);
127132}
128133
r242544r242545
132137}
133138
134139
140void DevicesWindow::currentRowChanged(const QModelIndex &current, const QModelIndex &previous)
141{
142   m_selected_device = static_cast<device_t *>(current.internalPointer());
143}
135144
145
146void DevicesWindow::activated(const QModelIndex &index)
147{
148   device_t *dev = static_cast<device_t *>(index.internalPointer());
149   (new DeviceInformationWindow(m_machine, dev, this))->show();
150}
151
152
153
136154//=========================================================================
137155//  DevicesWindowQtConfig
138156//=========================================================================
trunk/src/osd/modules/debugger/qt/debugqtdeviceswindow.h
r242544r242545
4343   DevicesWindow(running_machine* machine, QWidget* parent=NULL);
4444   virtual ~DevicesWindow();
4545
46public slots:
47    void currentRowChanged(const QModelIndex &current, const QModelIndex &previous);
48    void activated(const QModelIndex &index);
49
4650private:
4751   QTreeView *m_devices_view;
4852   DevicesWindowModel m_devices_model;
53   device_t *m_selected_device;
4954};
5055
5156
trunk/src/osd/sdl/draw13.c
r242544r242545
555555         SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_FULLSCREEN : SDL_WINDOW_RESIZABLE);
556556
557557   // create the SDL window
558   window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED_DISPLAY(window->monitor->handle), SDL_WINDOWPOS_UNDEFINED,
558   window->sdl_window = SDL_CreateWindow(window->title, window->monitor->monitor_x, 0,
559559         width, height, sdl->extra_flags);
560560
561561   if (window->fullscreen && video_config.switchres)
trunk/src/osd/sdl/drawogl.c
r242544r242545
510510   //load_gl_lib(window->machine());
511511
512512   // create the SDL window
513   window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED_DISPLAY(window->monitor->handle), SDL_WINDOWPOS_UNDEFINED,
513   window->sdl_window = SDL_CreateWindow(window->title, window->monitor->monitor_x, 0,
514514         width, height, sdl->extra_flags);
515515
516516   if  (!window->sdl_window )
trunk/src/osd/sdl/sdl.mak
r242544r242545
680680   $(OSDOBJ)/modules/debugger/qt/debugqtmemorywindow.o \
681681   $(OSDOBJ)/modules/debugger/qt/debugqtbreakpointswindow.o \
682682   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.o \
683   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceinformationwindow.o \
683684   $(OSDOBJ)/modules/debugger/qt/debugqtview.moc.o \
684685   $(OSDOBJ)/modules/debugger/qt/debugqtwindow.moc.o \
685686   $(OSDOBJ)/modules/debugger/qt/debugqtlogwindow.moc.o \
r242544r242545
687688   $(OSDOBJ)/modules/debugger/qt/debugqtmainwindow.moc.o \
688689   $(OSDOBJ)/modules/debugger/qt/debugqtmemorywindow.moc.o \
689690   $(OSDOBJ)/modules/debugger/qt/debugqtbreakpointswindow.moc.o \
690   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.moc.o
691   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.moc.o \
692   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceinformationwindow.moc.o
691693endif
692694
693695ifeq ($(NO_DEBUGGER),1)
trunk/src/osd/sdl/video.c
r242544r242545
437437
438438   #if (SDLMAME_SDL2)
439439   {
440      int i;
440      int i, monx = 0;
441441
442442      osd_printf_verbose("Enter init_monitors\n");
443443
r242544r242545
456456         monitor->monitor_height = dmode.h;
457457         monitor->center_width = dmode.w;
458458         monitor->center_height = dmode.h;
459         monitor->monitor_x = monx;
459460         monitor->handle = i;
460461         // guess the aspect ratio assuming square pixels
461462         monitor->aspect = (float)(dmode.w) / (float)(dmode.h);
462463         osd_printf_verbose("Adding monitor %s (%d x %d)\n", monitor->monitor_device, dmode.w, dmode.h);
463464
465         monx += dmode.w;
466
464467         // save the primary monitor handle
465468         if (i == 0)
466469            primary_monitor = monitor;
r242544r242545
560563
561564   // check for toggling fullscreen mode
562565   if (ui_input_pressed(machine, IPT_OSD_1))
563      sdlwindow_toggle_full_screen(machine, window);
566   {
567      sdl_window_info *curwin = sdl_window_list;
564568
569      while (curwin != (sdl_window_info *)NULL)
570      {
571         sdlwindow_toggle_full_screen(machine, curwin);
572         curwin = curwin->next;
573      }
574   }
575
565576   if (ui_input_pressed(machine, IPT_OSD_2))
566577   {
567578      //FIXME: on a per window basis
trunk/src/osd/sdl/video.h
r242544r242545
7070   float               aspect;                 // computed/configured aspect ratio of the physical device
7171   int                 center_width;           // width of first physical screen for centering
7272   int                 center_height;          // height of first physical screen for centering
73   int               monitor_x;            // X position of this monitor in virtual desktop space (SDL virtual space has them all horizontally stacked, not real geometry)
7374};
7475
7576
trunk/src/osd/windows/windows.mak
r242544r242545
416416   $(OSDOBJ)/modules/debugger/qt/debugqtmemorywindow.o \
417417   $(OSDOBJ)/modules/debugger/qt/debugqtbreakpointswindow.o \
418418   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.o \
419   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceinformationwindow.o \
419420   $(OSDOBJ)/modules/debugger/qt/debugqtview.moc.o \
420421   $(OSDOBJ)/modules/debugger/qt/debugqtwindow.moc.o \
421422   $(OSDOBJ)/modules/debugger/qt/debugqtlogwindow.moc.o \
r242544r242545
423424   $(OSDOBJ)/modules/debugger/qt/debugqtmainwindow.moc.o \
424425   $(OSDOBJ)/modules/debugger/qt/debugqtmemorywindow.moc.o \
425426   $(OSDOBJ)/modules/debugger/qt/debugqtbreakpointswindow.moc.o \
426   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.moc.o
427   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.moc.o \
428   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceinformationwindow.moc.o
427429endif
428430
429431#-------------------------------------------------


Previous 199869 Revisions Next


© 1997-2024 The MAME Team