Previous 199869 Revisions Next

r45196 Wednesday 24th February, 2016 at 06:46:57 UTC by Miodrag Milanović
Cleanups and version bump
[hash]a2600.xml a800_flop.xml electron_cass.xml k28m2.xml m5_cart.xml
[src]version.cpp
[src/devices/bus/centronics]epson_lx810l.cpp
[src/devices/bus/m5]slot.cpp slot.h
[src/devices/cpu/hphybrid]hphybrid.cpp
[src/devices/cpu/m6800]6800ops.inc
[src/devices/cpu/z80]z80.cpp
[src/devices/machine]hp_taco.cpp hp_taco.h
[src/devices/video]ef9364.cpp ef9364.h jangou_blitter.cpp jangou_blitter.h upd7220.cpp voodoo.cpp voodoo.h
[src/emu]clifront.cpp emuopts.cpp emuopts.h ioport.cpp ioport.h language.cpp language.h luaengine.cpp machine.cpp uiinput.cpp video.h
[src/emu/debug]debugcpu.cpp
[src/emu/drivers]empty.cpp
[src/emu/ui]auditmenu.cpp cheatopt.cpp ctrlmenu.cpp custmenu.cpp custui.cpp custui.h datfile.cpp datfile.h datmenu.cpp datmenu.h dirmenu.cpp dsplmenu.cpp inifile.cpp inifile.h mainmenu.cpp menu.cpp menu.h miscmenu.cpp moptions.cpp optsmenu.cpp selector.cpp selgame.cpp selsoft.cpp sndmenu.cpp ui.cpp ui.h utils.cpp
[src/lib/util]options.h
[src/mame]arcade.lst
[src/mame/audio]zaccaria.h
[src/mame/drivers]1943.cpp 1945kiii.cpp amazonlf.cpp apple1.cpp apple2e.cpp argox.cpp asteroid.cpp blmbycar.cpp bublbobl.cpp cobra.cpp esq5505.cpp fidel6502.cpp fidel68k.cpp fidelz80.cpp galaxi.cpp goldstar.cpp goupil.cpp hh_tms1k.cpp hp9845.cpp jangou.cpp k28.cpp kurukuru.cpp m5.cpp megasys1.cpp merit.cpp namcops2.cpp nibble.cpp nightgal.cpp notetaker.cpp overdriv.cpp slapfght.cpp snk.cpp stv.cpp system16.cpp ticalc1x.cpp tispeak.cpp viper.cpp
[src/mame/includes]blmbycar.h glass.h m5.h overdriv.h
[src/mame/layout]esq2by16.lay
[src/mame/machine]315-5838_317-0229_comp.cpp esqlcd.cpp gaelco2.cpp pc9801_kbd.h trs80.cpp
[src/mame/video]galpanic.cpp megasys1.cpp
[src/osd/modules]osdwindow.cpp osdwindow.h
[src/osd/modules/render]binpacker.cpp binpacker.h d3dtarget.h draw13.h drawbgfx.cpp drawd3d.h drawgdi.h drawnone.h drawogl.h drawsdl.h sdlglcontext.h winglcontext.h
[src/osd/modules/render/bgfx]blendreader.cpp blendreader.h chain.h chainentry.h chainentryreader.cpp chainentryreader.h chainreader.cpp chainreader.h cullreader.cpp cullreader.h depthreader.cpp depthreader.h effect.cpp effect.h effectmanager.cpp effectmanager.h effectreader.cpp effectreader.h inputpair.cpp inputpair.h parameter.h paramreader.cpp paramreader.h shadermanager.cpp shadermanager.h slider.h sliderreader.cpp sliderreader.h statereader.cpp statereader.h target.h targetmanager.cpp targetmanager.h texture.h texturemanager.cpp texturemanager.h uniform.cpp uniform.h uniformreader.cpp uniformreader.h writereader.cpp writereader.h
[src/osd/modules/render/d3d]d3dcomm.h d3dhlsl.h
[src/osd/modules/sync]work_osd.cpp
[src/osd/windows]window.cpp winmain.cpp winmain.h
[src/tools]jedutil.cpp

trunk/hash/a2600.xml
r253707r253708
99   <software name="adventp">
1010      <description>Adventure +</description>
1111      <year>2003</year>
12      <publisher>Homebrew</publisher>     
12      <publisher>Homebrew</publisher>
1313      <info name="programmer" value="Steve Engelhardt" />
1414      <sharedfeat name="compatibility" value="NTSC" />
1515      <part name="cart" interface="a2600_cart">
r253707r253708
2222   <software name="elfadven">
2323      <description>Elf Adventure (Prototype)</description>
2424      <year>1983</year>
25      <publisher>Atari</publisher>     
25      <publisher>Atari</publisher>
2626      <info name="programmer" value="Warren Robinett" />
2727      <sharedfeat name="compatibility" value="NTSC" />
2828      <part name="cart" interface="a2600_cart">
r253707r253708
3131         </dataarea>
3232      </part>
3333   </software>
34   
34
3535   <software name="ret2hh">
3636      <description>Return to Haunted House (Flashback 2)</description>
3737      <year>2005</year>
38      <publisher>Syzygy Company</publisher>     
38      <publisher>Syzygy Company</publisher>
3939      <info name="programmer" value="Curt Vensel" />
4040      <sharedfeat name="compatibility" value="NTSC" />
4141      <part name="cart" interface="a2600_cart">
r253707r253708
4444         </dataarea>
4545      </part>
4646   </software>
47   
47
4848   <software name="advent2" supported="no">
4949      <description>Adventure II (Flashback 2)</description>
5050      <year>2005</year>
51      <publisher>Syzygy Company</publisher>     
51      <publisher>Syzygy Company</publisher>
5252      <info name="programmer" value="Curt Vensel" />
5353      <sharedfeat name="compatibility" value="NTSC" />
5454      <part name="cart" interface="a2600_cart">
r253707r253708
5656            <rom name="Adventure 2.a26" size="8192" crc="bfd846c5" sha1="48d3b94e41371dd7f41d96e1195c324913c228bd" offset="0" />
5757         </dataarea>
5858      </part>
59   </software>   
59   </software>
6060
6161   <software name="2pakblac">
6262      <description>2 Pak Special: Challenge + Surfing (PAL)</description>
trunk/hash/a800_flop.xml
r253707r253708
1717      <description>Star Raiders II [Aric Wilmunder]</description>
1818      <year>1984</year>
1919      <publisher>Atari</publisher>
20      <part name="flop1" interface="floppy_5_25">         
20      <part name="flop1" interface="floppy_5_25">
2121         <dataarea name="flop" size="92176">
2222            <rom name="Wilmunder_Star_Raiders_II_8-2.atr" size="92176" crc="fd4e3401" sha1="90a53c361bb3a89f6c5db93b0441d04feccc6d90" offset="0" />
2323         </dataarea>
r253707r253708
2828      <description>S.A.M.</description>
2929      <year>1982</year>
3030      <publisher>Don't Ask</publisher>
31      <part name="flop1" interface="floppy_5_25">         
31      <part name="flop1" interface="floppy_5_25">
3232         <dataarea name="flop" size="92176">
3333            <rom name="sam.atr" size="92176" crc="a5895d13" sha1="da2118f26dd46b0435ba6a486f17069734bad812" offset="0" />
3434         </dataarea>
r253707r253708
3939      <description>Ulysses and the Golden Fleece</description>
4040      <year>1986</year>
4141      <publisher>Sierra On-Line</publisher>
42      <part name="flop1" interface="floppy_5_25">         
42      <part name="flop1" interface="floppy_5_25">
4343         <dataarea name="flop" size="92176">
4444            <rom name="Ulysses And The Golden Fleece [Rel. 1] [Side A].atr" size="92176" crc="e16b8dc8" sha1="4e55312b5259c96138f48703fcaa58a6edd0d922" offset="0" />
4545         </dataarea>
4646      </part>
47      <part name="flop2" interface="floppy_5_25">         
47      <part name="flop2" interface="floppy_5_25">
4848         <dataarea name="flop" size="92176">
4949            <rom name="Ulysses And The Golden Fleece [Side B].atr" size="92176" crc="40915a46" sha1="a0c539aba57f93a44e23fd20bf444b0ae59c582c" offset="0" />
5050         </dataarea>
5151      </part>
52      <part name="flop3" interface="floppy_5_25">         
52      <part name="flop3" interface="floppy_5_25">
5353         <dataarea name="flop" size="92176">
5454            <rom name="Ulysses And The Golden Fleece [Side C].atr" size="92176" crc="525a47fb" sha1="6afd6d46af274d96a3cce97dfb4ec7776fe47a6b" offset="0" />
5555         </dataarea>
r253707r253708
6060      <description>Tagalon</description>
6161      <year>1986</year>
6262      <publisher>Tynesoft</publisher>
63      <part name="flop1" interface="floppy_5_25">         
63      <part name="flop1" interface="floppy_5_25">
6464         <dataarea name="flop" size="92176">
6565            <rom name="Tagalon.ATR" size="92176" crc="f1d7bc3b" sha1="ced50da056a9fc208b613dbf1a51c0053ec251d1" offset="0" />
6666         </dataarea>
r253707r253708
7171      <description>Ninja</description>
7272      <year>1986</year>
7373      <publisher>Mastertronic</publisher>
74      <part name="flop1" interface="floppy_5_25">         
74      <part name="flop1" interface="floppy_5_25">
7575         <dataarea name="flop" size="92176">
7676            <rom name="Ninja (v1).atr" size="92176" crc="54c732ed" sha1="8cd6d106904d62bb417acc0c58928dc40e10c462" offset="0" />
7777         </dataarea>
r253707r253708
8282      <description>Countdown</description>
8383      <year>1984</year>
8484      <publisher>Synapse</publisher>
85      <part name="flop1" interface="floppy_5_25">         
85      <part name="flop1" interface="floppy_5_25">
8686         <dataarea name="flop" size="92176">
8787            <rom name="Countdown.atr" size="92176" crc="0471796a" sha1="d02b8ad67b2f1f27b340e6fa94aa0c9bc03d2ad7" offset="0" />
8888         </dataarea>
r253707r253708
9393      <description>Silent Service</description>
9494      <year>1985</year>
9595      <publisher>Microprose</publisher>
96      <part name="flop1" interface="floppy_5_25">         
96      <part name="flop1" interface="floppy_5_25">
9797         <dataarea name="flop" size="92176">
9898            <rom name="Silent Service.atr" size="92176" crc="bda9ac46" sha1="312c76e40f0941749e3909afd4a7d7a83f398210" offset="0" />
9999         </dataarea>
r253707r253708
104104      <description>Temple Of Apshai Triology</description>
105105      <year>1985</year>
106106      <publisher>Epyx</publisher>
107      <part name="flop1" interface="floppy_5_25">         
107      <part name="flop1" interface="floppy_5_25">
108108         <dataarea name="flop" size="92176">
109109            <rom name="Temple of Apshai Trilogy (The).atr" size="92176" crc="a5cdca88" sha1="e9955303ba855beeafb0e5bf9b5b683d0fbb8701" offset="0" />
110110         </dataarea>
r253707r253708
115115      <description>Necromancer</description>
116116      <year>1982</year>
117117      <publisher>Synapse</publisher>
118      <part name="flop1" interface="floppy_5_25">         
118      <part name="flop1" interface="floppy_5_25">
119119         <dataarea name="flop" size="92176">
120120            <rom name="Necromancer (v3).atr" size="92176" crc="e88a29c6" sha1="2445a652bb2980b7def4b189718332997f9fa584" offset="0" />
121121         </dataarea>
r253707r253708
126126      <description>Shamus: Case II</description>
127127      <year>1983</year>
128128      <publisher>Synapse</publisher>
129      <part name="flop1" interface="floppy_5_25">         
129      <part name="flop1" interface="floppy_5_25">
130130         <dataarea name="flop" size="92176">
131131            <rom name="Shamus - Case II.atr" size="92176" crc="2b6696c6" sha1="f3079c19f54ae5dc6fc9de6ca80341e9a2527c05" offset="0" />
132132         </dataarea>
r253707r253708
137137      <description>World Karate Championship</description>
138138      <year>1986</year>
139139      <publisher>Epyx</publisher>
140      <part name="flop1" interface="floppy_5_25">         
140      <part name="flop1" interface="floppy_5_25">
141141         <dataarea name="flop" size="133136">
142142            <rom name="World Karate Championship (v4).atr" size="133136" crc="a89bf1e6" sha1="97fbaf575d9f9ddbecd1528c7d5090d2fdac6f3e" offset="0" />
143143         </dataarea>
r253707r253708
148148      <description>Lode Runner</description>
149149      <year>1983</year>
150150      <publisher>Broderbund</publisher>
151      <part name="flop1" interface="floppy_5_25">         
151      <part name="flop1" interface="floppy_5_25">
152152         <dataarea name="flop" size="92176">
153153            <rom name="Lode Runner (1983)(Broderbund).atr" size="92176" crc="3a6f19ae" sha1="1add070c088b73488fb83e815294cd1d0e38e039" offset="0" />
154154         </dataarea>
r253707r253708
159159      <description>Championship Lode Runner</description>
160160      <year>1985</year>
161161      <publisher>Broderbund</publisher>
162      <part name="flop1" interface="floppy_5_25">         
162      <part name="flop1" interface="floppy_5_25">
163163         <dataarea name="flop" size="92176">
164164            <rom name="Championship Lode Runner.atr" size="92176" crc="53e02689" sha1="dc92e8616fa2e00432b388df97d508c1a0b6db3c" offset="0" />
165165         </dataarea>
r253707r253708
170170      <description>Mars Mission II</description>
171171      <year>1981</year>
172172      <publisher>Antic</publisher>
173      <part name="flop1" interface="floppy_5_25">         
173      <part name="flop1" interface="floppy_5_25">
174174         <dataarea name="flop" size="92176">
175175            <rom name="Mars Mission II.atr" size="92176" crc="59694595" sha1="4b2ad8bdcbbd4c8f5aef154e55bf4950b15798f3" offset="0" />
176176         </dataarea>
r253707r253708
181181      <description>Caverns of Khafka</description>
182182      <year>1983</year>
183183      <publisher>Cosmi</publisher>
184      <part name="flop1" interface="floppy_5_25">         
184      <part name="flop1" interface="floppy_5_25">
185185         <dataarea name="flop" size="92176">
186186            <rom name="Caverns of Khafka.atr" size="92176" crc="587862ff" sha1="53ec7aa10e7f7231b4cc7d194b21fda735135263" offset="0" />
187187         </dataarea>
r253707r253708
192192      <description>Bruce Lee</description>
193193      <year>1984</year>
194194      <publisher>Datasoft</publisher>
195      <part name="flop1" interface="floppy_5_25">         
195      <part name="flop1" interface="floppy_5_25">
196196         <dataarea name="flop" size="92176">
197197            <rom name="Bruce Lee (v1).atr" size="92176" crc="5870eb7f" sha1="789b4c0ce4ade89559179999751a29f250325787" offset="0" />
198198         </dataarea>
r253707r253708
203203      <description>Boulder Dash II</description>
204204      <year>1985</year>
205205      <publisher>First Star</publisher>
206      <part name="flop1" interface="floppy_5_25">         
206      <part name="flop1" interface="floppy_5_25">
207207         <dataarea name="flop" size="92176">
208208            <rom name="Boulder Dash II (v4).atr" size="92176" crc="1145500d" sha1="6cbbe6c497f6462b1e3aabaa72a91ce5daa35fb6" offset="0" />
209209         </dataarea>
r253707r253708
214214      <description>Blue Max 2001</description>
215215      <year>1984</year>
216216      <publisher>Synapse</publisher>
217      <part name="flop1" interface="floppy_5_25">         
217      <part name="flop1" interface="floppy_5_25">
218218         <dataarea name="flop" size="65552">
219219            <rom name="Blue Max 2001.atr" size="65552" crc="e8fb6d8f" sha1="2b3fe701ea1a7d4660d5d6d403228fbabf4cc711" offset="0" />
220220         </dataarea>
r253707r253708
225225      <description>Aztec Challenge</description>
226226      <year>1983</year>
227227      <publisher>Cosmi</publisher>
228      <part name="flop1" interface="floppy_5_25">         
228      <part name="flop1" interface="floppy_5_25">
229229         <dataarea name="flop" size="13584">
230230            <rom name="Aztec Challenge.atr" size="13584" crc="ea4be8e7" sha1="bd9362aa4023a54a35ef2c3f3c7100523100820b" offset="0" />
231231         </dataarea>
r253707r253708
236236      <description>Spy Vs Spy</description>
237237      <year>1984</year>
238238      <publisher>First Star</publisher>
239      <part name="flop1" interface="floppy_5_25">         
239      <part name="flop1" interface="floppy_5_25">
240240         <dataarea name="flop" size="92176">
241241            <rom name="Spy Vs Spy (1984)(First Star).atr" size="92176" crc="91940f40" sha1="d57d8ecbb0b14987c8fc64b27fe1511779c62f4d" offset="0" />
242242         </dataarea>
r253707r253708
247247      <description>Spy Vs Spy - Arctic Antics</description>
248248      <year>1987</year>
249249      <publisher>First Star</publisher>
250      <part name="flop1" interface="floppy_5_25">         
250      <part name="flop1" interface="floppy_5_25">
251251         <dataarea name="flop" size="92176">
252252            <rom name="Spy Vs Spy - Arctic Antics (1987)(First Star).atr" size="92176" crc="0bd44669" sha1="e6fe39584e5facc62116c7c4f5952e4d5046323a" offset="0" />
253253         </dataarea>
r253707r253708
258258      <description>Spy Vs Spy - The Island Caper</description>
259259      <year>1985</year>
260260      <publisher>First Star Software</publisher>
261      <part name="flop1" interface="floppy_5_25">         
261      <part name="flop1" interface="floppy_5_25">
262262         <dataarea name="flop" size="92176">
263263            <rom name="Spy Vs Spy - The Island Caper (1985)(First Star).atr" size="92176" crc="7ac8a99a" sha1="ce4241641a3d0981beaa766f01bf0093552c70de" offset="0" />
264264         </dataarea>
r253707r253708
269269      <description>Montezuma's Revenge</description>
270270      <year>1984</year>
271271      <publisher>Parker Brothers</publisher>
272      <part name="flop1" interface="floppy_5_25">         
272      <part name="flop1" interface="floppy_5_25">
273273         <dataarea name="flop" size="92176">
274274            <rom name="Montezuma's Revenge _ Parker Brothers.atr" size="92176" crc="3ec0b7e2" sha1="3535dfc1cf25f59c8bdc050689bb89877fef9da0" offset="0" />
275275         </dataarea>
r253707r253708
280280      <description>Montezuma's Revenge! (Prototype)</description>
281281      <year>1983</year>
282282      <publisher>Utopia Software</publisher>
283      <part name="flop1" interface="floppy_5_25">         
283      <part name="flop1" interface="floppy_5_25">
284284         <dataarea name="flop" size="34960">
285285            <rom name="Montezuma's Revenge!.atr" size="34960" crc="fd7387dd" sha1="563832104dd0658d09411b24cc0c251be5041d33" offset="0" />
286286         </dataarea>
r253707r253708
292292      <description>Mr. Robot and his Robot Factory</description>
293293      <year>1983</year>
294294      <publisher>Datamost</publisher>
295      <part name="flop1" interface="floppy_5_25">         
295      <part name="flop1" interface="floppy_5_25">
296296         <dataarea name="flop" size="92176">
297297            <rom name="mr robot and his robot factory.atr" size="92176" crc="36f3bdb0" sha1="8bb1f04783e883bb20aec5b83e3493632d9dd0bd" offset="0" />
298298         </dataarea>
r253707r253708
303303      <description>Castle Wolfenstein</description>
304304      <year>1983</year>
305305      <publisher>Muse Software</publisher>
306      <part name="flop1" interface="floppy_5_25">         
306      <part name="flop1" interface="floppy_5_25">
307307         <dataarea name="flop" size="92176">
308308            <rom name="castle wolfenstein.atr" size="92176" crc="7745cd05" sha1="03ba4218d20f260f3e17c7ce540c952cd071bdf5" offset="0" />
309309         </dataarea>
r253707r253708
314314      <description>Beyond Castle Wolfenstein</description>
315315      <year>1984</year>
316316      <publisher>Muse Software</publisher>
317      <part name="flop1" interface="floppy_5_25">         
317      <part name="flop1" interface="floppy_5_25">
318318         <dataarea name="flop" size="92176">
319319            <rom name="beyond castle wolfenstein.atr" size="92176" crc="78ef8db7" sha1="a0916bd0dde1b748834411c96cb2ae058b38f3c2" offset="0" />
320320         </dataarea>
r253707r253708
325325      <description>Quasimodo</description>
326326      <year>1984</year>
327327      <publisher>Synapse</publisher>
328      <part name="flop1" interface="floppy_5_25">         
328      <part name="flop1" interface="floppy_5_25">
329329         <dataarea name="flop" size="27024">
330330            <rom name="quasmodo.atr" size="27024" crc="0a2e0469" sha1="ae973c2b8f7863ce7b519a2a4dd689ad1a4b20a3" offset="0" />
331331         </dataarea>
r253707r253708
336336      <description>Zorro</description>
337337      <year>1985</year>
338338      <publisher>Datasoft</publisher>
339      <part name="flop1" interface="floppy_5_25">         
339      <part name="flop1" interface="floppy_5_25">
340340         <dataarea name="flop" size="92176">
341341            <rom name="zorro.atr" size="92176" crc="df552763" sha1="c219f6eb373df61e620b40d19aef66f8f03e7356" offset="0" />
342342         </dataarea>
r253707r253708
347347      <description>Alley Cat</description>
348348      <year>1983</year>
349349      <publisher>Synapse</publisher>
350      <part name="flop1" interface="floppy_5_25">         
350      <part name="flop1" interface="floppy_5_25">
351351         <dataarea name="flop" size="65552">
352352            <rom name="alleycat.atr" size="65552" crc="12e2eb0d" sha1="a99e131f024e5df10316860b6d174a16aadc8651" offset="0" />
353353         </dataarea>
r253707r253708
358358      <description>Galahad and the Holy Grail</description>
359359      <year>1982</year>
360360      <publisher>Atari Program Exchange</publisher>
361      <part name="flop1" interface="floppy_5_25">         
361      <part name="flop1" interface="floppy_5_25">
362362         <dataarea name="flop" size="92176">
363363            <rom name="galahad.atr" size="92176" crc="d575a0bb" sha1="9f03ddbd745919e93113daed1117a59751f22ae5" offset="0" />
364364         </dataarea>
trunk/hash/electron_cass.xml
r253707r253708
876876         </dataarea>
877877      </part>
878878   </software>
879   
879
880880   <software name="biology">
881881      <description>Biology</description>
882882      <year>1983</year>
trunk/hash/k28m2.xml
r253707r253708
5252   </software>
5353
5454<!--
55   <software name="m5">
56      <description>Expansion Module 5</description>
57      <year>1987</year>
58      <publisher>Tiger Electronics</publisher>
59      <info name="serial" value="CM62218"/>
60      <part name="cart" interface="k28m2">
61         <dataarea name="rom" size="0x4000">
62            <rom name="cm62217.vsm" size="0x4000" crc="x" sha1="x" offset="0" />
63         </dataarea>
64      </part>
65   </software>
55    <software name="m5">
56        <description>Expansion Module 5</description>
57        <year>1987</year>
58        <publisher>Tiger Electronics</publisher>
59        <info name="serial" value="CM62218"/>
60        <part name="cart" interface="k28m2">
61            <dataarea name="rom" size="0x4000">
62                <rom name="cm62217.vsm" size="0x4000" crc="x" sha1="x" offset="0" />
63            </dataarea>
64        </part>
65    </software>
6666-->
6767
6868   <software name="m6">
trunk/hash/m5_cart.xml
r253707r253708
619619      </part>
620620   </software>
621621
622<!-- Homebrew memory modules --> 
622<!-- Homebrew memory modules -->
623623
624624   <software name="64kbi" supported="no">
625625      <description>EM-64 Expansion memory 64Kb</description>
r253707r253708
645645         </dataarea>
646646      </part>
647647   </software>
648 
648
649649   <software name="64krx" supported="no">
650650      <description>64Krx Expansion board 64Kb</description>
651651      <year>199?</year>
r253707r253708
665665      </part>
666666   </software>
667667
668  <!-- Brno mod ROMs -->
668   <!-- Brno mod ROMs -->
669669
670670   <software name="brno_con" supported="no">
671671      <description>Boot for Brno ramdisk [console version]</description>
r253707r253708
688688         </dataarea>
689689      </part>
690690   </software>
691 
691
692692</softwarelist>
trunk/src/devices/bus/centronics/epson_lx810l.cpp
r253707r253708
132132   MCFG_UPD7810_CO0(WRITELINE(epson_lx810l_t, co0_w))
133133   MCFG_UPD7810_CO1(WRITELINE(epson_lx810l_t, co1_w))
134134
135//   MCFG_DEFAULT_LAYOUT(layout_lx800)
135//  MCFG_DEFAULT_LAYOUT(layout_lx800)
136136
137137   /* video hardware (simulates paper) */
138138   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/devices/bus/m5/slot.cpp
r253707r253708
175175
176176      if (m_type == M5_STD || m_type>2) //carts with roms
177177      {
178
179178         UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
180179
181180         if (size > 0x5000 && m_type == M5_STD)
r253707r253708
190189            fread(m_cart->get_rom_base(), size);
191190         else
192191            memcpy(m_cart->get_rom_base(), get_software_region("rom"), size);
193     
192
194193      }
195194      if (!M5_STD)
196195         if (get_software_region("ram"))
197196            m_cart->ram_alloc(get_software_region_length("ram"));
198     
199197
198
200199      //printf("Type: %s\n", m5_get_slot(m_type));
201200   }
202201
trunk/src/devices/bus/m5/slot.h
r253707r253708
1818};
1919
2020
21#define   M5_STD  0
21#define M5_STD  0
2222
2323
2424// ======================> device_m5_cart_interface
trunk/src/devices/cpu/hphybrid/hphybrid.cpp
r253707r253708
673673                  return RIO(CURRENT_PA , addr_wo_bsc - HP_REG_R4_ADDR);
674674
675675            case HP_REG_IV_ADDR:
676                                        return m_reg_IV;
676                              return m_reg_IV;
677677
678678            case HP_REG_PA_ADDR:
679679                  return CURRENT_PA;
trunk/src/devices/cpu/m6800/6800ops.inc
r253707r253708
23052305   CLR_NZV;
23062306   SET_NZ8(val);
23072307   WM(EAD,val);
2308}
No newline at end of file
2308}
trunk/src/devices/cpu/z80/z80.cpp
r253707r253708
35913591   case Z80_INPUT_LINE_WAIT:
35923592      m_wait_state = state;
35933593      break;
3594   
3594
35953595   default:
35963596      break;
35973597   }
trunk/src/devices/machine/hp_taco.cpp
r253707r253708
148148
149149// Timers
150150enum {
151        TAPE_TMR_ID,
152        HOLE_TMR_ID
151      TAPE_TMR_ID,
152      HOLE_TMR_ID
153153};
154154
155155// Constants
r253707r253708
178178
179179// Parts of command register
180180#define CMD_CODE(reg) \
181        (((reg) >> 10) & 0x1f)
181      (((reg) >> 10) & 0x1f)
182182#define DIR_FWD(reg) \
183        (BIT(reg , 15))
183      (BIT(reg , 15))
184184#define SPEED_FAST(reg) \
185        (BIT(reg , 7))
185      (BIT(reg , 7))
186186#define CMD_OPT(reg) \
187        (BIT(reg , 6))
187      (BIT(reg , 6))
188188#define UNKNOWN_B9(reg) \
189        (BIT(reg , 9))
189      (BIT(reg , 9))
190190#define DIR_FWD_MASK    BIT_MASK(15)    // Direction = forward
191191#define SPEED_FAST_MASK BIT_MASK(7)     // Speed = fast
192192
193193// Commands
194194enum {
195        CMD_INDTA_INGAP,        // 00: scan for data first then for gap
196        CMD_UNK_01,             // 01: unknown
197        CMD_FINAL_GAP,          // 02: write final gap
198        CMD_INIT_WRITE,         // 03: write words for tape formatting
199        CMD_STOP,               // 04: stop
200        CMD_UNK_05,             // 05: unknown
201        CMD_SET_TRACK,          // 06: set A/B track
202        CMD_UNK_07,             // 07: unknown
203        CMD_UNK_08,             // 08: unknown
204        CMD_UNK_09,             // 09: unknown
205        CMD_MOVE,               // 0a: move tape
206        CMD_UNK_0b,             // 0b: unknown
207        CMD_INGAP_MOVE,         // 0c: scan for gap then move a bit further (used to gain some margin when inverting tape movement)
208        CMD_UNK_0d,             // 0d: unknown
209        CMD_CLEAR,              // 0e: clear errors/unlatch status bits
210        CMD_UNK_0f,             // 0f: unknown
211        CMD_NOT_INDTA,          // 10: scan for end of data
212        CMD_UNK_11,             // 11: unknown
213        CMD_UNK_12,             // 12: unknown
214        CMD_UNK_13,             // 13: unknown
215        CMD_UNK_14,             // 14: unknown
216        CMD_UNK_15,             // 15: unknown
217        CMD_WRITE_IRG,          // 16: write inter-record gap
218        CMD_UNK_17,             // 17: unknown
219        CMD_SCAN_RECORDS,       // 18: scan records (count IRGs)
220        CMD_RECORD_WRITE,       // 19: write record words
221        CMD_MOVE_INDTA,         // 1a: move then scan for data
222        CMD_UNK_1b,             // 1b: unknown (for now it seems harmless to handle it as NOP)
223        CMD_DELTA_MOVE_HOLE,    // 1c: move tape a given distance, intr at end or first hole found (whichever comes first)
224        CMD_START_READ,         // 1d: start record reading
225        CMD_DELTA_MOVE_IRG,     // 1e: move tape a given distance, detect gaps in parallel
226        CMD_END_READ            // 1f: stop reading
195      CMD_INDTA_INGAP,        // 00: scan for data first then for gap
196      CMD_UNK_01,             // 01: unknown
197      CMD_FINAL_GAP,          // 02: write final gap
198      CMD_INIT_WRITE,         // 03: write words for tape formatting
199      CMD_STOP,               // 04: stop
200      CMD_UNK_05,             // 05: unknown
201      CMD_SET_TRACK,          // 06: set A/B track
202      CMD_UNK_07,             // 07: unknown
203      CMD_UNK_08,             // 08: unknown
204      CMD_UNK_09,             // 09: unknown
205      CMD_MOVE,               // 0a: move tape
206      CMD_UNK_0b,             // 0b: unknown
207      CMD_INGAP_MOVE,         // 0c: scan for gap then move a bit further (used to gain some margin when inverting tape movement)
208      CMD_UNK_0d,             // 0d: unknown
209      CMD_CLEAR,              // 0e: clear errors/unlatch status bits
210      CMD_UNK_0f,             // 0f: unknown
211      CMD_NOT_INDTA,          // 10: scan for end of data
212      CMD_UNK_11,             // 11: unknown
213      CMD_UNK_12,             // 12: unknown
214      CMD_UNK_13,             // 13: unknown
215      CMD_UNK_14,             // 14: unknown
216      CMD_UNK_15,             // 15: unknown
217      CMD_WRITE_IRG,          // 16: write inter-record gap
218      CMD_UNK_17,             // 17: unknown
219      CMD_SCAN_RECORDS,       // 18: scan records (count IRGs)
220      CMD_RECORD_WRITE,       // 19: write record words
221      CMD_MOVE_INDTA,         // 1a: move then scan for data
222      CMD_UNK_1b,             // 1b: unknown (for now it seems harmless to handle it as NOP)
223      CMD_DELTA_MOVE_HOLE,    // 1c: move tape a given distance, intr at end or first hole found (whichever comes first)
224      CMD_START_READ,         // 1d: start record reading
225      CMD_DELTA_MOVE_IRG,     // 1e: move tape a given distance, detect gaps in parallel
226      CMD_END_READ            // 1f: stop reading
227227};
228228
229229// Bits of status register
r253707r253708
250250// O               O           O           O
251251//
252252static const hp_taco_device::tape_pos_t tape_holes[] = {
253        (hp_taco_device::tape_pos_t)(23.891 * ONE_INCH_POS),    // 24 - 0.218 / 2
254        (hp_taco_device::tape_pos_t)(24.109 * ONE_INCH_POS),    // 24 + 0.218 / 2
255        (hp_taco_device::tape_pos_t)(35.891 * ONE_INCH_POS),    // 36 - 0.218 / 2
256        (hp_taco_device::tape_pos_t)(36.109 * ONE_INCH_POS),    // 36 + 0.218 / 2
257        (hp_taco_device::tape_pos_t)(47.891 * ONE_INCH_POS),    // 48 - 0.218 / 2
258        (hp_taco_device::tape_pos_t)(48.109 * ONE_INCH_POS),    // 48 + 0.218 / 2
259        72 * ONE_INCH_POS,      // 72
260        1752 * ONE_INCH_POS,    // 1752
261        1776 * ONE_INCH_POS,    // 1776
262        1788 * ONE_INCH_POS,    // 1788
263        1800 * ONE_INCH_POS     // 1800
253      (hp_taco_device::tape_pos_t)(23.891 * ONE_INCH_POS),    // 24 - 0.218 / 2
254      (hp_taco_device::tape_pos_t)(24.109 * ONE_INCH_POS),    // 24 + 0.218 / 2
255      (hp_taco_device::tape_pos_t)(35.891 * ONE_INCH_POS),    // 36 - 0.218 / 2
256      (hp_taco_device::tape_pos_t)(36.109 * ONE_INCH_POS),    // 36 + 0.218 / 2
257      (hp_taco_device::tape_pos_t)(47.891 * ONE_INCH_POS),    // 48 - 0.218 / 2
258      (hp_taco_device::tape_pos_t)(48.109 * ONE_INCH_POS),    // 48 + 0.218 / 2
259      72 * ONE_INCH_POS,      // 72
260      1752 * ONE_INCH_POS,    // 1752
261      1776 * ONE_INCH_POS,    // 1776
262      1788 * ONE_INCH_POS,    // 1788
263      1800 * ONE_INCH_POS     // 1800
264264};
265265
266266// Device type definition
r253707r253708
268268
269269// Constructors
270270hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
271        : device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
272          device_image_interface(mconfig , *this),
273          m_irq_handler(*this),
274          m_flg_handler(*this),
275          m_sts_handler(*this),
276          m_tape_pos(TAPE_INIT_POS),
277          m_image_dirty(false)
271      : device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
272         device_image_interface(mconfig , *this),
273         m_irq_handler(*this),
274         m_flg_handler(*this),
275         m_sts_handler(*this),
276         m_tape_pos(TAPE_INIT_POS),
277         m_image_dirty(false)
278278{
279        clear_state();
279      clear_state();
280280}
281281
282282hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
283        : device_t(mconfig, HP_TACO, "HP TACO", tag, owner, clock, "TACO", __FILE__),
284          device_image_interface(mconfig , *this),
285          m_irq_handler(*this),
286          m_flg_handler(*this),
287          m_sts_handler(*this),
288          m_tape_pos(TAPE_INIT_POS),
289          m_image_dirty(false)
283      : device_t(mconfig, HP_TACO, "HP TACO", tag, owner, clock, "TACO", __FILE__),
284         device_image_interface(mconfig , *this),
285         m_irq_handler(*this),
286         m_flg_handler(*this),
287         m_sts_handler(*this),
288         m_tape_pos(TAPE_INIT_POS),
289         m_image_dirty(false)
290290{
291        clear_state();
291      clear_state();
292292}
293293
294294WRITE16_MEMBER(hp_taco_device::reg_w)
295295{
296        LOG_0(("wr R%u = %04x\n", 4 + offset , data));
296      LOG_0(("wr R%u = %04x\n", 4 + offset , data));
297297
298        // Any I/O activity clears IRQ
299        irq_w(false);
298      // Any I/O activity clears IRQ
299      irq_w(false);
300300
301        switch (offset) {
302        case 0:
303                // Data register
304                m_data_reg = data;
305                m_data_reg_full = true;
306                break;
301      switch (offset) {
302      case 0:
303            // Data register
304            m_data_reg = data;
305            m_data_reg_full = true;
306            break;
307307
308        case 1:
309                // Command register
310                start_cmd_exec(data & CMD_REG_MASK);
311                break;
308      case 1:
309            // Command register
310            start_cmd_exec(data & CMD_REG_MASK);
311            break;
312312
313        case 2:
314                // Tachometer register
315                m_tach_reg = data;
316                break;
313      case 2:
314            // Tachometer register
315            m_tach_reg = data;
316            break;
317317
318        case 3:
319                // Timing register
320                m_timing_reg = data;
321                break;
322        }
318      case 3:
319            // Timing register
320            m_timing_reg = data;
321            break;
322      }
323323}
324324
325325READ16_MEMBER(hp_taco_device::reg_r)
326326{
327        UINT16 res = 0;
327      UINT16 res = 0;
328328
329        // Any I/O activity clears IRQ
330        irq_w(false);
329      // Any I/O activity clears IRQ
330      irq_w(false);
331331
332        switch (offset) {
333        case 0:
334                // Data register
335                res = m_data_reg;
336                break;
332      switch (offset) {
333      case 0:
334            // Data register
335            res = m_data_reg;
336            break;
337337
338        case 1:
339                // Command & status register
340                res = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
341                break;
338      case 1:
339            // Command & status register
340            res = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
341            break;
342342
343        case 2:
344                // Tachometer register
345                res = m_tach_reg;
346                break;
343      case 2:
344            // Tachometer register
345            res = m_tach_reg;
346            break;
347347
348        case 3:
349                // Checksum register: it clears when read
350                res = m_checksum_reg;
351                m_checksum_reg = 0;
352                break;
353        }
348      case 3:
349            // Checksum register: it clears when read
350            res = m_checksum_reg;
351            m_checksum_reg = 0;
352            break;
353      }
354354
355        LOG_0(("rd R%u = %04x\n", 4 + offset , res));
355      LOG_0(("rd R%u = %04x\n", 4 + offset , res));
356356
357        return res;
357      return res;
358358}
359359
360360READ_LINE_MEMBER(hp_taco_device::flg_r)
361361{
362        return m_flg;
362      return m_flg;
363363}
364364
365365READ_LINE_MEMBER(hp_taco_device::sts_r)
366366{
367        return m_sts;
367      return m_sts;
368368}
369369
370370// device_config_complete
371371void hp_taco_device::device_config_complete()
372372{
373        LOG(("device_config_complete"));
373      LOG(("device_config_complete"));
374374   update_names();
375375}
376376
377377// device_start
378378void hp_taco_device::device_start()
379379{
380        LOG(("device_start"));
381        m_irq_handler.resolve_safe();
382        m_flg_handler.resolve_safe();
383        m_sts_handler.resolve_safe();
380      LOG(("device_start"));
381      m_irq_handler.resolve_safe();
382      m_flg_handler.resolve_safe();
383      m_sts_handler.resolve_safe();
384384
385        save_item(NAME(m_data_reg));
386        save_item(NAME(m_data_reg_full));
387        save_item(NAME(m_cmd_reg));
388        save_item(NAME(m_cmd_state));
389        save_item(NAME(m_status_reg));
390        save_item(NAME(m_tach_reg));
391        save_item(NAME(m_checksum_reg));
392        save_item(NAME(m_timing_reg));
393        save_item(NAME(m_irq));
394        save_item(NAME(m_flg));
395        save_item(NAME(m_sts));
396        save_item(NAME(m_tape_pos));
397        save_item(NAME(m_start_time));
398        save_item(NAME(m_tape_fwd));
399        save_item(NAME(m_tape_fast));
400        save_item(NAME(m_image_dirty));
401        save_item(NAME(m_tape_wr));
402        save_item(NAME(m_rw_pos));
403        save_item(NAME(m_next_word));
404        save_item(NAME(m_rd_it_valid));
405        save_item(NAME(m_gap_detect_start));
385      save_item(NAME(m_data_reg));
386      save_item(NAME(m_data_reg_full));
387      save_item(NAME(m_cmd_reg));
388      save_item(NAME(m_cmd_state));
389      save_item(NAME(m_status_reg));
390      save_item(NAME(m_tach_reg));
391      save_item(NAME(m_checksum_reg));
392      save_item(NAME(m_timing_reg));
393      save_item(NAME(m_irq));
394      save_item(NAME(m_flg));
395      save_item(NAME(m_sts));
396      save_item(NAME(m_tape_pos));
397      save_item(NAME(m_start_time));
398      save_item(NAME(m_tape_fwd));
399      save_item(NAME(m_tape_fast));
400      save_item(NAME(m_image_dirty));
401      save_item(NAME(m_tape_wr));
402      save_item(NAME(m_rw_pos));
403      save_item(NAME(m_next_word));
404      save_item(NAME(m_rd_it_valid));
405      save_item(NAME(m_gap_detect_start));
406406
407        m_tape_timer = timer_alloc(TAPE_TMR_ID);
408        m_hole_timer = timer_alloc(HOLE_TMR_ID);
407      m_tape_timer = timer_alloc(TAPE_TMR_ID);
408      m_hole_timer = timer_alloc(HOLE_TMR_ID);
409409}
410410
411411// device_stop
r253707r253708
416416// device_reset
417417void hp_taco_device::device_reset()
418418{
419        LOG(("device_reset"));
420        clear_state();
419      LOG(("device_reset"));
420      clear_state();
421421
422        m_irq = false;
423        m_flg = true;
422      m_irq = false;
423      m_flg = true;
424424
425        m_irq_handler(false);
426        m_flg_handler(true);
427        set_error(false);
425      m_irq_handler(false);
426      m_flg_handler(true);
427      set_error(false);
428428}
429429
430430void hp_taco_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
431431{
432        if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
433                update_tape_pos();
434        }
432      if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
433            update_tape_pos();
434      }
435435
436        switch (id) {
437        case TAPE_TMR_ID:
438                LOG_0(("Tape tmr @%g\n" , machine().time().as_double()));
436      switch (id) {
437      case TAPE_TMR_ID:
438            LOG_0(("Tape tmr @%g\n" , machine().time().as_double()));
439439
440                tape_pos_t length;
440            tape_pos_t length;
441441
442                switch (CMD_CODE(m_cmd_reg)) {
443                case CMD_INDTA_INGAP:
444                        if (m_cmd_state == 0) {
445                                m_cmd_state = 1;
446                                tape_pos_t target = m_tape_pos;
447                                if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
448                                        m_tape_timer->adjust(time_to_target(target));
449                                }
450                                return;
451                        }
452                        break;
442            switch (CMD_CODE(m_cmd_reg)) {
443            case CMD_INDTA_INGAP:
444                  if (m_cmd_state == 0) {
445                        m_cmd_state = 1;
446                        tape_pos_t target = m_tape_pos;
447                        if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
448                              m_tape_timer->adjust(time_to_target(target));
449                        }
450                        return;
451                  }
452                  break;
453453
454                case CMD_RECORD_WRITE:
455                        if (m_cmd_state == 0) {
456                                if (m_rd_it->second == PREAMBLE_WORD) {
457                                        LOG_0(("Got preamble\n"));
458                                        m_cmd_state = 1;
459                                        // m_rw_pos already at correct position
460                                        m_tape_timer->adjust(fetch_next_wr_word());
461                                        break;
462                                } else {
463                                        adv_res_t res = adv_it(m_rd_it);
464                                        if (res != ADV_NO_MORE_DATA) {
465                                                m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
466                                        }
467                                        // No IRQ
468                                        return;
469                                }
470                        }
471                        // Intentional fall-through
472                case CMD_INIT_WRITE:
473                        write_word(m_rw_pos , m_next_word , length);
474                        pos_offset(m_rw_pos , length);
475                        // Just to be sure..
476                        m_tape_pos = m_rw_pos;
477                        m_tape_timer->adjust(fetch_next_wr_word());
478                        break;
454            case CMD_RECORD_WRITE:
455                  if (m_cmd_state == 0) {
456                        if (m_rd_it->second == PREAMBLE_WORD) {
457                              LOG_0(("Got preamble\n"));
458                              m_cmd_state = 1;
459                              // m_rw_pos already at correct position
460                              m_tape_timer->adjust(fetch_next_wr_word());
461                              break;
462                        } else {
463                              adv_res_t res = adv_it(m_rd_it);
464                              if (res != ADV_NO_MORE_DATA) {
465                                    m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
466                              }
467                              // No IRQ
468                              return;
469                        }
470                  }
471                  // Intentional fall-through
472            case CMD_INIT_WRITE:
473                  write_word(m_rw_pos , m_next_word , length);
474                  pos_offset(m_rw_pos , length);
475                  // Just to be sure..
476                  m_tape_pos = m_rw_pos;
477                  m_tape_timer->adjust(fetch_next_wr_word());
478                  break;
479479
480                case CMD_STOP:
481                        move_tape_pos(m_tape_fast ? FAST_BRAKE_DIST : SLOW_BRAKE_DIST);
482                        stop_tape();
483                        break;
480            case CMD_STOP:
481                  move_tape_pos(m_tape_fast ? FAST_BRAKE_DIST : SLOW_BRAKE_DIST);
482                  stop_tape();
483                  break;
484484
485                case CMD_INGAP_MOVE:
486                        if (m_cmd_state == 0) {
487                                m_cmd_state = 1;
488                                m_tape_timer->adjust(time_to_tach_pulses());
489                                return;
490                        }
491                        break;
485            case CMD_INGAP_MOVE:
486                  if (m_cmd_state == 0) {
487                        m_cmd_state = 1;
488                        m_tape_timer->adjust(time_to_tach_pulses());
489                        return;
490                  }
491                  break;
492492
493                case CMD_FINAL_GAP:
494                case CMD_WRITE_IRG:
495                        write_gap(m_rw_pos , m_tape_pos);
496                        m_hole_timer->reset();
497                        break;
493            case CMD_FINAL_GAP:
494            case CMD_WRITE_IRG:
495                  write_gap(m_rw_pos , m_tape_pos);
496                  m_hole_timer->reset();
497                  break;
498498
499                case CMD_SCAN_RECORDS:
500                        if (m_cmd_state == 0) {
501                                m_cmd_state = 1;
502                                tape_pos_t target = m_tape_pos;
503                                if (next_n_gap(target, 0x10000U - m_tach_reg, MIN_IRG_LENGTH)) {
504                                        LOG_0(("%u gaps @%d\n" , 0x10000U - m_tach_reg, target));
505                                        m_tape_timer->adjust(time_to_target(target));
506                                }
507                                return;
508                        } else {
509                                m_hole_timer->reset();
510                        }
511                        break;
499            case CMD_SCAN_RECORDS:
500                  if (m_cmd_state == 0) {
501                        m_cmd_state = 1;
502                        tape_pos_t target = m_tape_pos;
503                        if (next_n_gap(target, 0x10000U - m_tach_reg, MIN_IRG_LENGTH)) {
504                              LOG_0(("%u gaps @%d\n" , 0x10000U - m_tach_reg, target));
505                              m_tape_timer->adjust(time_to_target(target));
506                        }
507                        return;
508                  } else {
509                        m_hole_timer->reset();
510                  }
511                  break;
512512
513                case CMD_MOVE_INDTA:
514                        if (m_cmd_state == 0) {
515                                if (next_data(m_rd_it , m_tape_pos , true)) {
516                                        m_cmd_state = 1;
517                                        m_tape_timer->adjust(time_to_target(farthest_end(m_rd_it)));
518                                }
519                                // No IRQ
520                                return;
521                        }
522                        // m_cmd_state == 1 -> IRQ & cmd end
523                        break;
513            case CMD_MOVE_INDTA:
514                  if (m_cmd_state == 0) {
515                        if (next_data(m_rd_it , m_tape_pos , true)) {
516                              m_cmd_state = 1;
517                              m_tape_timer->adjust(time_to_target(farthest_end(m_rd_it)));
518                        }
519                        // No IRQ
520                        return;
521                  }
522                  // m_cmd_state == 1 -> IRQ & cmd end
523                  break;
524524
525                case CMD_DELTA_MOVE_HOLE:
526                case CMD_DELTA_MOVE_IRG:
527                        // Interrupt at end of movement
528                        m_hole_timer->reset();
529                        break;
525            case CMD_DELTA_MOVE_HOLE:
526            case CMD_DELTA_MOVE_IRG:
527                  // Interrupt at end of movement
528                  m_hole_timer->reset();
529                  break;
530530
531                case CMD_START_READ:
532                        {
533                                bool set_intr = true;
534                                // Just to be sure..
535                                m_tape_pos = m_rw_pos;
536                                if (m_cmd_state == 0) {
537                                        set_intr = false;
538                                        if (m_rd_it->second == PREAMBLE_WORD) {
539                                                m_cmd_state = 1;
540                                        }
541                                        LOG_0(("Got preamble\n"));
542                                } else {
543                                        m_data_reg = m_rd_it->second;
544                                        m_checksum_reg += m_data_reg;
545                                        LOG_0(("RD %04x\n" , m_data_reg));
546                                }
547                                adv_res_t res = adv_it(m_rd_it);
548                                LOG_0(("adv_it %d\n" , res));
549                                if (res == ADV_NO_MORE_DATA) {
550                                        m_rd_it_valid = false;
551                                } else {
552                                        if (res == ADV_DISCONT_DATA) {
553                                                // Hit a gap, restart preamble search
554                                                m_cmd_state = 0;
555                                        }
556                                        m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
557                                }
558                                if (!set_intr) {
559                                        return;
560                                }
561                        }
562                        break;
531            case CMD_START_READ:
532                  {
533                        bool set_intr = true;
534                        // Just to be sure..
535                        m_tape_pos = m_rw_pos;
536                        if (m_cmd_state == 0) {
537                              set_intr = false;
538                              if (m_rd_it->second == PREAMBLE_WORD) {
539                                    m_cmd_state = 1;
540                              }
541                              LOG_0(("Got preamble\n"));
542                        } else {
543                              m_data_reg = m_rd_it->second;
544                              m_checksum_reg += m_data_reg;
545                              LOG_0(("RD %04x\n" , m_data_reg));
546                        }
547                        adv_res_t res = adv_it(m_rd_it);
548                        LOG_0(("adv_it %d\n" , res));
549                        if (res == ADV_NO_MORE_DATA) {
550                              m_rd_it_valid = false;
551                        } else {
552                              if (res == ADV_DISCONT_DATA) {
553                                    // Hit a gap, restart preamble search
554                                    m_cmd_state = 0;
555                              }
556                              m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
557                        }
558                        if (!set_intr) {
559                              return;
560                        }
561                  }
562                  break;
563563
564                case CMD_END_READ:
565                        {
566                                m_tape_pos = m_rw_pos;
567                                // Note: checksum is not updated
568                                m_data_reg = m_rd_it->second;
569                                LOG_0(("Final RD %04x\n" , m_data_reg));
570                                adv_res_t res = adv_it(m_rd_it);
571                                if (res == ADV_NO_MORE_DATA) {
572                                        m_rd_it_valid = false;
573                                }
574                                m_hole_timer->reset();
575                        }
576                        break;
564            case CMD_END_READ:
565                  {
566                        m_tape_pos = m_rw_pos;
567                        // Note: checksum is not updated
568                        m_data_reg = m_rd_it->second;
569                        LOG_0(("Final RD %04x\n" , m_data_reg));
570                        adv_res_t res = adv_it(m_rd_it);
571                        if (res == ADV_NO_MORE_DATA) {
572                              m_rd_it_valid = false;
573                        }
574                        m_hole_timer->reset();
575                  }
576                  break;
577577
578                default:
579                        // Other commands: just raise irq
580                        break;
581                }
582                irq_w(true);
583                break;
578            default:
579                  // Other commands: just raise irq
580                  break;
581            }
582            irq_w(true);
583            break;
584584
585        case HOLE_TMR_ID:
586                LOG_0(("Hole tmr @%g\n" , machine().time().as_double()));
585      case HOLE_TMR_ID:
586            LOG_0(("Hole tmr @%g\n" , machine().time().as_double()));
587587
588                BIT_SET(m_status_reg , STATUS_HOLE_BIT);
588            BIT_SET(m_status_reg , STATUS_HOLE_BIT);
589589
590                switch (CMD_CODE(m_cmd_reg)) {
591                case CMD_FINAL_GAP:
592                case CMD_WRITE_IRG:
593                        write_gap(m_rw_pos , m_tape_pos);
594                        m_rw_pos = m_tape_pos;
595                        break;
590            switch (CMD_CODE(m_cmd_reg)) {
591            case CMD_FINAL_GAP:
592            case CMD_WRITE_IRG:
593                  write_gap(m_rw_pos , m_tape_pos);
594                  m_rw_pos = m_tape_pos;
595                  break;
596596
597                case CMD_SCAN_RECORDS:
598                case CMD_DELTA_MOVE_HOLE:
599                        // Cmds 18 & 1c are terminated at first hole
600                        m_tape_timer->reset();
601                        irq_w(true);
602                        // No reloading of hole timer
603                        return;
597            case CMD_SCAN_RECORDS:
598            case CMD_DELTA_MOVE_HOLE:
599                  // Cmds 18 & 1c are terminated at first hole
600                  m_tape_timer->reset();
601                  irq_w(true);
602                  // No reloading of hole timer
603                  return;
604604
605                case CMD_DELTA_MOVE_IRG:
606                        // TODO: update r6
607                        m_hole_timer->adjust(time_to_next_hole());
608                        // No IRQ at holes
609                        return;
605            case CMD_DELTA_MOVE_IRG:
606                  // TODO: update r6
607                  m_hole_timer->adjust(time_to_next_hole());
608                  // No IRQ at holes
609                  return;
610610
611                case CMD_START_READ:
612                case CMD_END_READ:
613                        set_error(true);
614                        break;
611            case CMD_START_READ:
612            case CMD_END_READ:
613                  set_error(true);
614                  break;
615615
616                default:
617                        // Other cmds: default processing (update tape pos, set IRQ, schedule timer for next hole)
618                        break;
619                }
616            default:
617                  // Other cmds: default processing (update tape pos, set IRQ, schedule timer for next hole)
618                  break;
619            }
620620
621                irq_w(true);
622                m_hole_timer->adjust(time_to_next_hole());
623                break;
621            irq_w(true);
622            m_hole_timer->adjust(time_to_next_hole());
623            break;
624624
625        default:
626                break;
627        }
625      default:
626            break;
627      }
628628}
629629
630630void hp_taco_device::clear_state(void)
631631{
632        m_data_reg = 0;
633        m_data_reg_full = false;
634        m_cmd_reg = 0;
635        m_status_reg = 0;
636        m_tach_reg = 0;
637        m_checksum_reg = 0;
638        m_timing_reg = 0;
639        m_cmd_state = 0;
640        // m_tape_pos is not reset, tape stays where it is
641        m_start_time = attotime::never;
642        m_tape_fwd = false;
643        m_tape_fast = false;
644        // m_image_dirty is not touched
645        m_tape_wr = false;
646        m_rw_pos = 0;
647        m_next_word = 0;
648        m_rd_it_valid = false;
649        m_gap_detect_start = NULL_TAPE_POS;
632      m_data_reg = 0;
633      m_data_reg_full = false;
634      m_cmd_reg = 0;
635      m_status_reg = 0;
636      m_tach_reg = 0;
637      m_checksum_reg = 0;
638      m_timing_reg = 0;
639      m_cmd_state = 0;
640      // m_tape_pos is not reset, tape stays where it is
641      m_start_time = attotime::never;
642      m_tape_fwd = false;
643      m_tape_fast = false;
644      // m_image_dirty is not touched
645      m_tape_wr = false;
646      m_rw_pos = 0;
647      m_next_word = 0;
648      m_rd_it_valid = false;
649      m_gap_detect_start = NULL_TAPE_POS;
650650
651        set_tape_present(false);
652        set_tape_present(is_loaded());
651      set_tape_present(false);
652      set_tape_present(is_loaded());
653653}
654654
655655void hp_taco_device::irq_w(bool state)
656656{
657        if (state != m_irq) {
658                m_irq = state;
659                m_irq_handler(state);
660                LOG_0(("IRQ = %d\n" , state));
661        }
657      if (state != m_irq) {
658            m_irq = state;
659            m_irq_handler(state);
660            LOG_0(("IRQ = %d\n" , state));
661      }
662662}
663663
664664void hp_taco_device::set_error(bool state)
665665{
666        m_sts = !state;
667        m_sts_handler(m_sts);
668        LOG_0(("error = %d\n" , state));
666      m_sts = !state;
667      m_sts_handler(m_sts);
668      LOG_0(("error = %d\n" , state));
669669}
670670
671671unsigned hp_taco_device::speed_to_tick_freq(void) const
672672{
673        return m_tape_fast ? TACH_FREQ_FAST * TAPE_POS_FRACT : TACH_FREQ_SLOW * TAPE_POS_FRACT;
673      return m_tape_fast ? TACH_FREQ_FAST * TAPE_POS_FRACT : TACH_FREQ_SLOW * TAPE_POS_FRACT;
674674}
675675
676676bool hp_taco_device::pos_offset(tape_pos_t& pos , tape_pos_t offset) const
677677{
678        if (offset == 0) {
679                return true;
680        }
678      if (offset == 0) {
679            return true;
680      }
681681
682        if (!m_tape_fwd) {
683                offset = -offset;
684        }
682      if (!m_tape_fwd) {
683            offset = -offset;
684      }
685685
686        pos += offset;
686      pos += offset;
687687
688        // In real life tape would unspool..
689        if (pos > TAPE_LENGTH) {
690                pos = TAPE_LENGTH;
691                return false;
692        } else if (pos < 0) {
693                pos = 0;
694                return false;
695        } else {
696                return true;
697        }
688      // In real life tape would unspool..
689      if (pos > TAPE_LENGTH) {
690            pos = TAPE_LENGTH;
691            return false;
692      } else if (pos < 0) {
693            pos = 0;
694            return false;
695      } else {
696            return true;
697      }
698698}
699699
700700void hp_taco_device::move_tape_pos(tape_pos_t delta_pos)
701701{
702        tape_pos_t tape_start_pos = m_tape_pos;
703        if (!pos_offset(m_tape_pos , delta_pos)) {
704                LOG(("Tape unspooled!\n"));
705        }
706        m_start_time = machine().time();
707        LOG_0(("Tape pos = %u\n" , m_tape_pos));
708        if (any_hole(tape_start_pos , m_tape_pos)) {
709                // Crossed one or more holes
710                BIT_SET(m_status_reg , STATUS_HOLE_BIT);
711        }
702      tape_pos_t tape_start_pos = m_tape_pos;
703      if (!pos_offset(m_tape_pos , delta_pos)) {
704            LOG(("Tape unspooled!\n"));
705      }
706      m_start_time = machine().time();
707      LOG_0(("Tape pos = %u\n" , m_tape_pos));
708      if (any_hole(tape_start_pos , m_tape_pos)) {
709            // Crossed one or more holes
710            BIT_SET(m_status_reg , STATUS_HOLE_BIT);
711      }
712712}
713713
714714void hp_taco_device::update_tape_pos(void)
715715{
716        if (m_start_time.is_never()) {
717                // Tape not moving
718                return;
719        }
716      if (m_start_time.is_never()) {
717            // Tape not moving
718            return;
719      }
720720
721        attotime delta_time(machine().time() - m_start_time);
722        LOG_0(("delta_time = %g\n" , delta_time.as_double()));
723        // How many tachometer ticks has the tape moved?
724        tape_pos_t delta_tach = (tape_pos_t)(delta_time.as_ticks(speed_to_tick_freq()));
725        LOG_0(("delta_tach = %u\n" , delta_tach));
721      attotime delta_time(machine().time() - m_start_time);
722      LOG_0(("delta_time = %g\n" , delta_time.as_double()));
723      // How many tachometer ticks has the tape moved?
724      tape_pos_t delta_tach = (tape_pos_t)(delta_time.as_ticks(speed_to_tick_freq()));
725      LOG_0(("delta_tach = %u\n" , delta_tach));
726726
727        move_tape_pos(delta_tach);
727      move_tape_pos(delta_tach);
728728
729        // Gap detection
730        bool gap_detected = false;
731        if (m_gap_detect_start != NULL_TAPE_POS && abs(m_gap_detect_start - m_tape_pos) >= MIN_IRG_LENGTH) {
732                tape_pos_t tmp = m_tape_pos;
733                pos_offset(tmp , -MIN_IRG_LENGTH);
734                gap_detected = just_gap(tmp , m_tape_pos);
735        }
736        if (gap_detected) {
737                BIT_SET(m_status_reg, STATUS_GAP_BIT);
738        } else {
739                BIT_CLR(m_status_reg, STATUS_GAP_BIT);
740        }
729      // Gap detection
730      bool gap_detected = false;
731      if (m_gap_detect_start != NULL_TAPE_POS && abs(m_gap_detect_start - m_tape_pos) >= MIN_IRG_LENGTH) {
732            tape_pos_t tmp = m_tape_pos;
733            pos_offset(tmp , -MIN_IRG_LENGTH);
734            gap_detected = just_gap(tmp , m_tape_pos);
735      }
736      if (gap_detected) {
737            BIT_SET(m_status_reg, STATUS_GAP_BIT);
738      } else {
739            BIT_CLR(m_status_reg, STATUS_GAP_BIT);
740      }
741741}
742742
743743void hp_taco_device::ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b)
744744{
745        if (a > b) {
746                // Ensure A always comes before B
747                tape_pos_t tmp;
748                tmp = a;
749                a = b;
750                b = tmp;
751        }
745      if (a > b) {
746            // Ensure A always comes before B
747            tape_pos_t tmp;
748            tmp = a;
749            a = b;
750            b = tmp;
751      }
752752}
753753
754754// Is there any hole in a given section of tape?
755755bool hp_taco_device::any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b)
756756{
757        ensure_a_lt_b(tape_pos_a , tape_pos_b);
757      ensure_a_lt_b(tape_pos_a , tape_pos_b);
758758
759        for (tape_pos_t hole : tape_holes) {
760                if (tape_pos_a < hole && tape_pos_b >= hole) {
761                        return true;
762                }
763        }
759      for (tape_pos_t hole : tape_holes) {
760            if (tape_pos_a < hole && tape_pos_b >= hole) {
761                  return true;
762            }
763      }
764764
765        return false;
765      return false;
766766}
767767
768768// Position of next hole tape will reach in a given direction
769769hp_taco_device::tape_pos_t hp_taco_device::next_hole(void) const
770770{
771        if (m_tape_fwd) {
772                for (tape_pos_t hole : tape_holes) {
773                        if (hole > m_tape_pos) {
774                                LOG_0(("next hole fwd @%u = %u\n" , m_tape_pos , hole));
775                                return hole;
776                        }
777                }
778                // No more holes: will hit end of tape
779                return TAPE_LENGTH;
780        } else {
781                for (int i = (sizeof(tape_holes) / sizeof(tape_holes[ 0 ])) - 1; i >= 0; i--) {
782                        if (tape_holes[ i ] < m_tape_pos) {
783                                LOG_0(("next hole rev @%u = %u\n" , m_tape_pos , tape_holes[ i ]));
784                                return tape_holes[ i ];
785                        }
786                }
787                // No more holes: will hit start of tape
788                return 0;
789        }
771      if (m_tape_fwd) {
772            for (tape_pos_t hole : tape_holes) {
773                  if (hole > m_tape_pos) {
774                        LOG_0(("next hole fwd @%u = %u\n" , m_tape_pos , hole));
775                        return hole;
776                  }
777            }
778            // No more holes: will hit end of tape
779            return TAPE_LENGTH;
780      } else {
781            for (int i = (sizeof(tape_holes) / sizeof(tape_holes[ 0 ])) - 1; i >= 0; i--) {
782                  if (tape_holes[ i ] < m_tape_pos) {
783                        LOG_0(("next hole rev @%u = %u\n" , m_tape_pos , tape_holes[ i ]));
784                        return tape_holes[ i ];
785                  }
786            }
787            // No more holes: will hit start of tape
788            return 0;
789      }
790790}
791791
792792attotime hp_taco_device::time_to_distance(tape_pos_t distance) const
793793{
794        // +1 for rounding
795        return attotime::from_ticks(distance + 1 , speed_to_tick_freq());
794      // +1 for rounding
795      return attotime::from_ticks(distance + 1 , speed_to_tick_freq());
796796}
797797
798798attotime hp_taco_device::time_to_target(tape_pos_t target) const
799799{
800        return time_to_distance(abs(target - m_tape_pos));
800      return time_to_distance(abs(target - m_tape_pos));
801801}
802802
803803bool hp_taco_device::start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0)
804804{
805        m_cmd_reg = cmd_reg;
805      m_cmd_reg = cmd_reg;
806806
807        UINT16 to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
808        // Bits in STATUS_ERR_MASK must always be 0
809        must_be_0 |= STATUS_ERR_MASK;
807      UINT16 to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
808      // Bits in STATUS_ERR_MASK must always be 0
809      must_be_0 |= STATUS_ERR_MASK;
810810
811        // It's not an error if the error state is already set (sts false)
812        if (((to_be_tested & (must_be_1 | must_be_0)) ^ must_be_1) != 0) {
813                set_error(true);
814                return false;
815        } else {
816                bool prev_tape_wr = m_tape_wr;
817                bool prev_tape_fwd = m_tape_fwd;
818                bool prev_tape_fast = m_tape_fast;
819                bool not_moving = m_start_time.is_never();
811      // It's not an error if the error state is already set (sts false)
812      if (((to_be_tested & (must_be_1 | must_be_0)) ^ must_be_1) != 0) {
813            set_error(true);
814            return false;
815      } else {
816            bool prev_tape_wr = m_tape_wr;
817            bool prev_tape_fwd = m_tape_fwd;
818            bool prev_tape_fast = m_tape_fast;
819            bool not_moving = m_start_time.is_never();
820820
821                m_start_time = machine().time();
822                m_tape_wr = (must_be_0 & STATUS_WPR_MASK) != 0;
823                m_tape_fwd = DIR_FWD(m_cmd_reg);
824                m_tape_fast = SPEED_FAST(m_cmd_reg);
825                // TODO: remove?
826                BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
821            m_start_time = machine().time();
822            m_tape_wr = (must_be_0 & STATUS_WPR_MASK) != 0;
823            m_tape_fwd = DIR_FWD(m_cmd_reg);
824            m_tape_fast = SPEED_FAST(m_cmd_reg);
825            // TODO: remove?
826            BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
827827
828                if (m_tape_wr) {
829                        // Write command: disable gap detector
830                        m_gap_detect_start = NULL_TAPE_POS;
831                        BIT_CLR(m_status_reg, STATUS_GAP_BIT);
832                        m_image_dirty = true;
833                } else if (not_moving || prev_tape_wr != m_tape_wr || prev_tape_fwd != m_tape_fwd || prev_tape_fast != m_tape_fast) {
834                        // Tape started right now, switched from writing to reading, direction changed or speed changed: (re)start gap detector
835                        m_gap_detect_start = m_tape_pos;
836                        BIT_CLR(m_status_reg, STATUS_GAP_BIT);
837                }
838                return true;
839        }
828            if (m_tape_wr) {
829                  // Write command: disable gap detector
830                  m_gap_detect_start = NULL_TAPE_POS;
831                  BIT_CLR(m_status_reg, STATUS_GAP_BIT);
832                  m_image_dirty = true;
833            } else if (not_moving || prev_tape_wr != m_tape_wr || prev_tape_fwd != m_tape_fwd || prev_tape_fast != m_tape_fast) {
834                  // Tape started right now, switched from writing to reading, direction changed or speed changed: (re)start gap detector
835                  m_gap_detect_start = m_tape_pos;
836                  BIT_CLR(m_status_reg, STATUS_GAP_BIT);
837            }
838            return true;
839      }
840840}
841841
842842void hp_taco_device::stop_tape(void)
843843{
844        m_start_time = attotime::never;
845        m_gap_detect_start = NULL_TAPE_POS;
844      m_start_time = attotime::never;
845      m_gap_detect_start = NULL_TAPE_POS;
846846}
847847
848848hp_taco_device::tape_track_t& hp_taco_device::current_track(void)
849849{
850        return m_tracks[ BIT(m_status_reg , STATUS_TRACKB_BIT) ];
850      return m_tracks[ BIT(m_status_reg , STATUS_TRACKB_BIT) ];
851851}
852852
853853// Return physical length of a 16-bit word on tape
854854hp_taco_device::tape_pos_t hp_taco_device::word_length(tape_word_t w)
855855{
856        unsigned zeros , ones;
856      unsigned zeros , ones;
857857
858        // pop count of w
859        ones = (w & 0x5555) + ((w >> 1) & 0x5555);
860        ones = (ones & 0x3333) + ((ones >> 2) & 0x3333);
861        ones = (ones & 0x0f0f) + ((ones >> 4) & 0x0f0f);
862        ones = (ones & 0x00ff) + ((ones >> 8) & 0x00ff);
858      // pop count of w
859      ones = (w & 0x5555) + ((w >> 1) & 0x5555);
860      ones = (ones & 0x3333) + ((ones >> 2) & 0x3333);
861      ones = (ones & 0x0f0f) + ((ones >> 4) & 0x0f0f);
862      ones = (ones & 0x00ff) + ((ones >> 8) & 0x00ff);
863863
864        zeros = 16 - ones;
864      zeros = 16 - ones;
865865
866        return zeros * ZERO_BIT_LEN + (ones + 1) * ONE_BIT_LEN;
866      return zeros * ZERO_BIT_LEN + (ones + 1) * ONE_BIT_LEN;
867867}
868868
869869hp_taco_device::tape_pos_t hp_taco_device::word_end_pos(const tape_track_t::iterator& it)
870870{
871    return it->first + word_length(it->second);
871   return it->first + word_length(it->second);
872872}
873873
874874void hp_taco_device::adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos)
875875{
876        if (it != track.begin()) {
877                it--;
878                if (word_end_pos(it) <= pos) {
879                        it++;
880                }
881        }
876      if (it != track.begin()) {
877            it--;
878            if (word_end_pos(it) <= pos) {
879                  it++;
880            }
881      }
882882}
883883
884884// Write a word on current tape track
885885void hp_taco_device::write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length)
886886{
887        tape_track_t& track = current_track();
888        tape_track_t::iterator it_low = track.lower_bound(start);
889        adjust_it(track , it_low , start);
890        length = word_length(word);
891        tape_pos_t end_pos = start + length;
892        tape_track_t::iterator it_high = track.lower_bound(end_pos);
887      tape_track_t& track = current_track();
888      tape_track_t::iterator it_low = track.lower_bound(start);
889      adjust_it(track , it_low , start);
890      length = word_length(word);
891      tape_pos_t end_pos = start + length;
892      tape_track_t::iterator it_high = track.lower_bound(end_pos);
893893
894        track.erase(it_low , it_high);
894      track.erase(it_low , it_high);
895895
896        track.insert(it_high , std::make_pair(start, word));
897        LOG_0(("WR %04x @ T%u:%u\n" , word , BIT(m_status_reg , STATUS_TRACKB_BIT) , start));
896      track.insert(it_high , std::make_pair(start, word));
897      LOG_0(("WR %04x @ T%u:%u\n" , word , BIT(m_status_reg , STATUS_TRACKB_BIT) , start));
898898}
899899
900900// Write a gap on current track
901901void hp_taco_device::write_gap(tape_pos_t a , tape_pos_t b)
902902{
903        ensure_a_lt_b(a , b);
904        tape_track_t& track = current_track();
905        tape_track_t::iterator it_low = track.lower_bound(a);
906        adjust_it(track , it_low , a);
907        tape_track_t::iterator it_high = track.lower_bound(b);
903      ensure_a_lt_b(a , b);
904      tape_track_t& track = current_track();
905      tape_track_t::iterator it_low = track.lower_bound(a);
906      adjust_it(track , it_low , a);
907      tape_track_t::iterator it_high = track.lower_bound(b);
908908
909        track.erase(it_low, it_high);
909      track.erase(it_low, it_high);
910910
911        LOG_0(("GAP on T%u:[%u,%u)\n" , BIT(m_status_reg , STATUS_TRACKB_BIT) , a , b));
911      LOG_0(("GAP on T%u:[%u,%u)\n" , BIT(m_status_reg , STATUS_TRACKB_BIT) , a , b));
912912}
913913
914914bool hp_taco_device::just_gap(tape_pos_t a , tape_pos_t b)
915915{
916        ensure_a_lt_b(a , b);
917        tape_track_t& track = current_track();
918        tape_track_t::iterator it_low = track.lower_bound(a);
919        tape_track_t::iterator it_high = track.lower_bound(b);
916      ensure_a_lt_b(a , b);
917      tape_track_t& track = current_track();
918      tape_track_t::iterator it_low = track.lower_bound(a);
919      tape_track_t::iterator it_high = track.lower_bound(b);
920920
921        adjust_it(track, it_low, a);
921      adjust_it(track, it_low, a);
922922
923        return it_low == it_high;
923      return it_low == it_high;
924924}
925925
926926hp_taco_device::tape_pos_t hp_taco_device::farthest_end(const tape_track_t::iterator& it) const
927927{
928        if (m_tape_fwd) {
929                return word_end_pos(it);
930        } else {
931                return it->first;
932        }
928      if (m_tape_fwd) {
929            return word_end_pos(it);
930      } else {
931            return it->first;
932      }
933933}
934934
935935bool hp_taco_device::next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive)
936936{
937        tape_track_t& track = current_track();
938        it = track.lower_bound(pos);
939        if (m_tape_fwd) {
940                if (inclusive) {
941                        adjust_it(track, it, pos);
942                }
943                return it != track.end();
944        } else {
945                // Never more than 2 iterations
946                do {
947                        if (it == track.begin()) {
948                                it = track.end();
949                                return false;
950                        }
951                        it--;
952                } while (!inclusive && word_end_pos(it) > pos);
953                return true;
954        }
937      tape_track_t& track = current_track();
938      it = track.lower_bound(pos);
939      if (m_tape_fwd) {
940            if (inclusive) {
941                  adjust_it(track, it, pos);
942            }
943            return it != track.end();
944      } else {
945            // Never more than 2 iterations
946            do {
947                  if (it == track.begin()) {
948                        it = track.end();
949                        return false;
950                  }
951                  it--;
952            } while (!inclusive && word_end_pos(it) > pos);
953            return true;
954      }
955955}
956956
957957hp_taco_device::adv_res_t hp_taco_device::adv_it(tape_track_t::iterator& it)
958958{
959        tape_track_t& track = current_track();
960        if (m_tape_fwd) {
961                tape_pos_t prev_pos = word_end_pos(it);
962                it++;
963                if (it == track.end()) {
964                        return ADV_NO_MORE_DATA;
965                } else {
966                        adv_res_t res = prev_pos == it->first ? ADV_CONT_DATA : ADV_DISCONT_DATA;
967                        return res;
968                }
969        } else {
970                if (it == track.begin()) {
971                        it = track.end();
972                        return ADV_NO_MORE_DATA;
973                } else {
974                        tape_pos_t prev_pos = it->first;
975                        it--;
976                        return prev_pos == word_end_pos(it) ? ADV_CONT_DATA : ADV_DISCONT_DATA;
977                }
978        }
959      tape_track_t& track = current_track();
960      if (m_tape_fwd) {
961            tape_pos_t prev_pos = word_end_pos(it);
962            it++;
963            if (it == track.end()) {
964                  return ADV_NO_MORE_DATA;
965            } else {
966                  adv_res_t res = prev_pos == it->first ? ADV_CONT_DATA : ADV_DISCONT_DATA;
967                  return res;
968            }
969      } else {
970            if (it == track.begin()) {
971                  it = track.end();
972                  return ADV_NO_MORE_DATA;
973            } else {
974                  tape_pos_t prev_pos = it->first;
975                  it--;
976                  return prev_pos == word_end_pos(it) ? ADV_CONT_DATA : ADV_DISCONT_DATA;
977            }
978      }
979979}
980980
981981attotime hp_taco_device::fetch_next_wr_word(void)
982982{
983        if (m_data_reg_full) {
984                m_next_word = m_data_reg;
985                m_data_reg_full = false;
986                LOG_0(("next %04x (DR)\n" , m_next_word));
987        } else {
988                // When data register is empty, write checksum word
989                m_next_word = m_checksum_reg;
990                LOG_0(("next %04x (CS)\n" , m_next_word));
991        }
992        // Update checksum with new word
993        m_checksum_reg += m_next_word;
983      if (m_data_reg_full) {
984            m_next_word = m_data_reg;
985            m_data_reg_full = false;
986            LOG_0(("next %04x (DR)\n" , m_next_word));
987      } else {
988            // When data register is empty, write checksum word
989            m_next_word = m_checksum_reg;
990            LOG_0(("next %04x (CS)\n" , m_next_word));
991      }
992      // Update checksum with new word
993      m_checksum_reg += m_next_word;
994994
995        return time_to_distance(word_length(m_next_word));
995      return time_to_distance(word_length(m_next_word));
996996}
997997
998998attotime hp_taco_device::time_to_rd_next_word(tape_pos_t& word_rd_pos)
999999{
1000        if (m_rd_it_valid) {
1001                word_rd_pos = farthest_end(m_rd_it);
1002                return time_to_target(word_rd_pos);
1003        } else {
1004                return attotime::never;
1005        }
1000      if (m_rd_it_valid) {
1001            word_rd_pos = farthest_end(m_rd_it);
1002            return time_to_target(word_rd_pos);
1003      } else {
1004            return attotime::never;
1005      }
10061006}
10071007
10081008/**
r253707r253708
10171017 */
10181018bool hp_taco_device::next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap)
10191019{
1020        tape_track_t& track = current_track();
1021        bool done = false;
1022        tape_track_t::iterator prev_it;
1020      tape_track_t& track = current_track();
1021      bool done = false;
1022      tape_track_t::iterator prev_it;
10231023
1024        if (m_tape_fwd) {
1025                tape_pos_t next_pos;
1024      if (m_tape_fwd) {
1025            tape_pos_t next_pos;
10261026
1027                while (1) {
1028                        if (it == track.end()) {
1029                                next_pos = TAPE_LENGTH;
1030                                done = true;
1031                        } else {
1032                                next_pos = it->first;
1033                        }
1034                        if (((next_pos - pos) >= min_gap && --n_gaps == 0) || done) {
1035                                break;
1036                        }
1037                        adv_res_t adv_res;
1038                        do {
1039                                prev_it = it;
1040                                adv_res = adv_it(it);
1041                        } while (adv_res == ADV_CONT_DATA);
1042                        pos = word_end_pos(prev_it);
1043                }
1044        } else {
1045                tape_pos_t next_pos;
1027            while (1) {
1028                  if (it == track.end()) {
1029                        next_pos = TAPE_LENGTH;
1030                        done = true;
1031                  } else {
1032                        next_pos = it->first;
1033                  }
1034                  if (((next_pos - pos) >= min_gap && --n_gaps == 0) || done) {
1035                        break;
1036                  }
1037                  adv_res_t adv_res;
1038                  do {
1039                        prev_it = it;
1040                        adv_res = adv_it(it);
1041                  } while (adv_res == ADV_CONT_DATA);
1042                  pos = word_end_pos(prev_it);
1043            }
1044      } else {
1045            tape_pos_t next_pos;
10461046
1047                while (1) {
1048                        if (it == track.end()) {
1049                                next_pos = 0;
1050                                done = true;
1051                        } else {
1052                                next_pos = word_end_pos(it);
1053                        }
1054                        if (((pos - next_pos) >= min_gap && --n_gaps == 0) || done) {
1055                                break;
1056                        }
1057                        adv_res_t adv_res;
1058                        do {
1059                                prev_it = it;
1060                                adv_res = adv_it(it);
1061                        } while (adv_res == ADV_CONT_DATA);
1062                        pos = prev_it->first;
1063                }
1064        }
1047            while (1) {
1048                  if (it == track.end()) {
1049                        next_pos = 0;
1050                        done = true;
1051                  } else {
1052                        next_pos = word_end_pos(it);
1053                  }
1054                  if (((pos - next_pos) >= min_gap && --n_gaps == 0) || done) {
1055                        break;
1056                  }
1057                  adv_res_t adv_res;
1058                  do {
1059                        prev_it = it;
1060                        adv_res = adv_it(it);
1061                  } while (adv_res == ADV_CONT_DATA);
1062                  pos = prev_it->first;
1063            }
1064      }
10651065
1066        // Set "pos" where minimum gap size is met
1067        pos_offset(pos , min_gap);
1066      // Set "pos" where minimum gap size is met
1067      pos_offset(pos , min_gap);
10681068
1069        return n_gaps == 0;
1069      return n_gaps == 0;
10701070}
10711071
10721072bool hp_taco_device::next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap)
10731073{
1074        tape_track_t::iterator it;
1075        // First align with next data
1076        next_data(it, pos, true);
1077        // Then scan for n_gaps
1078        return next_n_gap(pos, it, n_gaps, min_gap);
1074      tape_track_t::iterator it;
1075      // First align with next data
1076      next_data(it, pos, true);
1077      // Then scan for n_gaps
1078      return next_n_gap(pos, it, n_gaps, min_gap);
10791079}
10801080
10811081void hp_taco_device::clear_tape(void)
10821082{
1083        for (unsigned track_n = 0; track_n < 2; track_n++) {
1084                m_tracks[ track_n ].clear();
1085        }
1083      for (unsigned track_n = 0; track_n < 2; track_n++) {
1084            m_tracks[ track_n ].clear();
1085      }
10861086}
10871087
10881088void hp_taco_device::dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words)
10891089{
1090        if (n_words) {
1091                UINT32 tmp32;
1092                UINT16 tmp16;
1090      if (n_words) {
1091            UINT32 tmp32;
1092            UINT16 tmp16;
10931093
1094                tmp32 = n_words;
1095                fwrite(&tmp32 , sizeof(tmp32));
1096                tmp32 = it_start->first;
1097                fwrite(&tmp32 , sizeof(tmp32));
1094            tmp32 = n_words;
1095            fwrite(&tmp32 , sizeof(tmp32));
1096            tmp32 = it_start->first;
1097            fwrite(&tmp32 , sizeof(tmp32));
10981098
1099                for (unsigned i = 0; i < n_words; i++) {
1100                        tmp16 = it_start->second;
1101                        fwrite(&tmp16 , sizeof(tmp16));
1102                        it_start++;
1103                }
1104        }
1099            for (unsigned i = 0; i < n_words; i++) {
1100                  tmp16 = it_start->second;
1101                  fwrite(&tmp16 , sizeof(tmp16));
1102                  it_start++;
1103            }
1104      }
11051105}
11061106
11071107void hp_taco_device::save_tape(void)
11081108{
1109        UINT32 tmp32;
1109      UINT32 tmp32;
11101110
1111        fseek(0, SEEK_SET);
1111      fseek(0, SEEK_SET);
11121112
1113        tmp32 = FILE_MAGIC;
1114        fwrite(&tmp32 , sizeof(tmp32));
1113      tmp32 = FILE_MAGIC;
1114      fwrite(&tmp32 , sizeof(tmp32));
11151115
1116        for (unsigned track_n = 0; track_n < 2; track_n++) {
1117                const tape_track_t& track = m_tracks[ track_n ];
1118                tape_pos_t next_pos = (tape_pos_t)-1;
1119                unsigned n_words = 0;
1120                tape_track_t::const_iterator it_start;
1121                for (tape_track_t::const_iterator it = track.cbegin(); it != track.cend(); it++) {
1122                        if (it->first != next_pos) {
1123                                dump_sequence(it_start , n_words);
1124                                it_start = it;
1125                                n_words = 0;
1126                        }
1127                        next_pos = it->first + word_length(it->second);
1128                        n_words++;
1129                }
1130                dump_sequence(it_start , n_words);
1131                // End of track
1132                tmp32 = (UINT32)-1;
1133                fwrite(&tmp32 , sizeof(tmp32));
1134        }
1116      for (unsigned track_n = 0; track_n < 2; track_n++) {
1117            const tape_track_t& track = m_tracks[ track_n ];
1118            tape_pos_t next_pos = (tape_pos_t)-1;
1119            unsigned n_words = 0;
1120            tape_track_t::const_iterator it_start;
1121            for (tape_track_t::const_iterator it = track.cbegin(); it != track.cend(); it++) {
1122                  if (it->first != next_pos) {
1123                        dump_sequence(it_start , n_words);
1124                        it_start = it;
1125                        n_words = 0;
1126                  }
1127                  next_pos = it->first + word_length(it->second);
1128                  n_words++;
1129            }
1130            dump_sequence(it_start , n_words);
1131            // End of track
1132            tmp32 = (UINT32)-1;
1133            fwrite(&tmp32 , sizeof(tmp32));
1134      }
11351135}
11361136
11371137bool hp_taco_device::load_track(tape_track_t& track)
11381138{
1139        UINT32 tmp32;
1139      UINT32 tmp32;
11401140
1141        track.clear();
1141      track.clear();
11421142
1143        while (1) {
1144                if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) {
1145                        return false;
1146                }
1143      while (1) {
1144            if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) {
1145                  return false;
1146            }
11471147
1148                if (tmp32 == (UINT32)-1) {
1149                        return true;
1150                }
1148            if (tmp32 == (UINT32)-1) {
1149                  return true;
1150            }
11511151
1152                unsigned n_words = tmp32;
1152            unsigned n_words = tmp32;
11531153
1154                if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) {
1155                        return false;
1156                }
1154            if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) {
1155                  return false;
1156            }
11571157
1158                tape_pos_t pos = (tape_pos_t)tmp32;
1158            tape_pos_t pos = (tape_pos_t)tmp32;
11591159
1160                for (unsigned i = 0; i < n_words; i++) {
1161                        UINT16 tmp16;
1160            for (unsigned i = 0; i < n_words; i++) {
1161                  UINT16 tmp16;
11621162
1163                        if (fread(&tmp16 , sizeof(tmp16)) != sizeof(tmp16)) {
1164                                return false;
1165                        }
1163                  if (fread(&tmp16 , sizeof(tmp16)) != sizeof(tmp16)) {
1164                        return false;
1165                  }
11661166
1167                        track.insert(std::make_pair(pos , tmp16));
1168                        pos += word_length(tmp16);
1169                }
1170        }
1167                  track.insert(std::make_pair(pos , tmp16));
1168                  pos += word_length(tmp16);
1169            }
1170      }
11711171}
11721172
11731173bool hp_taco_device::load_tape(void)
11741174{
1175        UINT32 magic;
1175      UINT32 magic;
11761176
1177        if (fread(&magic , sizeof(magic)) != sizeof(magic) ||
1178            magic != FILE_MAGIC) {
1179                return false;
1180        }
1177      if (fread(&magic , sizeof(magic)) != sizeof(magic) ||
1178         magic != FILE_MAGIC) {
1179            return false;
1180      }
11811181
1182        for (unsigned track_n = 0; track_n < 2; track_n++) {
1183                if (!load_track(m_tracks[ track_n ])) {
1184                        LOG(("load_tape failed"));
1185                        clear_tape();
1186                        return false;
1187                }
1188        }
1182      for (unsigned track_n = 0; track_n < 2; track_n++) {
1183            if (!load_track(m_tracks[ track_n ])) {
1184                  LOG(("load_tape failed"));
1185                  clear_tape();
1186                  return false;
1187            }
1188      }
11891189
1190        LOG(("load_tape done\n"));
1191        return true;
1190      LOG(("load_tape done\n"));
1191      return true;
11921192}
11931193
11941194void hp_taco_device::set_tape_present(bool present)
11951195{
1196        if (present) {
1197                if (is_readonly()) {
1198                        BIT_SET(m_status_reg, STATUS_WPR_BIT);
1199                } else {
1200                        BIT_CLR(m_status_reg, STATUS_WPR_BIT);
1201                }
1202                // STATUS_CART_OUT_BIT is reset by CMD_CLEAR
1203        } else {
1204                BIT_SET(m_status_reg, STATUS_CART_OUT_BIT);
1205                BIT_SET(m_status_reg, STATUS_WPR_BIT);
1206        }
1196      if (present) {
1197            if (is_readonly()) {
1198                  BIT_SET(m_status_reg, STATUS_WPR_BIT);
1199            } else {
1200                  BIT_CLR(m_status_reg, STATUS_WPR_BIT);
1201            }
1202            // STATUS_CART_OUT_BIT is reset by CMD_CLEAR
1203      } else {
1204            BIT_SET(m_status_reg, STATUS_CART_OUT_BIT);
1205            BIT_SET(m_status_reg, STATUS_WPR_BIT);
1206      }
12071207}
12081208
12091209attotime hp_taco_device::time_to_next_hole(void) const
12101210{
1211        return time_to_target(next_hole());
1211      return time_to_target(next_hole());
12121212}
12131213
12141214attotime hp_taco_device::time_to_tach_pulses(void) const
12151215{
1216        return time_to_distance((tape_pos_t)(0x10000U - m_tach_reg) * TAPE_POS_FRACT);
1216      return time_to_distance((tape_pos_t)(0x10000U - m_tach_reg) * TAPE_POS_FRACT);
12171217}
12181218
12191219void hp_taco_device::start_cmd_exec(UINT16 new_cmd_reg)
12201220{
1221        LOG(("Cmd = %02x\n" , CMD_CODE(new_cmd_reg)));
1221      LOG(("Cmd = %02x\n" , CMD_CODE(new_cmd_reg)));
12221222
1223        update_tape_pos();
1223      update_tape_pos();
12241224
1225        attotime cmd_duration = attotime::never;
1226        attotime time_to_hole = attotime::never;
1225      attotime cmd_duration = attotime::never;
1226      attotime time_to_hole = attotime::never;
12271227
1228        unsigned new_cmd_code = CMD_CODE(new_cmd_reg);
1228      unsigned new_cmd_code = CMD_CODE(new_cmd_reg);
12291229
1230        if (new_cmd_code != CMD_START_READ &&
1231            new_cmd_code != CMD_END_READ &&
1232            new_cmd_code != CMD_CLEAR) {
1233                m_rd_it_valid = false;
1234        }
1230      if (new_cmd_code != CMD_START_READ &&
1231         new_cmd_code != CMD_END_READ &&
1232         new_cmd_code != CMD_CLEAR) {
1233            m_rd_it_valid = false;
1234      }
12351235
1236        switch (new_cmd_code) {
1237        case CMD_INDTA_INGAP:
1238                // Errors: CART OUT,FAST SPEED
1239                if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1240                        m_cmd_state = 0;
1241                        if (next_data(m_rd_it , m_tape_pos , true)) {
1242                                cmd_duration = time_to_target(farthest_end(m_rd_it));
1243                        }
1244                }
1245                break;
1236      switch (new_cmd_code) {
1237      case CMD_INDTA_INGAP:
1238            // Errors: CART OUT,FAST SPEED
1239            if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1240                  m_cmd_state = 0;
1241                  if (next_data(m_rd_it , m_tape_pos , true)) {
1242                        cmd_duration = time_to_target(farthest_end(m_rd_it));
1243                  }
1244            }
1245            break;
12461246
1247        case CMD_FINAL_GAP:
1248                // Errors: WP,CART OUT
1249                if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
1250                        m_rw_pos = m_tape_pos;
1251                        cmd_duration = time_to_distance(END_GAP_LENGTH);
1252                        time_to_hole = time_to_next_hole();
1253                }
1254                break;
1247      case CMD_FINAL_GAP:
1248            // Errors: WP,CART OUT
1249            if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
1250                  m_rw_pos = m_tape_pos;
1251                  cmd_duration = time_to_distance(END_GAP_LENGTH);
1252                  time_to_hole = time_to_next_hole();
1253            }
1254            break;
12551255
1256        case CMD_CLEAR:
1257                set_error(false);
1258                BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
1259                BIT_CLR(m_status_reg, STATUS_CART_OUT_BIT);
1260                BIT_CLR(m_status_reg, STATUS_WPR_BIT);
1261                set_tape_present(is_loaded());
1262                // This is a special command: it doesn't raise IRQ at completion and it
1263                // doesn't replace current command
1264                return;
1256      case CMD_CLEAR:
1257            set_error(false);
1258            BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
1259            BIT_CLR(m_status_reg, STATUS_CART_OUT_BIT);
1260            BIT_CLR(m_status_reg, STATUS_WPR_BIT);
1261            set_tape_present(is_loaded());
1262            // This is a special command: it doesn't raise IRQ at completion and it
1263            // doesn't replace current command
1264            return;
12651265
1266        case CMD_NOT_INDTA:
1267                // Errors: CART OUT,FAST SPEED
1268                if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1269                        tape_pos_t target = m_tape_pos;
1270                        if (next_n_gap(target, 1, NO_DATA_GAP)) {
1271                                LOG_0(("End of data @%d\n" , target));
1272                                cmd_duration = time_to_target(target);
1273                        }
1274                        // Holes detected?
1275                }
1276                break;
1266      case CMD_NOT_INDTA:
1267            // Errors: CART OUT,FAST SPEED
1268            if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1269                  tape_pos_t target = m_tape_pos;
1270                  if (next_n_gap(target, 1, NO_DATA_GAP)) {
1271                        LOG_0(("End of data @%d\n" , target));
1272                        cmd_duration = time_to_target(target);
1273                  }
1274                  // Holes detected?
1275            }
1276            break;
12771277
1278        case CMD_INIT_WRITE:
1279                // Errors: WP,CART OUT,fast speed,reverse
1280                if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
1281                        m_next_word = PREAMBLE_WORD;
1282                        m_rw_pos = m_tape_pos;
1283                        cmd_duration = time_to_distance(word_length(m_next_word));
1284                }
1285                break;
1278      case CMD_INIT_WRITE:
1279            // Errors: WP,CART OUT,fast speed,reverse
1280            if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
1281                  m_next_word = PREAMBLE_WORD;
1282                  m_rw_pos = m_tape_pos;
1283                  cmd_duration = time_to_distance(word_length(m_next_word));
1284            }
1285            break;
12861286
1287        case CMD_STOP:
1288                if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
1289                        if (m_start_time.is_never()) {
1290                                // Tape is already stopped
1291                                cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
1292                        } else {
1293                                // Start braking timer
1294                                cmd_duration = attotime::from_msec(m_tape_fast ? FAST_BRAKE_MSEC : SLOW_BRAKE_MSEC);
1295                        }
1296                        m_cmd_reg = new_cmd_reg;
1297                } else {
1298                        // TODO: check if ok
1299                        return;
1300                }
1301                break;
1287      case CMD_STOP:
1288            if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
1289                  if (m_start_time.is_never()) {
1290                        // Tape is already stopped
1291                        cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
1292                  } else {
1293                        // Start braking timer
1294                        cmd_duration = attotime::from_msec(m_tape_fast ? FAST_BRAKE_MSEC : SLOW_BRAKE_MSEC);
1295                  }
1296                  m_cmd_reg = new_cmd_reg;
1297            } else {
1298                  // TODO: check if ok
1299                  return;
1300            }
1301            break;
13021302
1303        case CMD_SET_TRACK:
1304                // Don't know if this command really starts the tape or not (probably it doesn't)
1305                if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1306                        // When b9 is 0, set track A/B
1307                        // When b9 is 1, ignore command (in TACO chip it has an unknown purpose)
1308                        if (!UNKNOWN_B9(new_cmd_reg)) {
1309                                if (CMD_OPT(new_cmd_reg)) {
1310                                        BIT_SET(m_status_reg, STATUS_TRACKB_BIT);
1311                                } else {
1312                                        BIT_CLR(m_status_reg, STATUS_TRACKB_BIT);
1313                                }
1314                        }
1315                        cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
1316                }
1317                break;
1303      case CMD_SET_TRACK:
1304            // Don't know if this command really starts the tape or not (probably it doesn't)
1305            if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1306                  // When b9 is 0, set track A/B
1307                  // When b9 is 1, ignore command (in TACO chip it has an unknown purpose)
1308                  if (!UNKNOWN_B9(new_cmd_reg)) {
1309                        if (CMD_OPT(new_cmd_reg)) {
1310                              BIT_SET(m_status_reg, STATUS_TRACKB_BIT);
1311                        } else {
1312                              BIT_CLR(m_status_reg, STATUS_TRACKB_BIT);
1313                        }
1314                  }
1315                  cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
1316            }
1317            break;
13181318
1319        case CMD_MOVE:
1320                if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1321                        time_to_hole = time_to_next_hole();
1322                }
1323                break;
1319      case CMD_MOVE:
1320            if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1321                  time_to_hole = time_to_next_hole();
1322            }
1323            break;
13241324
1325        case CMD_INGAP_MOVE:
1326                // Errors: CART OUT,FAST SPEED
1327                if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1328                        m_cmd_state = 0;
1329                        tape_pos_t target = m_tape_pos;
1330                        if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
1331                                LOG_0(("IRG @%d\n" , target));
1332                                cmd_duration = time_to_target(target);
1333                        }
1334                        // Holes detected?
1335                }
1336                break;
1325      case CMD_INGAP_MOVE:
1326            // Errors: CART OUT,FAST SPEED
1327            if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1328                  m_cmd_state = 0;
1329                  tape_pos_t target = m_tape_pos;
1330                  if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
1331                        LOG_0(("IRG @%d\n" , target));
1332                        cmd_duration = time_to_target(target);
1333                  }
1334                  // Holes detected?
1335            }
1336            break;
13371337
1338        case CMD_WRITE_IRG:
1339                // Errors: WP,CART OUT
1340                if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
1341                        m_rw_pos = m_tape_pos;
1342                        cmd_duration = time_to_tach_pulses();
1343                        time_to_hole = time_to_next_hole();
1344                }
1345                break;
1338      case CMD_WRITE_IRG:
1339            // Errors: WP,CART OUT
1340            if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
1341                  m_rw_pos = m_tape_pos;
1342                  cmd_duration = time_to_tach_pulses();
1343                  time_to_hole = time_to_next_hole();
1344            }
1345            break;
13461346
1347        case CMD_SCAN_RECORDS:
1348                // Errors: CART OUT
1349                if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1350                        m_cmd_state = 0;
1351                        if (next_data(m_rd_it , m_tape_pos , true)) {
1352                                cmd_duration = time_to_target(farthest_end(m_rd_it));
1353                        }
1354                        time_to_hole = time_to_next_hole();
1355                }
1356                break;
1347      case CMD_SCAN_RECORDS:
1348            // Errors: CART OUT
1349            if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1350                  m_cmd_state = 0;
1351                  if (next_data(m_rd_it , m_tape_pos , true)) {
1352                        cmd_duration = time_to_target(farthest_end(m_rd_it));
1353                  }
1354                  time_to_hole = time_to_next_hole();
1355            }
1356            break;
13571357
1358        case CMD_RECORD_WRITE:
1359                // Errors: WP,CART OUT,fast speed,reverse
1360                if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
1361                        // Search for preamble first
1362                        m_cmd_state = 0;
1363                        m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
1364                        cmd_duration = time_to_rd_next_word(m_rw_pos);
1365                        // Holes detected?
1366                }
1367                break;
1358      case CMD_RECORD_WRITE:
1359            // Errors: WP,CART OUT,fast speed,reverse
1360            if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
1361                  // Search for preamble first
1362                  m_cmd_state = 0;
1363                  m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
1364                  cmd_duration = time_to_rd_next_word(m_rw_pos);
1365                  // Holes detected?
1366            }
1367            break;
13681368
1369        case CMD_MOVE_INDTA:
1370                // Errors: CART OUT,FAST SPEED
1371                if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1372                        m_cmd_state = 0;
1373                        cmd_duration = time_to_tach_pulses();
1374                        // Holes detected?
1375                }
1376                break;
1369      case CMD_MOVE_INDTA:
1370            // Errors: CART OUT,FAST SPEED
1371            if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1372                  m_cmd_state = 0;
1373                  cmd_duration = time_to_tach_pulses();
1374                  // Holes detected?
1375            }
1376            break;
13771377
1378        case CMD_UNK_1b:
1379                if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1380                        // Unknown purpose, but make it a NOP (it's used in "T" test of test ROM)
1381                        cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
1382                }
1383                break;
1378      case CMD_UNK_1b:
1379            if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1380                  // Unknown purpose, but make it a NOP (it's used in "T" test of test ROM)
1381                  cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
1382            }
1383            break;
13841384
1385        case CMD_DELTA_MOVE_HOLE:
1386        case CMD_DELTA_MOVE_IRG:
1387                if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1388                        cmd_duration = time_to_tach_pulses();
1389                        time_to_hole = time_to_next_hole();
1390                }
1391                break;
1385      case CMD_DELTA_MOVE_HOLE:
1386      case CMD_DELTA_MOVE_IRG:
1387            if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
1388                  cmd_duration = time_to_tach_pulses();
1389                  time_to_hole = time_to_next_hole();
1390            }
1391            break;
13921392
1393        case CMD_START_READ:
1394                // Yes, you can read tape backwards: test "C" does that!
1395                // Because of this DIR_FWD_MASK is not in the "must be 1" mask.
1396                if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1397                        // TODO: check anche m_rw_pos sforato
1398                        if (!m_rd_it_valid) {
1399                                // Search for preamble first
1400                                m_cmd_state = 0;
1401                                m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
1402                        }
1393      case CMD_START_READ:
1394            // Yes, you can read tape backwards: test "C" does that!
1395            // Because of this DIR_FWD_MASK is not in the "must be 1" mask.
1396            if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1397                  // TODO: check anche m_rw_pos sforato
1398                  if (!m_rd_it_valid) {
1399                        // Search for preamble first
1400                        m_cmd_state = 0;
1401                        m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
1402                  }
14031403
1404                        cmd_duration = time_to_rd_next_word(m_rw_pos);
1405                        time_to_hole = time_to_next_hole();
1406                }
1407                break;
1404                  cmd_duration = time_to_rd_next_word(m_rw_pos);
1405                  time_to_hole = time_to_next_hole();
1406            }
1407            break;
14081408
1409        case CMD_END_READ:
1410                // This command only makes sense after CMD_START_READ
1411                if (CMD_CODE(m_cmd_reg) == CMD_START_READ && m_cmd_state == 1 &&
1412                    start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1413                        LOG_0(("END_READ %d\n" , m_rd_it_valid));
1414                        cmd_duration = time_to_rd_next_word(m_rw_pos);
1415                        time_to_hole = time_to_next_hole();
1416                }
1417                break;
1409      case CMD_END_READ:
1410            // This command only makes sense after CMD_START_READ
1411            if (CMD_CODE(m_cmd_reg) == CMD_START_READ && m_cmd_state == 1 &&
1412               start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
1413                  LOG_0(("END_READ %d\n" , m_rd_it_valid));
1414                  cmd_duration = time_to_rd_next_word(m_rw_pos);
1415                  time_to_hole = time_to_next_hole();
1416            }
1417            break;
14181418
1419        default:
1420                LOG(("Unrecognized command\n"));
1421                break;
1422        }
1419      default:
1420            LOG(("Unrecognized command\n"));
1421            break;
1422      }
14231423
1424        m_tape_timer->adjust(cmd_duration);
1425        m_hole_timer->adjust(time_to_hole);
1424      m_tape_timer->adjust(cmd_duration);
1425      m_hole_timer->adjust(time_to_hole);
14261426}
14271427
14281428bool hp_taco_device::call_load()
14291429{
1430        LOG(("call_load %d\n" , has_been_created()));
1431        if (has_been_created()) {
1432                clear_tape();
1433                save_tape();
1434        } else if (!load_tape()) {
1435                seterror(IMAGE_ERROR_INVALIDIMAGE , "Wrong format");
1436                set_tape_present(false);
1437                return IMAGE_INIT_FAIL;
1438        }
1430      LOG(("call_load %d\n" , has_been_created()));
1431      if (has_been_created()) {
1432            clear_tape();
1433            save_tape();
1434      } else if (!load_tape()) {
1435            seterror(IMAGE_ERROR_INVALIDIMAGE , "Wrong format");
1436            set_tape_present(false);
1437            return IMAGE_INIT_FAIL;
1438      }
14391439
1440        m_image_dirty = false;
1440      m_image_dirty = false;
14411441
1442        set_tape_present(true);
1442      set_tape_present(true);
14431443   return IMAGE_INIT_PASS;
14441444}
14451445
14461446bool hp_taco_device::call_create(int format_type, option_resolution *format_options)
14471447{
1448        LOG(("call_create %d\n" , has_been_created()));
1449        return call_load();
1448      LOG(("call_create %d\n" , has_been_created()));
1449      return call_load();
14501450}
14511451
14521452void hp_taco_device::call_unload()
14531453{
1454        LOG(("call_unload dirty=%d\n" , m_image_dirty));
1455        if (m_image_dirty) {
1456                save_tape();
1457                m_image_dirty = false;
1458        }
1454      LOG(("call_unload dirty=%d\n" , m_image_dirty));
1455      if (m_image_dirty) {
1456            save_tape();
1457            m_image_dirty = false;
1458      }
14591459
1460        clear_tape();
1461        set_tape_present(false);
1460      clear_tape();
1461      set_tape_present(false);
14621462}
14631463
14641464const char *hp_taco_device::file_extensions() const
14651465{
1466        return "hti";
1466      return "hti";
14671467}
trunk/src/devices/machine/hp_taco.h
r253707r253708
1414#include <map>
1515
1616#define MCFG_TACO_IRQ_HANDLER(_devcb) \
17        devcb = &hp_taco_device::set_irq_handler(*device , DEVCB_##_devcb);
17      devcb = &hp_taco_device::set_irq_handler(*device , DEVCB_##_devcb);
1818
1919#define MCFG_TACO_FLG_HANDLER(_devcb) \
20        devcb = &hp_taco_device::set_flg_handler(*device , DEVCB_##_devcb);
20      devcb = &hp_taco_device::set_flg_handler(*device , DEVCB_##_devcb);
2121
2222#define MCFG_TACO_STS_HANDLER(_devcb) \
23        devcb = &hp_taco_device::set_sts_handler(*device , DEVCB_##_devcb);
23      devcb = &hp_taco_device::set_sts_handler(*device , DEVCB_##_devcb);
2424
2525class hp_taco_device : public device_t ,
26                       public device_image_interface
26                  public device_image_interface
2727{
2828public:
29        // construction/destruction
30        hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
31        hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
29      // construction/destruction
30      hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
31      hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3232
33        // static configuration helpers
34        template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_irq_handler.set_callback(object); }
35        template<class _Object> static devcb_base &set_flg_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_flg_handler.set_callback(object); }
36        template<class _Object> static devcb_base &set_sts_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_sts_handler.set_callback(object); }
33      // static configuration helpers
34      template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_irq_handler.set_callback(object); }
35      template<class _Object> static devcb_base &set_flg_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_flg_handler.set_callback(object); }
36      template<class _Object> static devcb_base &set_sts_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_sts_handler.set_callback(object); }
3737
38        // Register read/write
39        DECLARE_WRITE16_MEMBER(reg_w);
40        DECLARE_READ16_MEMBER(reg_r);
38      // Register read/write
39      DECLARE_WRITE16_MEMBER(reg_w);
40      DECLARE_READ16_MEMBER(reg_r);
4141
42        // Flag & status read
43        DECLARE_READ_LINE_MEMBER(flg_r);
44        DECLARE_READ_LINE_MEMBER(sts_r);
42      // Flag & status read
43      DECLARE_READ_LINE_MEMBER(flg_r);
44      DECLARE_READ_LINE_MEMBER(sts_r);
4545
46        // device_image_interface overrides
46      // device_image_interface overrides
4747   virtual bool call_load() override;
4848   virtual bool call_create(int format_type, option_resolution *format_options) override;
4949   virtual void call_unload() override;
r253707r253708
5656   virtual const char *file_extensions() const override;
5757   virtual const option_guide *create_option_guide() const override { return nullptr; }
5858
59        // Tape position, 1 unit = 1 inch / (968 * 1024)
60        typedef INT32 tape_pos_t;
59      // Tape position, 1 unit = 1 inch / (968 * 1024)
60      typedef INT32 tape_pos_t;
6161
62        // Words stored on tape
63        typedef UINT16 tape_word_t;
62      // Words stored on tape
63      typedef UINT16 tape_word_t;
6464
6565protected:
66        // device-level overrides
66      // device-level overrides
6767   virtual void device_config_complete() override;
68        virtual void device_start() override;
69        virtual void device_stop() override;
70        virtual void device_reset() override;
71        virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
68      virtual void device_start() override;
69      virtual void device_stop() override;
70      virtual void device_reset() override;
71      virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
7272
7373private:
74        // Storage of tracks: mapping from a tape position to word stored there
75        typedef std::map<tape_pos_t , tape_word_t> tape_track_t;
74      // Storage of tracks: mapping from a tape position to word stored there
75      typedef std::map<tape_pos_t , tape_word_t> tape_track_t;
7676
77        devcb_write_line m_irq_handler;
78        devcb_write_line m_flg_handler;
79        devcb_write_line m_sts_handler;
77      devcb_write_line m_irq_handler;
78      devcb_write_line m_flg_handler;
79      devcb_write_line m_sts_handler;
8080
81        // Registers
82        UINT16 m_data_reg;
83        bool m_data_reg_full;
84        UINT16 m_cmd_reg;
85        UINT16 m_status_reg;
86        UINT16 m_tach_reg;
87        UINT16 m_checksum_reg;
88        UINT16 m_timing_reg;
81      // Registers
82      UINT16 m_data_reg;
83      bool m_data_reg_full;
84      UINT16 m_cmd_reg;
85      UINT16 m_status_reg;
86      UINT16 m_tach_reg;
87      UINT16 m_checksum_reg;
88      UINT16 m_timing_reg;
8989
90        // State
91        bool m_irq;
92        bool m_flg;
93        bool m_sts;
94        UINT8 m_cmd_state;
90      // State
91      bool m_irq;
92      bool m_flg;
93      bool m_sts;
94      UINT8 m_cmd_state;
9595
96        // Tape position & motion
97        tape_pos_t m_tape_pos;
98        attotime m_start_time;  // Tape moving if != never
99        bool m_tape_fwd;
100        bool m_tape_fast;
96      // Tape position & motion
97      tape_pos_t m_tape_pos;
98      attotime m_start_time;  // Tape moving if != never
99      bool m_tape_fwd;
100      bool m_tape_fast;
101101
102        // Timers
103        emu_timer *m_tape_timer;
104        emu_timer *m_hole_timer;
102      // Timers
103      emu_timer *m_tape_timer;
104      emu_timer *m_hole_timer;
105105
106        // Content of tape tracks
107        tape_track_t m_tracks[ 2 ];
108        bool m_image_dirty;
106      // Content of tape tracks
107      tape_track_t m_tracks[ 2 ];
108      bool m_image_dirty;
109109
110        // Reading & writing
111        bool m_tape_wr;
112        tape_pos_t m_rw_pos;
113        UINT16 m_next_word;
114        tape_track_t::iterator m_rd_it;
115        bool m_rd_it_valid;
110      // Reading & writing
111      bool m_tape_wr;
112      tape_pos_t m_rw_pos;
113      UINT16 m_next_word;
114      tape_track_t::iterator m_rd_it;
115      bool m_rd_it_valid;
116116
117        // Gap detection
118        tape_pos_t m_gap_detect_start;
117      // Gap detection
118      tape_pos_t m_gap_detect_start;
119119
120        typedef enum {
121                ADV_NO_MORE_DATA,
122                ADV_CONT_DATA,
123                ADV_DISCONT_DATA
124        } adv_res_t;
120      typedef enum {
121            ADV_NO_MORE_DATA,
122            ADV_CONT_DATA,
123            ADV_DISCONT_DATA
124      } adv_res_t;
125125
126        void clear_state(void);
127        void irq_w(bool state);
128        void set_error(bool state);
129        unsigned speed_to_tick_freq(void) const;
130        bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const;
131        void move_tape_pos(tape_pos_t delta_pos);
132        void update_tape_pos(void);
133        static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b);
134        static bool any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b);
135        tape_pos_t next_hole(void) const;
136        attotime time_to_distance(tape_pos_t distance) const;
137        attotime time_to_target(tape_pos_t target) const;
138        bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
139        void start_tape(UINT16 cmd_reg);
140        void stop_tape(void);
141        tape_track_t& current_track(void);
142        static tape_pos_t word_length(tape_word_t w);
143        static tape_pos_t word_end_pos(const tape_track_t::iterator& it);
144        static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos);
145        void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length);
146        void write_gap(tape_pos_t a , tape_pos_t b);
147        bool just_gap(tape_pos_t a , tape_pos_t b);
148        tape_pos_t farthest_end(const tape_track_t::iterator& it) const;
149        bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive);
150        adv_res_t adv_it(tape_track_t::iterator& it);
151        attotime fetch_next_wr_word(void);
152        attotime time_to_rd_next_word(tape_pos_t& word_rd_pos);
153        bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap);
154        bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap);
155        void clear_tape(void);
156        void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words);
157        void save_tape(void);
158        bool load_track(tape_track_t& track);
159        bool load_tape(void);
160        void set_tape_present(bool present);
161        attotime time_to_next_hole(void) const;
162        attotime time_to_tach_pulses(void) const;
163        void start_cmd_exec(UINT16 new_cmd_reg);
126      void clear_state(void);
127      void irq_w(bool state);
128      void set_error(bool state);
129      unsigned speed_to_tick_freq(void) const;
130      bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const;
131      void move_tape_pos(tape_pos_t delta_pos);
132      void update_tape_pos(void);
133      static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b);
134      static bool any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b);
135      tape_pos_t next_hole(void) const;
136      attotime time_to_distance(tape_pos_t distance) const;
137      attotime time_to_target(tape_pos_t target) const;
138      bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
139      void start_tape(UINT16 cmd_reg);
140      void stop_tape(void);
141      tape_track_t& current_track(void);
142      static tape_pos_t word_length(tape_word_t w);
143      static tape_pos_t word_end_pos(const tape_track_t::iterator& it);
144      static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos);
145      void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length);
146      void write_gap(tape_pos_t a , tape_pos_t b);
147      bool just_gap(tape_pos_t a , tape_pos_t b);
148      tape_pos_t farthest_end(const tape_track_t::iterator& it) const;
149      bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive);
150      adv_res_t adv_it(tape_track_t::iterator& it);
151      attotime fetch_next_wr_word(void);
152      attotime time_to_rd_next_word(tape_pos_t& word_rd_pos);
153      bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap);
154      bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap);
155      void clear_tape(void);
156      void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words);
157      void save_tape(void);
158      bool load_track(tape_track_t& track);
159      bool load_tape(void);
160      void set_tape_present(bool present);
161      attotime time_to_next_hole(void) const;
162      attotime time_to_tach_pulses(void) const;
163      void start_cmd_exec(UINT16 new_cmd_reg);
164164};
165165
166166// device type definition
trunk/src/devices/video/ef9364.cpp
r253707r253708
3131// default address map
3232//-------------------------------------------------
3333static ADDRESS_MAP_START( ef9364, AS_0, 8, ef9364_device )
34    AM_RANGE(0x00000, ( ( EF9364_TXTPLANE_MAX_SIZE * EF9364_MAX_TXTPLANES ) - 1 ) ) AM_RAM
34   AM_RANGE(0x00000, ( ( EF9364_TXTPLANE_MAX_SIZE * EF9364_MAX_TXTPLANES ) - 1 ) ) AM_RAM
3535ADDRESS_MAP_END
3636
3737//-------------------------------------------------
r253707r253708
4141
4242const address_space_config *ef9364_device::memory_space_config(address_spacenum spacenum) const
4343{
44    return (spacenum == AS_0) ? &m_space_config : NULL;
44   return (spacenum == AS_0) ? &m_space_config : NULL;
4545}
4646
4747//**************************************************************************
r253707r253708
5757//-------------------------------------------------
5858
5959ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
60    device_t(mconfig, EF9364, "EF9364", tag, owner, clock, "ef9364", __FILE__),
61    device_memory_interface(mconfig, *this),
62    device_video_interface(mconfig, *this),
63    m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, nullptr, *ADDRESS_MAP_NAME(ef9364)),
64    m_palette(*this)
60   device_t(mconfig, EF9364, "EF9364", tag, owner, clock, "ef9364", __FILE__),
61   device_memory_interface(mconfig, *this),
62   device_video_interface(mconfig, *this),
63   m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, nullptr, *ADDRESS_MAP_NAME(ef9364)),
64   m_palette(*this)
6565{
66    clock_freq = clock;
66   clock_freq = clock;
6767}
6868
6969//-------------------------------------------------
r253707r253708
7373
7474void ef9364_device::static_set_palette_tag(device_t &device, const char *tag)
7575{
76    downcast<ef9364_device &>(device).m_palette.set_tag(tag);
76   downcast<ef9364_device &>(device).m_palette.set_tag(tag);
7777}
7878
7979//-------------------------------------------------
r253707r253708
8282
8383void ef9364_device::static_set_nb_of_pages(device_t &device, int nb_of_pages )
8484{
85    if( nb_of_pages > 0 && nb_of_pages <= 8 )
86    {
87        downcast<ef9364_device &>(device).nb_of_pages = nb_of_pages;
88    }
85   if( nb_of_pages > 0 && nb_of_pages <= 8 )
86   {
87      downcast<ef9364_device &>(device).nb_of_pages = nb_of_pages;
88   }
8989}
9090
9191//-------------------------------------------------
r253707r253708
9595
9696void ef9364_device::set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b )
9797{
98    if( index < 2 )
99    {
100        palette[index] = rgb_t(r, g, b);
101    }
102    else
103    {
104        logerror("Invalid EF9364 Palette entry : %02x\n", index);
105    }
98   if( index < 2 )
99   {
100      palette[index] = rgb_t(r, g, b);
101   }
102   else
103   {
104      logerror("Invalid EF9364 Palette entry : %02x\n", index);
105   }
106106}
107107
108108//-------------------------------------------------
r253707r253708
111111
112112void ef9364_device::device_start()
113113{
114    m_textram = &space(0);
115    m_charset = region();
114   m_textram = &space(0);
115   m_charset = region();
116116
117    bitplane_xres = EF9364_NB_OF_COLUMNS*8;
118    bitplane_yres = EF9364_NB_OF_ROWS*(8+4);
117   bitplane_xres = EF9364_NB_OF_COLUMNS*8;
118   bitplane_yres = EF9364_NB_OF_ROWS*(8+4);
119119
120    vsync_scanline_pos = 250;
120   vsync_scanline_pos = 250;
121121
122    // Default palette : Black and white
123    palette[0] = rgb_t(0, 0, 0);
124    palette[1] = rgb_t(255, 255, 255);
122   // Default palette : Black and white
123   palette[0] = rgb_t(0, 0, 0);
124   palette[1] = rgb_t(255, 255, 255);
125125
126    m_screen_out.allocate( bitplane_xres, m_screen->height() );
126   m_screen_out.allocate( bitplane_xres, m_screen->height() );
127127
128    cursor_cnt = 0;
129    cursor_state = 0;
128   cursor_cnt = 0;
129   cursor_state = 0;
130130
131    save_item(NAME(m_border));
131   save_item(NAME(m_border));
132132
133    save_item(NAME(m_screen_out));
133   save_item(NAME(m_screen_out));
134134}
135135
136136//-------------------------------------------------
r253707r253708
139139
140140void ef9364_device::device_reset()
141141{
142    int i;
142   int i;
143143
144    x_curs_pos = 0;
145    y_curs_pos = 0;
144   x_curs_pos = 0;
145   y_curs_pos = 0;
146146
147    char_latch = 0x00;
147   char_latch = 0x00;
148148
149    for(i=0;i<EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS * nb_of_pages;i++)
150    {
151        m_textram->write_byte ( i , 0x7F );
152    }
149   for(i=0;i<EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS * nb_of_pages;i++)
150   {
151      m_textram->write_byte ( i , 0x7F );
152   }
153153
154    memset(m_border, 0, sizeof(m_border));
154   memset(m_border, 0, sizeof(m_border));
155155
156    m_screen_out.fill(0);
156   m_screen_out.fill(0);
157157
158    set_video_mode();
158   set_video_mode();
159159}
160160
161161//-------------------------------------------------
r253707r253708
164164
165165void ef9364_device::set_video_mode(void)
166166{
167    UINT16 new_width = bitplane_xres;
167   UINT16 new_width = bitplane_xres;
168168
169    if (m_screen->width() != new_width)
170    {
171        rectangle visarea = m_screen->visible_area();
172        visarea.max_x = new_width - 1;
169   if (m_screen->width() != new_width)
170   {
171      rectangle visarea = m_screen->visible_area();
172      visarea.max_x = new_width - 1;
173173
174        m_screen->configure(new_width, m_screen->height(), visarea, m_screen->frame_period().attoseconds());
175    }
174      m_screen->configure(new_width, m_screen->height(), visarea, m_screen->frame_period().attoseconds());
175   }
176176
177    //border color
178    memset(m_border, 0, sizeof(m_border));
177   //border color
178   memset(m_border, 0, sizeof(m_border));
179179}
180180
181181//-------------------------------------------------
r253707r253708
193193
194194UINT32 ef9364_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
195195{
196    int x,y,r;
197    unsigned char c;
196   int x,y,r;
197   unsigned char c;
198198
199    for( r = 0 ; r < EF9364_NB_OF_ROWS ; r++ )
200    {
201        for( y = 0 ; y < 8 ; y++ )
202        {
203            for( x = 0 ; x < EF9364_NB_OF_COLUMNS * 8 ; x++ )
204            {
205                if( ( ( x >> 3 ) != x_curs_pos )   ||  ( r != y_curs_pos ) || !cursor_state)
206                {
207                    c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) );
199   for( r = 0 ; r < EF9364_NB_OF_ROWS ; r++ )
200   {
201      for( y = 0 ; y < 8 ; y++ )
202      {
203         for( x = 0 ; x < EF9364_NB_OF_COLUMNS * 8 ; x++ )
204         {
205            if( ( ( x >> 3 ) != x_curs_pos )   ||  ( r != y_curs_pos ) || !cursor_state)
206            {
207               c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) );
208208
209                    if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) )
210                        m_screen_out.pix32((r*12)+y, x) = palette[1];
211                    else
212                        m_screen_out.pix32((r*12)+y, x) = palette[0];
213                }
214                else
215                {
216                    if(y != 7)
217                        m_screen_out.pix32((r*12)+y, x) = palette[0];
218                    else
219                        m_screen_out.pix32((r*12)+y, x) = palette[1];
220                }
221            }
222        }
223    }
209               if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) )
210                  m_screen_out.pix32((r*12)+y, x) = palette[1];
211               else
212                  m_screen_out.pix32((r*12)+y, x) = palette[0];
213            }
214            else
215            {
216               if(y != 7)
217                  m_screen_out.pix32((r*12)+y, x) = palette[0];
218               else
219                  m_screen_out.pix32((r*12)+y, x) = palette[1];
220            }
221         }
222      }
223   }
224224
225    cursor_cnt = (cursor_cnt + 1) % 13;
226    if(!cursor_cnt)
227        cursor_state ^= 1;
225   cursor_cnt = (cursor_cnt + 1) % 13;
226   if(!cursor_cnt)
227      cursor_state ^= 1;
228228
229    copybitmap(bitmap, m_screen_out, 0, 0, 0, 0, cliprect);
230    return 0;
229   copybitmap(bitmap, m_screen_out, 0, 0, 0, 0, cliprect);
230   return 0;
231231}
232232
233233//-------------------------------------------------
r253707r253708
236236
237237void ef9364_device::update_scanline(UINT16 scanline)
238238{
239    if (scanline == vsync_scanline_pos)
240    {
241        // vsync
242    }
239   if (scanline == vsync_scanline_pos)
240   {
241      // vsync
242   }
243243
244    if (scanline == 0)
245    {
246        draw_border(0);
247    }
244   if (scanline == 0)
245   {
246      draw_border(0);
247   }
248248}
249249
250250//-------------------------------------------------
r253707r253708
253253
254254void ef9364_device::command_w(UINT8 cmd)
255255{
256    int x,y,i,j;
256   int x,y,i,j;
257257
258    switch( cmd&7 )
259    {
260        case 0x0: // Page Erase & Cursor home
261            for( y=0 ; y < EF9364_NB_OF_ROWS ; y++ )
262            {
263                for( x=0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
264                {
265                    m_textram->write_byte ( y * EF9364_NB_OF_COLUMNS + x , 0x7F );
266                }
267            }
268            x_curs_pos = 0;
269            y_curs_pos = 0;
270        break;
258   switch( cmd&7 )
259   {
260      case 0x0: // Page Erase & Cursor home
261         for( y=0 ; y < EF9364_NB_OF_ROWS ; y++ )
262         {
263            for( x=0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
264            {
265               m_textram->write_byte ( y * EF9364_NB_OF_COLUMNS + x , 0x7F );
266            }
267         }
268         x_curs_pos = 0;
269         y_curs_pos = 0;
270      break;
271271
272        case 0x1: // Erase to end of the line and return cursor
273            for( ; x_curs_pos < EF9364_NB_OF_COLUMNS ; x_curs_pos++ )
274            {
275                m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , 0x7F );
276            }
277            x_curs_pos = 0;
278        break;
272      case 0x1: // Erase to end of the line and return cursor
273         for( ; x_curs_pos < EF9364_NB_OF_COLUMNS ; x_curs_pos++ )
274         {
275            m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , 0x7F );
276         }
277         x_curs_pos = 0;
278      break;
279279
280        case 0x2: // Line feed
281            y_curs_pos++;
282            if( y_curs_pos >= EF9364_NB_OF_ROWS )
283            {
284                // Scroll
285                for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
286                {
287                    for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
288                    {
289                        m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i ,  m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
290                    }
291                }
292                // Erase last line
293                for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
294                {
295                    m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
296                }
280      case 0x2: // Line feed
281         y_curs_pos++;
282         if( y_curs_pos >= EF9364_NB_OF_ROWS )
283         {
284            // Scroll
285            for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
286            {
287               for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
288               {
289                  m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i ,  m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
290               }
291            }
292            // Erase last line
293            for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
294            {
295               m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
296            }
297297
298                y_curs_pos = EF9364_NB_OF_ROWS - 1;
299            }
300        break;
298            y_curs_pos = EF9364_NB_OF_ROWS - 1;
299         }
300      break;
301301
302        case 0x3: // Nop
302      case 0x3: // Nop
303303
304        break;
304      break;
305305
306        case 0x4: // Cursor left
307            if(x_curs_pos)
308                x_curs_pos--;
309        break;
306      case 0x4: // Cursor left
307         if(x_curs_pos)
308            x_curs_pos--;
309      break;
310310
311        case 0x5: // Erasure of cursor Line.
312            for( x = 0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
313            {
314                m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x , 0x7F );
315            }
316        break;
311      case 0x5: // Erasure of cursor Line.
312         for( x = 0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
313         {
314            m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x , 0x7F );
315         }
316      break;
317317
318        case 0x6: // Cursor up
319            if(y_curs_pos)
320                y_curs_pos--;
321        break;
318      case 0x6: // Cursor up
319         if(y_curs_pos)
320            y_curs_pos--;
321      break;
322322
323        case 0x7: // Write char
324            if(cmd&0x8)
325                m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , char_latch );
323      case 0x7: // Write char
324         if(cmd&0x8)
325            m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , char_latch );
326326
327            x_curs_pos++;
328            if( x_curs_pos >= EF9364_NB_OF_COLUMNS )
329            {
330                x_curs_pos=0;
331                y_curs_pos++;
332                if( y_curs_pos >= EF9364_NB_OF_ROWS )
333                {
334                    // Scroll
335                    for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
336                    {
337                        for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
338                        {
339                            m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i ,  m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
340                        }
341                    }
342                    // Erase last line
343                    for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
344                    {
345                        m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
346                    }
327         x_curs_pos++;
328         if( x_curs_pos >= EF9364_NB_OF_COLUMNS )
329         {
330            x_curs_pos=0;
331            y_curs_pos++;
332            if( y_curs_pos >= EF9364_NB_OF_ROWS )
333            {
334               // Scroll
335               for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
336               {
337                  for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
338                  {
339                     m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i ,  m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
340                  }
341               }
342               // Erase last line
343               for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
344               {
345                  m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
346               }
347347
348                    y_curs_pos = EF9364_NB_OF_ROWS - 1;
349                }
350            }
351        break;
348               y_curs_pos = EF9364_NB_OF_ROWS - 1;
349            }
350         }
351      break;
352352
353    }
353   }
354354}
355355
356356void ef9364_device::char_latch_w(UINT8 data)
357357{
358    char_latch = data;
358   char_latch = data;
359359}
trunk/src/devices/video/ef9364.h
r253707r253708
2020#define EF9364_MAX_TXTPLANES  2
2121
2222#define MCFG_EF9364_PALETTE(_palette_tag) \
23    ef9364_device::static_set_palette_tag(*device, "^" _palette_tag);
23   ef9364_device::static_set_palette_tag(*device, "^" _palette_tag);
2424
2525#define MCFG_EF9364_PAGES_CNT(_pages_number) \
26    ef9364_device::static_set_nb_of_pages(*device,_pages_number);
26   ef9364_device::static_set_nb_of_pages(*device,_pages_number);
2727
2828#define MCFG_EF9364_IRQ_HANDLER(_devcb) \
29    devcb = &ef9364_device::set_irq_handler(*device, DEVCB_##_devcb);
29   devcb = &ef9364_device::set_irq_handler(*device, DEVCB_##_devcb);
3030
3131//**************************************************************************
3232//  TYPE DEFINITIONS
r253707r253708
3535// ======================> ef9364_device
3636
3737class ef9364_device :   public device_t,
38                        public device_memory_interface,
39                        public device_video_interface
38                  public device_memory_interface,
39                  public device_video_interface
4040{
4141public:
42    // construction/destruction
43    ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
42   // construction/destruction
43   ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4444
45    // static configuration
46    static void static_set_palette_tag(device_t &device, const char *tag);
47    static void static_set_nb_of_pages(device_t &device, int nb_bitplanes );
45   // static configuration
46   static void static_set_palette_tag(device_t &device, const char *tag);
47   static void static_set_nb_of_pages(device_t &device, int nb_bitplanes );
4848
49    // device interface
49   // device interface
5050
51    void update_scanline(UINT16 scanline);
52    void set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b );
51   void update_scanline(UINT16 scanline);
52   void set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b );
5353
54    UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
55    void char_latch_w(UINT8 data);
56    void command_w(UINT8 cmd);
54   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
55   void char_latch_w(UINT8 data);
56   void command_w(UINT8 cmd);
5757
5858protected:
59    // device-level overrides
60    virtual void device_start() override;
61    virtual void device_reset() override;
59   // device-level overrides
60   virtual void device_start() override;
61   virtual void device_reset() override;
6262
63    // device_config_memory_interface overrides
64    virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
63   // device_config_memory_interface overrides
64   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
6565
66    // address space configurations
67    const address_space_config      m_space_config;
66   // address space configurations
67   const address_space_config      m_space_config;
6868
69    // inline helper
69   // inline helper
7070
7171private:
72    void screen_scanning( int force_clear );
73    void set_video_mode(void);
74    void draw_border(UINT16 line);
72   void screen_scanning( int force_clear );
73   void set_video_mode(void);
74   void draw_border(UINT16 line);
7575
76    // internal state
76   // internal state
7777
78    memory_region *m_charset;
79    address_space *m_textram;
78   memory_region *m_charset;
79   address_space *m_textram;
8080
81    UINT8 x_curs_pos;
82    UINT8 y_curs_pos;
83    UINT8 char_latch;
81   UINT8 x_curs_pos;
82   UINT8 y_curs_pos;
83   UINT8 char_latch;
8484
85    UINT8 m_border[80];                     //border color
85   UINT8 m_border[80];                     //border color
8686
87    rgb_t palette[2];
88    int   nb_of_pages;
89    int   bitplane_xres;
90    int   bitplane_yres;
91    int   vsync_scanline_pos;
92    int   cursor_cnt;
93    int   cursor_state;
87   rgb_t palette[2];
88   int   nb_of_pages;
89   int   bitplane_xres;
90   int   bitplane_yres;
91   int   vsync_scanline_pos;
92   int   cursor_cnt;
93   int   cursor_state;
9494
95    UINT32 clock_freq;
96    bitmap_rgb32 m_screen_out;
95   UINT32 clock_freq;
96   bitmap_rgb32 m_screen_out;
9797
98    required_device<palette_device> m_palette;
98   required_device<palette_device> m_palette;
9999};
100100
101101// device type definition
trunk/src/devices/video/jangou_blitter.cpp
r253707r253708
22// copyright-holders:Angelo Salese
33/***************************************************************************
44
5   Jangou Custom Blitter Chip, codename "???" (name scratched afaik)
5    Jangou Custom Blitter Chip, codename "???" (name scratched afaik)
66
7   device emulation by Angelo Salese, from original jangou.cpp implementation
8    by Angelo Salese, David Haywood and Phil Bennett.
7    device emulation by Angelo Salese, from original jangou.cpp implementation
8     by Angelo Salese, David Haywood and Phil Bennett.
99
10   TODO:
11   - BLTFLIP mechanism;
12   - clean-ups;
13   
10    TODO:
11    - BLTFLIP mechanism;
12    - clean-ups;
13
1414***************************************************************************/
1515
1616#include "emu.h"
r253707r253708
5151   if (m_gfxrom == nullptr)
5252      fatalerror("JANGOU_BLITTER: \"gfx\" memory base not found");
5353   m_gfxrommask = devregion->bytes()-1;
54   
54
5555   save_item(NAME(m_pen_data));
5656   save_item(NAME(m_blit_data));
5757   save_item(NAME(m_blit_buffer));
r253707r253708
8484}
8585
8686void jangou_blitter_device::plot_gfx_pixel( UINT8 pix, int x, int y )
87{   
87{
8888   if (y < 0 || y >= 256)
8989      return;
9090   if (x < 0 || x >= 256)
9191      return;
92   
92
9393   if (x & 1)
9494      m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0);
9595   else
r253707r253708
112112      src |= (m_blit_data[6] & 3) << 16;
113113      x = (m_blit_data[2] & 0xff);
114114      y = (m_blit_data[3] & 0xff);
115     
115
116116      #if 0
117117      if(m_bltflip == true)
118118      {
119         printf("%02x %02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],m_blit_data[3], m_blit_data[4], m_blit_data[5],m_blit_data[6]);
119         printf("%02x %02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],m_blit_data[3], m_blit_data[4], m_blit_data[5],m_blit_data[6]);
120120         printf("=>");
121121         for(int i=0;i<0x10;i++)
122122            printf("%02x ",m_pen_data[i]);
r253707r253708
131131      else
132132         src -= (w * h) - 1;
133133
134     
134
135135      for (ycount = 0; ycount < h; ycount++)
136136      {
137137         for(xcount = 0; xcount < w; xcount++)
r253707r253708
152152               count++;
153153         }
154154      }
155     
155
156156      //UINT32 new_src = src + count;
157     
157
158158      // update source and height after blitter operation
159159      // TODO: Jangou doesn't agree with this, later HW?
160160      #if 0
trunk/src/devices/video/jangou_blitter.h
r253707r253708
4343
4444protected:
4545   // device-level overrides
46   virtual void device_start() override;
46   virtual void device_start() override;
4747   virtual void device_reset() override;
48   
48
4949private:
5050   void plot_gfx_pixel( UINT8 pix, int x, int y );
5151   UINT8 gfx_nibble( UINT32 niboffset );
trunk/src/devices/video/upd7220.cpp
r253707r253708
9494#define UPD7220_COMMAND_CCHAR           0x4b
9595#define UPD7220_COMMAND_START           0x6b
9696#define UPD7220_COMMAND_BCTRL           0x0c // & 0xfe
97#define UPD7220_COMMAND_05            0x05
97#define UPD7220_COMMAND_05              0x05
9898#define UPD7220_COMMAND_ZOOM            0x46
9999#define UPD7220_COMMAND_CURS            0x49
100100#define UPD7220_COMMAND_PRAM            0x70 // & 0xf0
trunk/src/devices/video/voodoo.cpp
r253707r253708
960960   /* set a timer for the next off state */
961961   machine().scheduler().timer_set(screen->time_until_pos(0), timer_expired_delegate(FUNC(voodoo_device::vblank_off_callback),this), 0, this);
962962
963   
964963
964
965965   /* set internal state and call the client */
966966   fbi.vblank = TRUE;
967967
r253707r253708
28772877 *
28782878 *************************************/
28792879INT32 voodoo_device::lfb_direct_w(voodoo_device *vd, offs_t offset, UINT32 data, UINT32 mem_mask)
2880{   
2880{
28812881   UINT16 *dest;
28822882   UINT32 destmax;
28832883   int x, y;
r253707r253708
29232923
29242924INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32 mem_mask)
29252925{
2926
29272926   UINT16 *dest, *depth;
29282927   UINT32 destmax, depthmax;
29292928   int sr[2], sg[2], sb[2], sa[2], sw[2];
r253707r253708
37833782
37843783static UINT32 register_r(voodoo_device *vd, offs_t offset)
37853784{
3786
37873785   int regnum = offset & 0xff;
37883786   UINT32 result;
37893787
r253707r253708
40534051
40544052READ32_MEMBER( voodoo_device::voodoo_r )
40554053{
4056
40574054   /* if we have something pending, flush the FIFOs up to the current time */
40584055   if (pci.op_pending)
40594056      flush_fifos(this, machine().time());
r253707r253708
46994696
47004697WRITE32_MEMBER( voodoo_banshee_device::banshee_w )
47014698{
4702
47034699   /* if we have something pending, flush the FIFOs up to the current time */
47044700   if (pci.op_pending)
47054701      flush_fifos(this, machine().time());
r253707r253708
50455041   pci.fifo.in = pci.fifo.out = 0;
50465042   pci.stall_state = NOT_STALLED;
50475043   pci.continue_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(voodoo_device::stall_cpu_callback),this), nullptr);
5048   
5044
50495045   /* allocate memory */
50505046   tmumem0 = m_tmumem0;
50515047   tmumem1 = m_tmumem1;
trunk/src/devices/video/voodoo.h
r253707r253708
17771777   const char *        m_cputag;
17781778   devcb_write_line   m_vblank;
17791779   devcb_write_line   m_stall;
1780   
1780
17811781   TIMER_CALLBACK_MEMBER( vblank_off_callback );
17821782   TIMER_CALLBACK_MEMBER( stall_cpu_callback );
17831783   TIMER_CALLBACK_MEMBER( vblank_callback );
r253707r253708
18261826   static void raster_generic_2tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
18271827
18281828#define RASTERIZER_HEADER(name) \
1829   static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid); \
1830
1829   static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid);
18311830#define RASTERIZER_ENTRY(fbzcp, alpha, fog, fbz, tex0, tex1) \
1832   RASTERIZER_HEADER(fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1) \
1833
1831   RASTERIZER_HEADER(fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1)
18341832#include "voodoo_rast.inc"
18351833
18361834#undef RASTERIZER_ENTRY
trunk/src/emu/clifront.cpp
r253707r253708
107107      m_options.parse_command_line(argc, argv, option_errors);
108108
109109      m_options.parse_standard_inis(option_errors);
110     
110
111111      //load_translation();
112112      load_translation(m_options);
113     
113
114114      manager->start_luaengine();
115115
116116      if (*(m_options.software_name()) != 0)
trunk/src/emu/debug/debugcpu.cpp
r253707r253708
19301930         machine.debug_view().flush_osd_updates();
19311931
19321932         machine.manager().lua()->periodic_check();
1933         
1933
19341934         // clear the memory modified flag and wait
19351935         global->memory_modified = false;
19361936         if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED)
trunk/src/emu/drivers/empty.cpp
r253707r253708
3333      if (strcmp(machine().options().ui(),"simple")==0) {
3434         ui_simple_menu_select_game::force_game_select(machine(), &machine().render().ui_container());
3535      } else {
36         ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container());         
36         ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container());
3737      }
3838   }
3939
trunk/src/emu/emuopts.cpp
r253707r253708
184184   { OPTION_BIOS,                                       nullptr,        OPTION_STRING,     "select the system BIOS to use" },
185185   { OPTION_CHEAT ";c",                                 "0",         OPTION_BOOLEAN,    "enable cheat subsystem" },
186186   { OPTION_SKIP_GAMEINFO,                              "0",         OPTION_BOOLEAN,    "skip displaying the information screen at startup" },
187   { OPTION_UI_FONT,                                    "default",   OPTION_STRING,     "specify a font to use" },   
188   { OPTION_UI,                                          "cabinet",   OPTION_STRING,     "type of UI (simple|cabinet)" },
187   { OPTION_UI_FONT,                                    "default",   OPTION_STRING,     "specify a font to use" },
188   { OPTION_UI,                                         "cabinet",   OPTION_STRING,     "type of UI (simple|cabinet)" },
189189   { OPTION_RAMSIZE ";ram",                             nullptr,        OPTION_STRING,     "size of RAM (if supported by driver)" },
190190   { OPTION_CONFIRM_QUIT,                               "0",         OPTION_BOOLEAN,    "display confirm quit screen on exit" },
191191   { OPTION_UI_MOUSE,                                   "1",         OPTION_BOOLEAN,    "display ui mouse cursor" },
trunk/src/emu/emuopts.h
r253707r253708
7474#define OPTION_PLAYBACK             "playback"
7575#define OPTION_RECORD               "record"
7676#define OPTION_RECORD_TIMECODE      "record_timecode"
77#define OPTION_EXIT_AFTER_PLAYBACK   "exit_after_playback"
77#define OPTION_EXIT_AFTER_PLAYBACK  "exit_after_playback"
7878#define OPTION_MNGWRITE             "mngwrite"
7979#define OPTION_AVIWRITE             "aviwrite"
8080#ifdef MAME_DEBUG
r253707r253708
178178#define OPTION_CHEAT                "cheat"
179179#define OPTION_SKIP_GAMEINFO        "skip_gameinfo"
180180#define OPTION_UI_FONT              "uifont"
181#define OPTION_UI                   "ui"
181#define OPTION_UI                   "ui"
182182#define OPTION_RAMSIZE              "ramsize"
183183
184184// core comm options
r253707r253708
359359   const char *bios() const { return value(OPTION_BIOS); }
360360   bool cheat() const { return bool_value(OPTION_CHEAT); }
361361   bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); }
362   const char *ui_font() const { return value(OPTION_UI_FONT); }   
362   const char *ui_font() const { return value(OPTION_UI_FONT); }
363363   const char *ui() const { return value(OPTION_UI); }
364364   const char *ram_size() const { return value(OPTION_RAMSIZE); }
365365
r253707r253708
368368   const char *comm_localport() const { return value(OPTION_COMM_LOCAL_PORT); }
369369   const char *comm_remotehost() const { return value(OPTION_COMM_REMOTE_HOST); }
370370   const char *comm_remoteport() const { return value(OPTION_COMM_REMOTE_PORT); }
371   
372371
372
373373   bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); }
374374   bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); }
375375
r253707r253708
378378   const char *autoboot_script() const { return value(OPTION_AUTOBOOT_SCRIPT); }
379379
380380   bool console() const { return bool_value(OPTION_CONSOLE); }
381   
381
382382   const char *language() const { return value(OPTION_LANGUAGE); }
383383
384384   // FIXME: Couriersud: This should be in image_device_exit
trunk/src/emu/ioport.cpp
r253707r253708
24792479      m_has_dips(false),
24802480      m_has_bioses(false),
24812481      m_autofire_toggle(false),
2482      m_autofire_delay(3)               // 1 seems too fast for a bunch of games
2482      m_autofire_delay(3)                 // 1 seems too fast for a bunch of games
24832483{
24842484   memset(m_type_to_entry, 0, sizeof(m_type_to_entry));
24852485}
r253707r253708
35553555/*template<>
35563556void ioport_manager::timecode_write<bool>(bool value)
35573557{
3558   UINT8 byte = UINT8(value);
3559   timecode_write(byte);
3558    UINT8 byte = UINT8(value);
3559    timecode_write(byte);
35603560}*/
35613561template<>
35623562void ioport_manager::timecode_write<std::string>(std::string value) {
trunk/src/emu/ioport.h
r253707r253708
10961096   struct user_settings
10971097   {
10981098      ioport_value    value;                  // for DIP switches
1099      bool         autofire;            // for autofire settings
1099      bool            autofire;               // for autofire settings
11001100      input_seq       seq[SEQ_TYPE_TOTAL];    // sequences of all types
11011101      INT32           sensitivity;            // for analog controls
11021102      INT32           delta;                  // for analog controls
r253707r253708
14861486   UINT64                  m_playback_accumulated_speed; // accumulated speed during playback
14871487   UINT32                  m_playback_accumulated_frames; // accumulated frames during playback
14881488   emu_file                m_timecode_file;        // timecode/frames playback file (NULL if not recording)
1489   int                  m_timecode_count;
1490   attotime            m_timecode_last_time;
1489   int                     m_timecode_count;
1490   attotime                m_timecode_last_time;
14911491
14921492   // has...
14931493   bool                    m_has_configs;
trunk/src/emu/language.cpp
r253707r253708
22// copyright-holders:Miodrag Milanovic
33/***************************************************************************
44
5   language.cpp
5    language.cpp
66
7   Multi-language support.
7    Multi-language support.
88
99***************************************************************************/
1010
r253707r253708
7575      }
7676      global_free_array(buffer);
7777   }
78}
No newline at end of file
78}
trunk/src/emu/language.h
r253707r253708
22// copyright-holders:Miodrag Milanovic
33/***************************************************************************
44
5   language.h
5    language.h
66
7   Multi-language support.
7    Multi-language support.
88
99***************************************************************************/
1010#pragma once
r253707r253708
2020//  LOCALIZATION SUPPORT
2121//**************************************************************************
2222
23#define _(param)   lang_translate(param)
23#define _(param)    lang_translate(param)
2424// Fake one to make possible using it in static text definitions, on those
2525// lang_translate must be called afterwards
26#define __(param)   param
26#define __(param)   param
2727
2828void load_translation(emu_options &option);
2929const char *lang_translate(const char *word);
3030
3131#endif /*__LANGUAGE_H__*/
32
trunk/src/emu/luaengine.cpp
r253707r253708
5151   int luaopen_zlib(lua_State *L);
5252   int luaopen_luv(lua_State *L);
5353   int luaopen_lfs(lua_State *L);
54   uv_loop_t* luv_loop(lua_State* L);   
54   uv_loop_t* luv_loop(lua_State* L);
5555}
5656
5757static void lstop(lua_State *L, lua_Debug *ar)
r253707r253708
744744         luaL_error(L, "%s", error.c_str());
745745      }
746746   }
747   
747
748748   switch (e->type())
749749   {
750750      case OPTION_BOOLEAN:
r253707r253708
11941194   lua_gc(m_lua_state, LUA_GCSTOP, 0);  /* stop collector during initialization */
11951195   luaL_openlibs(m_lua_state);  /* open libraries */
11961196
1197    // Get package.preload so we can store builtins in it.
1197      // Get package.preload so we can store builtins in it.
11981198   lua_getglobal(m_lua_state, "package");
11991199   lua_getfield(m_lua_state, -1, "preload");
12001200   lua_remove(m_lua_state, -2); // Remove package
r253707r253708
12051205
12061206   lua_pushcfunction(m_lua_state, luaopen_zlib);
12071207   lua_setfield(m_lua_state, -2, "zlib");
1208   
1208
12091209   lua_pushcfunction(m_lua_state, luaopen_lsqlite3);
12101210   lua_setfield(m_lua_state, -2, "lsqlite3");
12111211
12121212   lua_pushcfunction(m_lua_state, luaopen_lfs);
12131213   lua_setfield(m_lua_state, -2, "lfs");
1214   
1214
12151215   luaopen_ioport(m_lua_state);
12161216
12171217   lua_gc(m_lua_state, LUA_GCRESTART, 0);
r253707r253708
16681668   auto loop = luv_loop(m_lua_state);
16691669   if (loop!=nullptr)
16701670      uv_run(loop, UV_RUN_NOWAIT);
1671   
1671
16721672}
16731673
16741674//-------------------------------------------------
trunk/src/emu/machine.cpp
r253707r253708
22// copyright-holders:Aaron Giles
33/***************************************************************************
44
5   machine.c
5    machine.c
66
7   Controls execution of the core MAME system.
7    Controls execution of the core MAME system.
88
99****************************************************************************
1010
11   Since there has been confusion in the past over the order of
12   initialization and other such things, here it is, all spelled out
13   as of January, 2008:
11    Since there has been confusion in the past over the order of
12    initialization and other such things, here it is, all spelled out
13    as of January, 2008:
1414
15   main()
16      - does platform-specific init
17      - calls mame_execute() [mame.c]
15    main()
16        - does platform-specific init
17        - calls mame_execute() [mame.c]
1818
19      mame_execute() [mame.c]
20         - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers
21         - begins resource tracking (level 1)
22         - calls create_machine [mame.c] to initialize the running_machine structure
23         - calls init_machine() [mame.c]
19        mame_execute() [mame.c]
20            - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers
21            - begins resource tracking (level 1)
22            - calls create_machine [mame.c] to initialize the running_machine structure
23            - calls init_machine() [mame.c]
2424
25         init_machine() [mame.c]
26            - calls fileio_init() [fileio.c] to initialize file I/O info
27            - calls config_init() [config.c] to initialize configuration system
28            - calls input_init() [input.c] to initialize the input system
29            - calls output_init() [output.c] to initialize the output system
30            - calls state_init() [state.c] to initialize save state system
31            - calls state_save_allow_registration() [state.c] to allow registrations
32            - calls palette_init() [palette.c] to initialize palette system
33            - calls render_init() [render.c] to initialize the rendering system
34            - calls ui_init() [ui.c] to initialize the user interface
35            - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures
36            - calls timer_init() [timer.c] to reset the timer system
37            - calls osd_init() [osdepend.h] to do platform-specific initialization
38            - calls input_port_init() [inptport.c] to set up the input ports
39            - calls rom_init() [romload.c] to load the game's ROMs
40            - calls memory_init() [memory.c] to process the game's memory maps
41            - calls the driver's DRIVER_INIT callback
42            - calls device_list_start() [devintrf.c] to start any devices
43            - calls video_init() [video.c] to start the video system
44            - calls tilemap_init() [tilemap.c] to start the tilemap system
45            - calls crosshair_init() [crsshair.c] to configure the crosshairs
46            - calls sound_init() [sound.c] to start the audio system
47            - calls debugger_init() [debugger.c] to set up the debugger
48            - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks
49            - calls cheat_init() [cheat.c] to initialize the cheat system
50            - calls image_init() [image.c] to initialize the image system
25            init_machine() [mame.c]
26                - calls fileio_init() [fileio.c] to initialize file I/O info
27                - calls config_init() [config.c] to initialize configuration system
28                - calls input_init() [input.c] to initialize the input system
29                - calls output_init() [output.c] to initialize the output system
30                - calls state_init() [state.c] to initialize save state system
31                - calls state_save_allow_registration() [state.c] to allow registrations
32                - calls palette_init() [palette.c] to initialize palette system
33                - calls render_init() [render.c] to initialize the rendering system
34                - calls ui_init() [ui.c] to initialize the user interface
35                - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures
36                - calls timer_init() [timer.c] to reset the timer system
37                - calls osd_init() [osdepend.h] to do platform-specific initialization
38                - calls input_port_init() [inptport.c] to set up the input ports
39                - calls rom_init() [romload.c] to load the game's ROMs
40                - calls memory_init() [memory.c] to process the game's memory maps
41                - calls the driver's DRIVER_INIT callback
42                - calls device_list_start() [devintrf.c] to start any devices
43                - calls video_init() [video.c] to start the video system
44                - calls tilemap_init() [tilemap.c] to start the tilemap system
45                - calls crosshair_init() [crsshair.c] to configure the crosshairs
46                - calls sound_init() [sound.c] to start the audio system
47                - calls debugger_init() [debugger.c] to set up the debugger
48                - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks
49                - calls cheat_init() [cheat.c] to initialize the cheat system
50                - calls image_init() [image.c] to initialize the image system
5151
52         - calls config_load_settings() [config.c] to load the configuration file
53         - calls nvram_load [machine/generic.c] to load NVRAM
54         - calls ui_display_startup_screens() [ui.c] to display the startup screens
55         - begins resource tracking (level 2)
56         - calls soft_reset() [mame.c] to reset all systems
52            - calls config_load_settings() [config.c] to load the configuration file
53            - calls nvram_load [machine/generic.c] to load NVRAM
54            - calls ui_display_startup_screens() [ui.c] to display the startup screens
55            - begins resource tracking (level 2)
56            - calls soft_reset() [mame.c] to reset all systems
5757
58            -------------------( at this point, we're up and running )----------------------
58                -------------------( at this point, we're up and running )----------------------
5959
60         - calls scheduler->timeslice() [schedule.c] over and over until we exit
61         - ends resource tracking (level 2), freeing all auto_mallocs and timers
62         - calls the nvram_save() [machine/generic.c] to save NVRAM
63         - calls config_save_settings() [config.c] to save the game's configuration
64         - calls all registered exit routines [mame.c]
65         - ends resource tracking (level 1), freeing all auto_mallocs and timers
60            - calls scheduler->timeslice() [schedule.c] over and over until we exit
61            - ends resource tracking (level 2), freeing all auto_mallocs and timers
62            - calls the nvram_save() [machine/generic.c] to save NVRAM
63            - calls config_save_settings() [config.c] to save the game's configuration
64            - calls all registered exit routines [mame.c]
65            - ends resource tracking (level 1), freeing all auto_mallocs and timers
6666
67      - exits the program
67        - exits the program
6868
6969***************************************************************************/
7070
r253707r253708
13261326{
13271327   second  = t.tm_sec;
13281328   minute  = t.tm_min;
1329   hour   = t.tm_hour;
1330   mday   = t.tm_mday;
1329   hour    = t.tm_hour;
1330   mday    = t.tm_mday;
13311331   month   = t.tm_mon;
1332   year   = t.tm_year + 1900;
1332   year    = t.tm_year + 1900;
13331333   weekday = t.tm_wday;
1334   day    = t.tm_yday;
1334   day = t.tm_yday;
13351335   is_dst  = t.tm_isdst;
13361336}
13371337
trunk/src/emu/ui/auditmenu.cpp
r253707r253708
1// license:BSD-3-Clause
1// license:BSD-3-Clause
22// copyright-holders:Dankan1890
33/*********************************************************************
44
trunk/src/emu/ui/cheatopt.cpp
r253707r253708
192192         if (menu_event->itemref == ITEMREF_AUTOFIRE_STATUS)
193193         {
194194            // toggle autofire status
195            bool autofire_toggle = machine().ioport().get_autofire_toggle();    // (menu_event->iptkey == IPT_UI_LEFT);
195            bool autofire_toggle = machine().ioport().get_autofire_toggle();    // (menu_event->iptkey == IPT_UI_LEFT);
196196            machine().ioport().set_autofire_toggle(!autofire_toggle);
197197            changed = true;
198198         }
r253707r253708
321321
322322   last_toggle = autofire_toggle;
323323}
324
325
trunk/src/emu/ui/ctrlmenu.cpp
r253707r253708
4444ui_menu_controller_mapping::~ui_menu_controller_mapping()
4545{
4646   std::string error_string;
47   for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
47   for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
4848   {
4949      if (strcmp(machine().options().value(m_options[d].option),m_device_status[m_options[d].status])!=0)
5050      {
r253707r253708
104104   ui_manager &mui = machine().ui();
105105
106106   mui.draw_text_full(container, _("Device Mapping"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
107                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
107                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
108108   width += 2 * UI_BOX_LR_BORDER;
109109   maxwidth = MAX(maxwidth, width);
110110
r253707r253708
124124
125125   // draw the text within it
126126   mui.draw_text_full(container, _("Device Mapping"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
127                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
127                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
128128
129129}
130130
trunk/src/emu/ui/custmenu.cpp
r253707r253708
1// license:BSD-3-Clause
1// license:BSD-3-Clause
22// copyright-holders:Dankan1890
33/*********************************************************************
44
r253707r253708
208208
209209   // get the size of the text
210210   mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
211                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
211                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
212212   width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
213213   float maxwidth = MAX(width, origx2 - origx1);
214214
r253707r253708
228228
229229   // draw the text within it
230230   mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
231                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
231                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
232232}
233233
234234//-------------------------------------------------
r253707r253708
521521
522522   // get the size of the text
523523   mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
524                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
524                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
525525   width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
526526   float maxwidth = MAX(width, origx2 - origx1);
527527
r253707r253708
541541
542542   // draw the text within it
543543   mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
544                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
544                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
545545}
546546
547547//-------------------------------------------------
r253707r253708
577577      file.close();
578578   }
579579}
580
trunk/src/emu/ui/custui.cpp
r253707r253708
1// license:BSD-3-Clause
1// license:BSD-3-Clause
22// copyright-holders:Dankan1890
33/*********************************************************************
44
r253707r253708
1616#include "ui/utils.h"
1717#include <algorithm>
1818
19const char *ui_menu_custom_ui::hide_status[] = {
20   __("Show All"),
21   __("Hide Filters"),
22   __("Hide Info/Image"),
19const char *ui_menu_custom_ui::hide_status[] = {
20   __("Show All"),
21   __("Hide Filters"),
22   __("Hide Info/Image"),
2323   __("Hide Both") };
2424
2525//-------------------------------------------------
r253707r253708
6363   ui_globals::reset = true;
6464}
6565
66//-------------------------------------------------   
66//-------------------------------------------------
6767//  handle
6868//-------------------------------------------------
6969
r253707r253708
160160   ui_manager &mui = machine().ui();
161161
162162   mui.draw_text_full(container, _("Custom UI Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
163                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
163                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
164164   width += 2 * UI_BOX_LR_BORDER;
165165   float maxwidth = MAX(origx2 - origx1, width);
166166
r253707r253708
180180
181181   // draw the text within it
182182   mui.draw_text_full(container, _("Custom UI Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
183                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
183                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
184184}
185185
186186//-------------------------------------------------
r253707r253708
406406   std::string topbuf(_("UI Fonts Settings"));
407407
408408   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
409                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
409                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
410410   width += 2 * UI_BOX_LR_BORDER;
411411   float maxwidth = MAX(origx2 - origx1, width);
412412
r253707r253708
426426
427427   // draw the text within it
428428   mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
429                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
429                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
430430
431431   if ((FPTR)selectedref == INFOS_SIZE)
432432   {
433433      topbuf = _("Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
434434
435435      mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
436                                    DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size);
436                              DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size);
437437      width += 2 * UI_BOX_LR_BORDER;
438438      maxwidth = MAX(origx2 - origx1, width);
439439
r253707r253708
453453
454454      // draw the text within it
455455      mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
456                                    DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, m_info_size);
456                              DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, m_info_size);
457457   }
458458}
459459
r253707r253708
565565   std::string topbuf(_("UI Colors Settings"));
566566
567567   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
568                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
568                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
569569   width += 2 * UI_BOX_LR_BORDER;
570570   maxwidth = MAX(maxwidth, width);
571571
r253707r253708
585585
586586   // draw the text within it
587587   mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
588                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
588                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
589589
590590   // bottom text
591591   // get the text for 'UI Select'
r253707r253708
593593   topbuf.assign(_("Double click or press ")).append(ui_select_text.c_str()).append(_(" to change the color value"));
594594
595595   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
596                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
596                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
597597   width += 2 * UI_BOX_LR_BORDER;
598598   maxwidth = MAX(maxwidth, width);
599599
r253707r253708
613613
614614   // draw the text within it
615615   mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
616                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
616                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
617617
618618   // compute maxwidth
619619   topbuf = _("Menu Preview");
620620
621621   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
622                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
622                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
623623   maxwidth = width + 2.0f * UI_BOX_LR_BORDER;
624624
625625   std::string sampletxt[5];
r253707r253708
633633   for (auto & elem: sampletxt)
634634   {
635635      mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
636                                    DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
636                              DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
637637      width += 2 * UI_BOX_LR_BORDER;
638638      maxwidth = MAX(maxwidth, width);
639639   }
r253707r253708
655655
656656   // draw the text within it
657657   mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
658                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
658                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
659659
660660   // compute our bounds for menu preview
661661   x1 -= UI_BOX_LR_BORDER;
r253707r253708
673673
674674   // draw normal text
675675   mui.draw_text_full(container, sampletxt[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
676                                 DRAW_NORMAL, m_color_table[MUI_TEXT_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
676                           DRAW_NORMAL, m_color_table[MUI_TEXT_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
677677   y1 += line_height;
678678
679679   // draw subitem text
680680   mui.draw_text_full(container, sampletxt[1].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
681                                 DRAW_NORMAL, m_color_table[MUI_SUBITEM_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
681                           DRAW_NORMAL, m_color_table[MUI_SUBITEM_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
682682   y1 += line_height;
683683
684684   // draw selected text
685685   highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_SELECTED_BG_COLOR].color);
686686   mui.draw_text_full(container, sampletxt[2].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
687                                 DRAW_NORMAL, m_color_table[MUI_SELECTED_COLOR].color, m_color_table[MUI_SELECTED_BG_COLOR].color, nullptr, nullptr);
687                           DRAW_NORMAL, m_color_table[MUI_SELECTED_COLOR].color, m_color_table[MUI_SELECTED_BG_COLOR].color, nullptr, nullptr);
688688   y1 += line_height;
689689
690690   // draw mouse over text
691691   highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_MOUSEOVER_BG_COLOR].color);
692692   mui.draw_text_full(container, sampletxt[3].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
693                                 DRAW_NORMAL, m_color_table[MUI_MOUSEOVER_COLOR].color, m_color_table[MUI_MOUSEOVER_BG_COLOR].color, nullptr, nullptr);
693                           DRAW_NORMAL, m_color_table[MUI_MOUSEOVER_COLOR].color, m_color_table[MUI_MOUSEOVER_BG_COLOR].color, nullptr, nullptr);
694694   y1 += line_height;
695695
696696   // draw clone text
697697   mui.draw_text_full(container, sampletxt[4].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
698                                 DRAW_NORMAL, m_color_table[MUI_CLONE_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
698                           DRAW_NORMAL, m_color_table[MUI_CLONE_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
699699
700700}
701701
r253707r253708
912912   // top text
913913   std::string topbuf = std::string(m_title).append(_(" - ARGB Settings"));
914914   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
915                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
915                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
916916   width += 2 * UI_BOX_LR_BORDER;
917917   maxwidth = MAX(maxwidth, width);
918918
r253707r253708
932932
933933   // draw the text within it
934934   mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
935                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
935                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
936936
937937   std::string sampletxt(_("Color preview ="));
938938   maxwidth = origx2 - origx1;
939939   mui.draw_text_full(container, sampletxt.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
940                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
940                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
941941   width += 2 * UI_BOX_LR_BORDER;
942942   maxwidth = MAX(maxwidth, width);
943943
r253707r253708
957957
958958   // draw the normal text
959959   mui.draw_text_full(container, sampletxt.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
960                                 DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
960                           DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
961961
962962   float t_x2 = x1 - UI_BOX_LR_BORDER + maxwidth;
963963   x1 = x2 + 2.0f * UI_BOX_LR_BORDER;
r253707r253708
10461046//  ctor
10471047//-------------------------------------------------
10481048
1049ui_menu_palette_sel::ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color)
1049ui_menu_palette_sel::ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color)
10501050   : ui_menu(machine, container), m_original(_color)
10511051{
10521052}
trunk/src/emu/ui/custui.h
r253707r253708
6868   };
6969
7070#ifdef UI_WINDOWS
71   UINT16                  m_actual;
72   std::vector<std::string>   m_fonts;
73   bool                  m_bold, m_italic;
71   UINT16                      m_actual;
72   std::vector<std::string>    m_fonts;
73   bool                        m_bold, m_italic;
7474
7575   void list();
7676   static int CALLBACK EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam);
trunk/src/emu/ui/datfile.cpp
r253707r253708
2525static std::string TAG_END("$end");
2626static std::string TAG_DRIVER("$drv");
2727static std::string TAG_STORY("$story");
28static std::string TAG_HISTORY_R("## REVISION:");
28static std::string TAG_HISTORY_R("## REVISION:");
2929static std::string TAG_MAMEINFO_R("# MAMEINFO.DAT");
3030static std::string TAG_MESSINFO_R("#     MESSINFO.DAT");
3131static std::string TAG_SYSINFO_R("# This file was generated on");
r253707r253708
540540}
541541
542542//---------------------------------------------------------
543//   parseopen - Open up file for reading
543//  parseopen - Open up file for reading
544544//---------------------------------------------------------
545545bool datfile_manager::parseopen(const char *filename)
546546{
r253707r253708
647647         menuitems.push_back(elem.first);
648648      parseclose();
649649   }
650}
No newline at end of file
650}
trunk/src/emu/ui/datfile.h
r253707r253708
3838   std::string rev_messinfo() const { return m_mess_rev; }
3939   std::string rev_sysinfo() const { return m_sysinfo_rev; }
4040   std::string rev_storyinfo() const { return m_story_rev; }
41   
41
4242   bool has_history(const game_driver *driver) { return (m_histidx.find(driver) != m_histidx.end()); }
4343   bool has_mameinfo(const game_driver *driver) { return (m_mameidx.find(driver) != m_mameidx.end()); }
4444   bool has_messinfo(const game_driver *driver) { return (m_messidx.find(driver) != m_messidx.end()); }
r253707r253708
4646   bool has_sysinfo(const game_driver *driver) { return (m_sysidx.find(driver) != m_sysidx.end()); }
4747   bool has_story(const game_driver *driver) { return (m_storyidx.find(driver) != m_storyidx.end()); }
4848
49   bool has_data(const game_driver *d)
50   {
49   bool has_data(const game_driver *d)
50   {
5151      return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d));
5252   }
5353private:
r253707r253708
8484   running_machine     &m_machine;             // reference to our machine
8585   std::string         m_fullpath;
8686   static std::string  m_history_rev, m_mame_rev, m_mess_rev, m_sysinfo_rev, m_story_rev;
87   FILE            *fp = nullptr;
88   static bool         first_run;
87   FILE                *fp = nullptr;
88   static bool         first_run;
8989};
9090
9191
trunk/src/emu/ui/datmenu.cpp
r253707r253708
1// license:BSD-3-Clause
1// license:BSD-3-Clause
22// copyright-holders:Dankan1890
33/*********************************************************************
44
r253707r253708
198198   std::string revision;
199199   revision.assign(_("Revision: ")).append(m_items_list[actual].revision);
200200   mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
201                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
201                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
202202   width += 2 * UI_BOX_LR_BORDER;
203203   maxwidth = MAX(origx2 - origx1, width);
204204
r253707r253708
218218
219219   // draw the text within it
220220   mui.draw_text_full(container, revision.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
221                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
221                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
222222}
223223
224224//-------------------------------------------------
r253707r253708
300300   if (datfile.has_command(m_driver))
301301      m_items_list.emplace_back(_("Command"), UI_COMMAND_LOAD, "");
302302}
303
trunk/src/emu/ui/datmenu.h
r253707r253708
3131   virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
3232
3333private:
34   int   actual;
34   int actual;
3535   const game_driver  *m_driver;
3636   ui_software_info *m_swinfo;
3737   std::string m_list, m_short, m_long, m_parent;
r253707r253708
4343   {
4444      list_items(std::string l, int i, std::string rev) { label = l; option = i; revision = rev; }
4545      std::string label;
46      int   option;
46      int option;
4747      std::string revision;
4848   };
4949   std::vector<list_items> m_items_list;
trunk/src/emu/ui/dirmenu.cpp
r253707r253708
1// license:BSD-3-Clause
1// license:BSD-3-Clause
22// copyright-holders:Dankan1890
33/*********************************************************************
44
r253707r253708
2828
2929static const folders_entry s_folders[] =
3030{
31   { __("ROMs"),                OPTION_MEDIAPATH,         ADDING },
32   { __("UI"),                  OPTION_UI_PATH,         CHANGE },
33   { __("Language"),            OPTION_LANGUAGEPATH,      CHANGE },
34   { __("Samples"),             OPTION_SAMPLEPATH,         ADDING },
35   { __("DATs"),                OPTION_HISTORY_PATH,      CHANGE },
36   { __("INIs"),                OPTION_INIPATH,         ADDING },
37   { __("Extra INIs"),          OPTION_EXTRAINI_PATH,      CHANGE },
38   { __("Icons"),               OPTION_ICONS_PATH,         ADDING },
39   { __("Cheats"),              OPTION_CHEATPATH,         ADDING },
40   { __("Snapshots"),           OPTION_SNAPSHOT_DIRECTORY,   ADDING },
41   { __("Cabinets"),            OPTION_CABINETS_PATH,      ADDING },
42   { __("Flyers"),              OPTION_FLYERS_PATH,      ADDING },
43   { __("Titles"),              OPTION_TITLES_PATH,      ADDING },
44   { __("Ends"),                OPTION_ENDS_PATH,         ADDING },
45   { __("PCBs"),                OPTION_PCBS_PATH,         ADDING },
46   { __("Marquees"),            OPTION_MARQUEES_PATH,      ADDING },
47   { __("Controls Panels"),     OPTION_CPANELS_PATH,      ADDING },
48   { __("Crosshairs"),          OPTION_CROSSHAIRPATH,      ADDING },
49   { __("Artworks"),            OPTION_ARTPATH,         ADDING },
50   { __("Bosses"),              OPTION_BOSSES_PATH,      ADDING },
51   { __("Artworks Preview"),    OPTION_ARTPREV_PATH,      ADDING },
52   { __("Select"),              OPTION_SELECT_PATH,      ADDING },
53   { __("GameOver"),            OPTION_GAMEOVER_PATH,      ADDING },
54   { __("HowTo"),               OPTION_HOWTO_PATH,         ADDING },
55   { __("Logos"),               OPTION_LOGOS_PATH,         ADDING },
56   { __("Scores"),              OPTION_SCORES_PATH,      ADDING },
57   { __("Versus"),              OPTION_VERSUS_PATH,      ADDING },
31   { __("ROMs"),                OPTION_MEDIAPATH,          ADDING },
32   { __("UI"),                  OPTION_UI_PATH,            CHANGE },
33   { __("Language"),            OPTION_LANGUAGEPATH,       CHANGE },
34   { __("Samples"),             OPTION_SAMPLEPATH,         ADDING },
35   { __("DATs"),                OPTION_HISTORY_PATH,       CHANGE },
36   { __("INIs"),                OPTION_INIPATH,            ADDING },
37   { __("Extra INIs"),          OPTION_EXTRAINI_PATH,      CHANGE },
38   { __("Icons"),               OPTION_ICONS_PATH,         ADDING },
39   { __("Cheats"),              OPTION_CHEATPATH,          ADDING },
40   { __("Snapshots"),           OPTION_SNAPSHOT_DIRECTORY, ADDING },
41   { __("Cabinets"),            OPTION_CABINETS_PATH,      ADDING },
42   { __("Flyers"),              OPTION_FLYERS_PATH,        ADDING },
43   { __("Titles"),              OPTION_TITLES_PATH,        ADDING },
44   { __("Ends"),                OPTION_ENDS_PATH,          ADDING },
45   { __("PCBs"),                OPTION_PCBS_PATH,          ADDING },
46   { __("Marquees"),            OPTION_MARQUEES_PATH,      ADDING },
47   { __("Controls Panels"),     OPTION_CPANELS_PATH,       ADDING },
48   { __("Crosshairs"),          OPTION_CROSSHAIRPATH,      ADDING },
49   { __("Artworks"),            OPTION_ARTPATH,            ADDING },
50   { __("Bosses"),              OPTION_BOSSES_PATH,        ADDING },
51   { __("Artworks Preview"),    OPTION_ARTPREV_PATH,       ADDING },
52   { __("Select"),              OPTION_SELECT_PATH,        ADDING },
53   { __("GameOver"),            OPTION_GAMEOVER_PATH,      ADDING },
54   { __("HowTo"),               OPTION_HOWTO_PATH,         ADDING },
55   { __("Logos"),               OPTION_LOGOS_PATH,         ADDING },
56   { __("Scores"),              OPTION_SCORES_PATH,        ADDING },
57   { __("Versus"),              OPTION_VERSUS_PATH,        ADDING },
5858};
5959
6060
r253707r253708
9494
9595void ui_menu_directory::populate()
9696{
97
9897   for (auto & elem : s_folders)
9998      item_append(_(elem.name), nullptr, 0, (void *)(FPTR)elem.action);
10099
r253707r253708
143142//  ctor / dtor
144143//-------------------------------------------------
145144
146ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref)
145ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref)
147146   : ui_menu(machine, container), m_ref(ref)
148147{
149148}
r253707r253708
238237   y1 += UI_BOX_TB_BORDER;
239238
240239   // draw the text within it
241   mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
240   mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
242241      DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
243242
244243   // compute our bounds
r253707r253708
376375               {
377376                  machine().ui().options().set_value(s_folders[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
378377               }
379               else
378               else
380379               {
381380                  if (strcmp(machine().options().value(s_folders[m_ref].option), m_current_path.c_str()) != 0)
382381                  {
r253707r253708
401400               {
402401                  machine().ui().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
403402               }
404               else
403               else
405404               {
406405                  if (strcmp(machine().options().value(s_folders[m_ref].option), tmppath.c_str()) != 0)
407406                  {
r253707r253708
582581ui_menu_remove_folder::ui_menu_remove_folder(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container)
583582{
584583   m_ref = ref;
585   if (machine.ui().options().exists(s_folders[m_ref].option))
584   if (machine.ui().options().exists(s_folders[m_ref].option))
586585      m_searchpath.assign(machine.ui().options().value(s_folders[m_ref].option));
587   else
586   else
588587      m_searchpath.assign(machine.options().value(s_folders[m_ref].option));
589588
590589   path_iterator path(m_searchpath.c_str());
r253707r253708
620619      {
621620         machine().ui().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
622621      }
623      else
622      else
624623      {
625624         if (strcmp(machine().options().value(s_folders[m_ref].option),tmppath.c_str())!=0)
626625         {
627            machine().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);           
626            machine().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
628627            machine().options().mark_changed(s_folders[m_ref].option);
629628         }
630629      }
r253707r253708
679678   y1 += UI_BOX_TB_BORDER;
680679
681680   // draw the text within it
682   mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL,
681   mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL,
683682      UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
684683}
trunk/src/emu/ui/dsplmenu.cpp
r253707r253708
1// license:BSD-3-Clause
1// license:BSD-3-Clause
22// copyright-holders:Dankan1890
33/*********************************************************************
44
r253707r253708
2323
2424
2525ui_menu_display_options::video_modes ui_menu_display_options::m_video = {
26   { "auto",   "Auto" },
27   { "opengl",   "OpenGL" },
28   { "bgfx",   "BGFX" },
29   { "d3d",   "Direct3D" },
26   { "auto",   "Auto" },
27   { "opengl", "OpenGL" },
28   { "bgfx",   "BGFX" },
29   { "d3d",    "Direct3D" },
3030   { "gdi",    "GDI" },
3131   { "ddraw",  "DirectDraw" },
3232   { "soft",   "Software" },
r253707r253708
107107ui_menu_display_options::~ui_menu_display_options()
108108{
109109   std::string error_string;
110   for (int d = 2; d < ARRAY_LENGTH(m_options); ++d)
110   for (int d = 2; d < ARRAY_LENGTH(m_options); ++d)
111111   {
112112      if (machine().options().int_value(m_options[d].option) != m_options[d].status)
113113      {
114114         machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
115115         machine().options().mark_changed(m_options[d].option);
116      }   
116      }
117117   }
118118   if (machine().options().value(m_options[1].option) !=  m_list[m_options[1].status])
119119   {
120120      machine().options().set_value(m_options[1].option, m_list[m_options[1].status].c_str(), OPTION_PRIORITY_CMDLINE, error_string);
121121      machine().options().mark_changed(m_options[1].option);
122122
123   }   
123   }
124124   ui_globals::reset = true;
125125}
126126
trunk/src/emu/ui/inifile.cpp
r253707r253708
142142}
143143
144144//---------------------------------------------------------
145//   parseopen - Open up file for reading
145//  parseopen - Open up file for reading
146146//---------------------------------------------------------
147147
148148bool inifile_manager::parseopen(const char *filename)
r253707r253708
303303         image_loaded = true;
304304         for (size_t current = 0; current < m_list.size(); current++)
305305            if (m_list[current].shortname == swinfo->shortname() &&
306                m_list[current].listname == image->software_list_name())
306               m_list[current].listname == image->software_list_name())
307307            {
308308               m_current = current;
309309               return true;
trunk/src/emu/ui/inifile.h
r253707r253708
7070   // internal state
7171   running_machine &m_machine;  // reference to our machine
7272   std::string     m_fullpath;
73   FILE         *fp = nullptr;
73   FILE            *fp = nullptr;
7474};
7575
7676//-------------------------------------------------
r253707r253708
108108
109109private:
110110   const char *favorite_filename = "favorites.ini";
111   
111
112112   // current
113113   int m_current;
114114
trunk/src/emu/ui/mainmenu.cpp
r253707r253708
138138   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
139139
140140   /* add favorite menu */
141    if (!machine().favorite().isgame_favorite())
141   if (!machine().favorite().isgame_favorite())
142142      item_append(_("Add To Favorites"), nullptr, 0, (void *)ADD_FAVORITE);
143143   else
144144      item_append(_("Remove From Favorites"), nullptr, 0, (void *)REMOVE_FAVORITE);
145145
146146   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
147147
148//   item_append(_("Quit from Machine"), nullptr, 0, (void *)QUIT_GAME);
148//  item_append(_("Quit from Machine"), nullptr, 0, (void *)QUIT_GAME);
149149
150150   /* add reset and exit menus */
151151   item_append(_("Select New Machine"), nullptr, 0, (void *)SELECT_GAME);
r253707r253708
246246            ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine(), container, nullptr));
247247         } else {
248248            ui_menu::stack_push(global_alloc_clear<ui_menu_select_game>(machine(), container, nullptr));
249         }     
249         }
250250         break;
251251
252252      case BIOS_SELECTION:
r253707r253708
262262         break;
263263
264264      case ADD_FAVORITE:
265            machine().favorite().add_favorite_game();
265         machine().favorite().add_favorite_game();
266266         reset(UI_MENU_RESET_REMEMBER_POSITION);
267267         break;
268268
269269      case REMOVE_FAVORITE:
270            machine().favorite().remove_favorite_game();
270         machine().favorite().remove_favorite_game();
271271         reset(UI_MENU_RESET_REMEMBER_POSITION);
272272         break;
273273
trunk/src/emu/ui/menu.cpp
r253707r253708
22// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
33/*********************************************************************
44
5   ui/menu.c
5    ui/menu.c
66
7   Internal MAME menus for the user interface.
7    Internal MAME menus for the user interface.
88
99*********************************************************************/
1010
r253707r253708
2727
2828
2929/***************************************************************************
30   CONSTANTS
30    CONSTANTS
3131***************************************************************************/
3232
3333#define UI_MENU_POOL_SIZE  65536
r253707r253708
6868};
6969
7070/***************************************************************************
71   GLOBAL VARIABLES
71    GLOBAL VARIABLES
7272***************************************************************************/
7373
7474ui_menu *ui_menu::menu_stack;
r253707r253708
9393bitmap_argb32 *ui_menu::sw_toolbar_bitmap[UI_TOOLBAR_BUTTONS];
9494
9595/***************************************************************************
96   INLINE FUNCTIONS
96    INLINE FUNCTIONS
9797***************************************************************************/
9898
9999//-------------------------------------------------
r253707r253708
126126
127127
128128/***************************************************************************
129   CORE SYSTEM MANAGEMENT
129    CORE SYSTEM MANAGEMENT
130130***************************************************************************/
131131
132132//-------------------------------------------------
r253707r253708
193193
194194
195195/***************************************************************************
196   CORE MENU MANAGEMENT
196    CORE MENU MANAGEMENT
197197***************************************************************************/
198198
199199//-------------------------------------------------
r253707r253708
334334   menu_event.iptkey = IPT_INVALID;
335335
336336   // first make sure our selection is valid
337//   if (!(flags & UI_MENU_PROCESS_NOINPUT))
337//  if (!(flags & UI_MENU_PROCESS_NOINPUT))
338338      validate_selection(1);
339339
340340   // draw the menu
r253707r253708
451451
452452
453453/***************************************************************************
454   INTERNAL MENU PROCESSING
454    INTERNAL MENU PROCESSING
455455***************************************************************************/
456456
457457//-------------------------------------------------
r253707r253708
713713
714714      // compute the multi-line target width/height
715715      machine().ui().draw_text_full(container, pitem.subtext, 0, 0, visible_width * 0.75f,
716                                    JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
716                              JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
717717
718718      // determine the target location
719719      target_x = visible_left + visible_width - target_width - UI_BOX_LR_BORDER;
r253707r253708
725725      machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER,
726726                     target_y - UI_BOX_TB_BORDER,
727727                     target_x + target_width + UI_BOX_LR_BORDER,
728                               target_y + target_height + UI_BOX_TB_BORDER,
729                               subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR);
728                                 target_y + target_height + UI_BOX_TB_BORDER,
729                                 subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR);
730730      machine().ui().draw_text_full(container, pitem.subtext, target_x, target_y, target_width,
731731               JUSTIFY_RIGHT, WRAP_WORD, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr);
732732   }
r253707r253708
736736
737737   // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
738738   visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size());
739//   if (history_flag && (top_line + visible_lines >= item.size()))
740//      selected = item.size() - 1;
739//  if (history_flag && (top_line + visible_lines >= item.size()))
740//      selected = item.size() - 1;
741741}
742742
743743void ui_menu::custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2)
r253707r253708
762762
763763   // compute the multi-line target width/height
764764   machine().ui().draw_text_full(container, text, 0, 0, 1.0f - 2.0f * UI_BOX_LR_BORDER - 2.0f * gutter_width,
765                                 JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
765                           JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
766766   target_height += 2.0f * line_height;
767767   if (target_height > 1.0f - 2.0f * UI_BOX_TB_BORDER)
768768      target_height = floorf((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height;
r253707r253708
787787
788788   // add a box around that
789789   machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER - gutter_width,
790                                     target_y - UI_BOX_TB_BORDER,
791                                     target_x + target_width + gutter_width + UI_BOX_LR_BORDER,
792                                     target_y + target_height + UI_BOX_TB_BORDER,
793                                     (item[0].flags & MENU_FLAG_REDTEXT) ?  UI_RED_COLOR : UI_BACKGROUND_COLOR);
790                              target_y - UI_BOX_TB_BORDER,
791                              target_x + target_width + gutter_width + UI_BOX_LR_BORDER,
792                              target_y + target_height + UI_BOX_TB_BORDER,
793                              (item[0].flags & MENU_FLAG_REDTEXT) ?  UI_RED_COLOR : UI_BACKGROUND_COLOR);
794794   machine().ui().draw_text_full(container, text, target_x, target_y, target_width,
795795            JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
796796
797797   // draw the "return to prior menu" text with a hilight behind it
798798   highlight(container,
799              target_x + 0.5f * UI_LINE_WIDTH,
800              target_y + target_height - line_height,
801              target_x + target_width - 0.5f * UI_LINE_WIDTH,
802              target_y + target_height,
803              UI_SELECTED_BG_COLOR);
799            target_x + 0.5f * UI_LINE_WIDTH,
800            target_y + target_height - line_height,
801            target_x + target_width - 0.5f * UI_LINE_WIDTH,
802            target_y + target_height,
803            UI_SELECTED_BG_COLOR);
804804   machine().ui().draw_text_full(container, backtext, target_x, target_y + target_height - line_height, target_width,
805805            JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr);
806806
r253707r253708
10971097
10981098
10991099/***************************************************************************
1100   MENU STACK MANAGEMENT
1100    MENU STACK MANAGEMENT
11011101***************************************************************************/
11021102
11031103//-------------------------------------------------
r253707r253708
11671167
11681168
11691169/***************************************************************************
1170   UI SYSTEM INTERACTION
1170    UI SYSTEM INTERACTION
11711171***************************************************************************/
11721172
11731173//-------------------------------------------------
r253707r253708
11961196}
11971197
11981198/***************************************************************************
1199   MENU HELPERS
1199    MENU HELPERS
12001200***************************************************************************/
12011201
12021202//-------------------------------------------------
r253707r253708
18481848   if (menu_event.iptkey == IPT_INVALID)
18491849      for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++)
18501850      {
1851         if (ui_error || code == IPT_UI_CONFIGURE || (code == IPT_UI_LEFT && ignoreleft)   || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause))
1851         if (ui_error || code == IPT_UI_CONFIGURE || (code == IPT_UI_LEFT && ignoreleft) || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause))
18521852            continue;
18531853
18541854         if (exclusive_input_pressed(code, 0))
r253707r253708
27682768
27692769   // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
27702770   visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items);
2771}
No newline at end of file
2771}
trunk/src/emu/ui/menu.h
r253707r253708
22// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
33/***************************************************************************
44
5   ui/menu.h
5    ui/menu.h
66
7   Internal MAME menus for the user interface.
7    Internal MAME menus for the user interface.
88
99***************************************************************************/
1010
r253707r253708
1717
1818
1919/***************************************************************************
20   CONSTANTS
20    CONSTANTS
2121***************************************************************************/
2222
2323// flags for menu items
r253707r253708
5555
5656
5757/***************************************************************************
58   TYPE DEFINITIONS
58    TYPE DEFINITIONS
5959***************************************************************************/
6060
6161// menu-related events
r253707r253708
255255   static render_texture *hilight_main_texture;
256256private:
257257   static std::unique_ptr<bitmap_argb32> no_avail_bitmap, bgrnd_bitmap, star_bitmap;
258//   static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
258//  static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
259259   static render_texture *bgrnd_texture, *star_texture;
260260   static bitmap_argb32 *icons_bitmap[];
261261   static render_texture *icons_texture[];
trunk/src/emu/ui/miscmenu.cpp
r253707r253708
651651   ui_manager &mui = machine().ui();
652652
653653   mui.draw_text_full(container, _("Miscellaneous Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
654                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
654                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
655655   width += 2 * UI_BOX_LR_BORDER;
656656   float maxwidth = MAX(origx2 - origx1, width);
657657
r253707r253708
671671
672672   // draw the text within it
673673   mui.draw_text_full(container, _("Miscellaneous Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
674                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
674                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
675675}
trunk/src/emu/ui/moptions.cpp
r253707r253708
1919const options_entry ui_options::s_option_entries[] =
2020{
2121   // seach path options
22   { nullptr,                              nullptr,         OPTION_HEADER,  "UI SEARCH PATH OPTIONS" },
23   { OPTION_HISTORY_PATH,               "history;dats;.",   OPTION_STRING,  "path to history files" },
24   { OPTION_EXTRAINI_PATH,               "folders",         OPTION_STRING,  "path to extra ini files" },
25   { OPTION_CABINETS_PATH,               "cabinets;cabdevs",   OPTION_STRING,  "path to cabinets / devices image" },
26   { OPTION_CPANELS_PATH,               "cpanel",         OPTION_STRING,  "path to control panel image" },
27   { OPTION_PCBS_PATH,                  "pcb",            OPTION_STRING,  "path to pcbs image" },
28   { OPTION_FLYERS_PATH,               "flyers",         OPTION_STRING,  "path to flyers image" },
29   { OPTION_TITLES_PATH,               "titles",         OPTION_STRING,  "path to titles image" },
30   { OPTION_ENDS_PATH,                  "ends",            OPTION_STRING,  "path to ends image" },
31   { OPTION_MARQUEES_PATH,               "marquees",         OPTION_STRING,  "path to marquees image" },
32   { OPTION_ARTPREV_PATH,               "artwork preview",   OPTION_STRING,  "path to artwork preview image" },
33   { OPTION_BOSSES_PATH,               "bosses",         OPTION_STRING,  "path to bosses image" },
34   { OPTION_LOGOS_PATH,               "logo",            OPTION_STRING,  "path to logos image" },
35   { OPTION_SCORES_PATH,               "scores",         OPTION_STRING,  "path to scores image" },
36   { OPTION_VERSUS_PATH,               "versus",         OPTION_STRING,  "path to versus image" },
37   { OPTION_GAMEOVER_PATH,               "gameover",         OPTION_STRING,  "path to gameover image" },
38   { OPTION_HOWTO_PATH,               "howto",         OPTION_STRING,  "path to howto image" },
39   { OPTION_SELECT_PATH,               "select",         OPTION_STRING,  "path to select image" },
40   { OPTION_ICONS_PATH,               "icons",         OPTION_STRING,  "path to ICOns image" },
41   { OPTION_UI_PATH,                      "ui",             OPTION_STRING,  "path to UI files" },
22   { nullptr,                              nullptr,            OPTION_HEADER,  "UI SEARCH PATH OPTIONS" },
23   { OPTION_HISTORY_PATH,                  "history;dats;.",   OPTION_STRING,  "path to history files" },
24   { OPTION_EXTRAINI_PATH,                 "folders",          OPTION_STRING,  "path to extra ini files" },
25   { OPTION_CABINETS_PATH,                 "cabinets;cabdevs", OPTION_STRING,  "path to cabinets / devices image" },
26   { OPTION_CPANELS_PATH,                  "cpanel",           OPTION_STRING,  "path to control panel image" },
27   { OPTION_PCBS_PATH,                     "pcb",              OPTION_STRING,  "path to pcbs image" },
28   { OPTION_FLYERS_PATH,                   "flyers",           OPTION_STRING,  "path to flyers image" },
29   { OPTION_TITLES_PATH,                   "titles",           OPTION_STRING,  "path to titles image" },
30   { OPTION_ENDS_PATH,                     "ends",             OPTION_STRING,  "path to ends image" },
31   { OPTION_MARQUEES_PATH,                 "marquees",         OPTION_STRING,  "path to marquees image" },
32   { OPTION_ARTPREV_PATH,                  "artwork preview",  OPTION_STRING,  "path to artwork preview image" },
33   { OPTION_BOSSES_PATH,                   "bosses",           OPTION_STRING,  "path to bosses image" },
34   { OPTION_LOGOS_PATH,                    "logo",             OPTION_STRING,  "path to logos image" },
35   { OPTION_SCORES_PATH,                   "scores",           OPTION_STRING,  "path to scores image" },
36   { OPTION_VERSUS_PATH,                   "versus",           OPTION_STRING,  "path to versus image" },
37   { OPTION_GAMEOVER_PATH,                 "gameover",         OPTION_STRING,  "path to gameover image" },
38   { OPTION_HOWTO_PATH,                    "howto",            OPTION_STRING,  "path to howto image" },
39   { OPTION_SELECT_PATH,                   "select",           OPTION_STRING,  "path to select image" },
40   { OPTION_ICONS_PATH,                    "icons",            OPTION_STRING,  "path to ICOns image" },
41   { OPTION_UI_PATH,                       "ui",               OPTION_STRING,  "path to UI files" },
4242
4343   // misc options
44   { nullptr,                              nullptr,   OPTION_HEADER,      "UI MISC OPTIONS" },
45   { OPTION_DATS_ENABLED,                  "1",      OPTION_BOOLEAN,      "enable DATs support" },
46   { OPTION_REMEMBER_LAST,                 "1",      OPTION_BOOLEAN,      "reselect in main menu last played game" },
47   { OPTION_ENLARGE_SNAPS,                 "1",      OPTION_BOOLEAN,      "enlarge arts (snapshot, title, etc...) in right panel (keeping aspect ratio)" },
48   { OPTION_FORCED4X3,                     "1",      OPTION_BOOLEAN,      "force the appearance of the snapshot in the list software to 4:3" },
49   { OPTION_USE_BACKGROUND,                "1",      OPTION_BOOLEAN,      "enable background image in main view" },
50   { OPTION_SKIP_BIOS_MENU,                "0",      OPTION_BOOLEAN,      "skip bios submenu, start with configured or default" },
51   { OPTION_SKIP_PARTS_MENU,               "0",      OPTION_BOOLEAN,      "skip parts submenu, start with first part" },
52   { OPTION_LAST_USED_FILTER,              "",         OPTION_STRING,      "latest used filter" },
53   { OPTION_LAST_USED_MACHINE,             "",         OPTION_STRING,      "latest used machine" },
54   { OPTION_INFO_AUTO_AUDIT,               "0",      OPTION_BOOLEAN,      "enable auto audit in the general info panel" },
44   { nullptr,                              nullptr,    OPTION_HEADER,      "UI MISC OPTIONS" },
45   { OPTION_DATS_ENABLED,                  "1",        OPTION_BOOLEAN,     "enable DATs support" },
46   { OPTION_REMEMBER_LAST,                 "1",        OPTION_BOOLEAN,     "reselect in main menu last played game" },
47   { OPTION_ENLARGE_SNAPS,                 "1",        OPTION_BOOLEAN,     "enlarge arts (snapshot, title, etc...) in right panel (keeping aspect ratio)" },
48   { OPTION_FORCED4X3,                     "1",        OPTION_BOOLEAN,     "force the appearance of the snapshot in the list software to 4:3" },
49   { OPTION_USE_BACKGROUND,                "1",        OPTION_BOOLEAN,     "enable background image in main view" },
50   { OPTION_SKIP_BIOS_MENU,                "0",        OPTION_BOOLEAN,     "skip bios submenu, start with configured or default" },
51   { OPTION_SKIP_PARTS_MENU,               "0",        OPTION_BOOLEAN,     "skip parts submenu, start with first part" },
52   { OPTION_LAST_USED_FILTER,              "",         OPTION_STRING,      "latest used filter" },
53   { OPTION_LAST_USED_MACHINE,             "",         OPTION_STRING,      "latest used machine" },
54   { OPTION_INFO_AUTO_AUDIT,               "0",        OPTION_BOOLEAN,     "enable auto audit in the general info panel" },
5555
5656   // UI options
57   { nullptr,                              nullptr,      OPTION_HEADER,      "UI OPTIONS" },
58   { OPTION_INFOS_SIZE "(0.05-1.00)",      "0.75",         OPTION_FLOAT,      "UI right panel infos text size (0.05 - 1.00)" },
59   { OPTION_FONT_ROWS "(25-40)",           "30",         OPTION_INTEGER,      "UI font text size (25 - 40)" },
60   { OPTION_HIDE_PANELS "(0-3)",           "0",         OPTION_INTEGER,      "UI hide left/right panel in main view (0 = Show all, 1 = hide left, 2 = hide right, 3 = hide both" },
61   { OPTION_UI_BORDER_COLOR,               "ffffffff",      OPTION_STRING,      "UI border color (ARGB)" },
62   { OPTION_UI_BACKGROUND_COLOR,           "ef101030",      OPTION_STRING,      "UI background color (ARGB)" },
63   { OPTION_UI_CLONE_COLOR,                "ff808080",      OPTION_STRING,      "UI clone color (ARGB)" },
64   { OPTION_UI_DIPSW_COLOR,                "ffffff00",      OPTION_STRING,      "UI dipswitch color (ARGB)" },
65   { OPTION_UI_GFXVIEWER_BG_COLOR,         "ef101030",      OPTION_STRING,      "UI gfx viewer color (ARGB)" },
66   { OPTION_UI_MOUSEDOWN_BG_COLOR,         "b0606000",      OPTION_STRING,      "UI mouse down bg color (ARGB)" },
67   { OPTION_UI_MOUSEDOWN_COLOR,            "ffffff80",      OPTION_STRING,      "UI mouse down color (ARGB)" },
68   { OPTION_UI_MOUSEOVER_BG_COLOR,         "70404000",      OPTION_STRING,      "UI mouse over bg color (ARGB)" },
69   { OPTION_UI_MOUSEOVER_COLOR,            "ffffff80",      OPTION_STRING,      "UI mouse over color (ARGB)" },
70   { OPTION_UI_SELECTED_BG_COLOR,          "ef808000",      OPTION_STRING,      "UI selected bg color (ARGB)" },
71   { OPTION_UI_SELECTED_COLOR,             "ffffff00",      OPTION_STRING,      "UI selected color (ARGB)" },
72   { OPTION_UI_SLIDER_COLOR,               "ffffffff",      OPTION_STRING,      "UI slider color (ARGB)" },
73   { OPTION_UI_SUBITEM_COLOR,              "ffffffff",      OPTION_STRING,      "UI subitem color (ARGB)" },
74   { OPTION_UI_TEXT_BG_COLOR,              "ef000000",      OPTION_STRING,      "UI text bg color (ARGB)" },
75   { OPTION_UI_TEXT_COLOR,                 "ffffffff",      OPTION_STRING,      "UI text color (ARGB)" },
76   { OPTION_UI_UNAVAILABLE_COLOR,          "ff404040",      OPTION_STRING,      "UI unavailable color (ARGB)" },
57   { nullptr,                              nullptr,        OPTION_HEADER,      "UI OPTIONS" },
58   { OPTION_INFOS_SIZE "(0.05-1.00)",      "0.75",         OPTION_FLOAT,       "UI right panel infos text size (0.05 - 1.00)" },
59   { OPTION_FONT_ROWS "(25-40)",           "30",           OPTION_INTEGER,     "UI font text size (25 - 40)" },
60   { OPTION_HIDE_PANELS "(0-3)",           "0",            OPTION_INTEGER,     "UI hide left/right panel in main view (0 = Show all, 1 = hide left, 2 = hide right, 3 = hide both" },
61   { OPTION_UI_BORDER_COLOR,               "ffffffff",     OPTION_STRING,      "UI border color (ARGB)" },
62   { OPTION_UI_BACKGROUND_COLOR,           "ef101030",     OPTION_STRING,      "UI background color (ARGB)" },
63   { OPTION_UI_CLONE_COLOR,                "ff808080",     OPTION_STRING,      "UI clone color (ARGB)" },
64   { OPTION_UI_DIPSW_COLOR,                "ffffff00",     OPTION_STRING,      "UI dipswitch color (ARGB)" },
65   { OPTION_UI_GFXVIEWER_BG_COLOR,         "ef101030",     OPTION_STRING,      "UI gfx viewer color (ARGB)" },
66   { OPTION_UI_MOUSEDOWN_BG_COLOR,         "b0606000",     OPTION_STRING,      "UI mouse down bg color (ARGB)" },
67   { OPTION_UI_MOUSEDOWN_COLOR,            "ffffff80",     OPTION_STRING,      "UI mouse down color (ARGB)" },
68   { OPTION_UI_MOUSEOVER_BG_COLOR,         "70404000",     OPTION_STRING,      "UI mouse over bg color (ARGB)" },
69   { OPTION_UI_MOUSEOVER_COLOR,            "ffffff80",     OPTION_STRING,      "UI mouse over color (ARGB)" },
70   { OPTION_UI_SELECTED_BG_COLOR,          "ef808000",     OPTION_STRING,      "UI selected bg color (ARGB)" },
71   { OPTION_UI_SELECTED_COLOR,             "ffffff00",     OPTION_STRING,      "UI selected color (ARGB)" },
72   { OPTION_UI_SLIDER_COLOR,               "ffffffff",     OPTION_STRING,      "UI slider color (ARGB)" },
73   { OPTION_UI_SUBITEM_COLOR,              "ffffffff",     OPTION_STRING,      "UI subitem color (ARGB)" },
74   { OPTION_UI_TEXT_BG_COLOR,              "ef000000",     OPTION_STRING,      "UI text bg color (ARGB)" },
75   { OPTION_UI_TEXT_COLOR,                 "ffffffff",     OPTION_STRING,      "UI text color (ARGB)" },
76   { OPTION_UI_UNAVAILABLE_COLOR,          "ff404040",     OPTION_STRING,      "UI unavailable color (ARGB)" },
7777   { nullptr }
7878};
7979
trunk/src/emu/ui/optsmenu.cpp
r253707r253708
5252   bool changed = false;
5353
5454   // process the menu
55//   ui_menu::menu_stack->parent->process(UI_MENU_PROCESS_NOINPUT);
56//   const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT | UI_MENU_PROCESS_NOIMAGE);
55//  ui_menu::menu_stack->parent->process(UI_MENU_PROCESS_NOINPUT);
56//  const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT | UI_MENU_PROCESS_NOIMAGE);
5757   const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
5858
5959   if (m_event != nullptr && m_event->itemref != nullptr)
r253707r253708
191191
192192void ui_menu_game_options::populate()
193193{
194   if (strcmp(machine().options().ui(),"simple")!=0)
195   {   
194   if (strcmp(machine().options().ui(),"simple")!=0)
195   {
196196      // set filter arrow
197197      std::string fbuff;
198198
r253707r253708
265265   float width;
266266   ui_manager &mui = machine().ui();
267267   mui.draw_text_full(container, _("Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
268                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
268                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
269269   width += 2 * UI_BOX_LR_BORDER;
270270   float maxwidth = MAX(origx2 - origx1, width);
271271
r253707r253708
285285
286286   // draw the text within it
287287   mui.draw_text_full(container, _("Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
288                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
288                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
289289}
290290
291291//-------------------------------------------------
trunk/src/emu/ui/selector.cpp
r253707r253708
1818//  ctor / dtor
1919//-------------------------------------------------
2020
21ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover)
21ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover)
2222   : ui_menu(machine, container), m_selector(s_actual)
2323{
2424   m_category = category;
r253707r253708
152152   std::string tempbuf = std::string(_("Selection List - Search: ")).append(m_search).append("_");
153153
154154   // get the size of the text
155   mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
155   mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
156156      DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
157157   width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
158158   float maxwidth = MAX(width, origx2 - origx1);
r253707r253708
172172   y1 += UI_BOX_TB_BORDER;
173173
174174   // draw the text within it
175   mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
175   mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
176176      DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
177177
178178   // bottom text
r253707r253708
180180   std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD));
181181   tempbuf.assign(_("Double click or press ")).append(ui_select_text).append(_(" to select"));
182182
183   mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
183   mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
184184      DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
185185   width += 2 * UI_BOX_LR_BORDER;
186186   maxwidth = MAX(maxwidth, width);
r253707r253708
200200   y1 += UI_BOX_TB_BORDER;
201201
202202   // draw the text within it
203   mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
203   mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
204204      DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
205205}
206206
trunk/src/emu/ui/selgame.cpp
r253707r253708
131131
132132   for (emu_options::entry *f_entry = machine.options().first(); f_entry != nullptr; f_entry = f_entry->next())
133133   {
134      if (f_entry->is_changed())
134      if (f_entry->is_changed())
135135      {
136136         options.set_value(f_entry->name(), f_entry->value(), OPTION_PRIORITY_CMDLINE, error_string);
137137      }
r253707r253708
150150      else {
151151         machine.popmessage("**Error to save %s.ini**", emulator_info::get_configname());
152152         return;
153      }         
153      }
154154   }
155155   machine.ui().popup_time(3, "\n    Configuration saved    \n\n");
156156}
r253707r253708
484484
485485   // if we're in an error state, overlay an error message
486486   if (ui_error)
487      machine().ui().draw_text_box(container, "The selected machine is missing one or more required ROM or CHD images. "
487      machine().ui().draw_text_box(container, "The selected machine is missing one or more required ROM or CHD images. "
488488         "Please select a different machine.\n\nPress any key (except ESC) to continue.", JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
489489
490490   // handle filters selection from key shortcuts
r253707r253708
723723   ui_manager &mui = machine().ui();
724724   float tbarspace = mui.get_line_height();
725725
726   strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios);   
726   strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios);
727727   std::string filtered;
728728
729729   if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
r253707r253708
749749   for (int line = 0; line < 2; ++line)
750750   {
751751      mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
752                                    DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
752                              DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
753753      width += 2 * UI_BOX_LR_BORDER;
754754      maxwidth = MAX(width, maxwidth);
755755   }
r253707r253708
771771   // draw the text within it
772772   for (int line = 0; line < 2; ++line)
773773   {
774      mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
774      mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
775775         DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
776776      y1 += mui.get_line_height();
777777   }
r253707r253708
828828      color = UI_GREEN_COLOR;
829829
830830      if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS
831          | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
831         | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
832832         color = UI_YELLOW_COLOR;
833833
834834      if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
r253707r253708
896896
897897   for (auto & elem : tempbuf)
898898   {
899      mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
899      mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
900900         DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
901901      width += 2 * UI_BOX_LR_BORDER;
902902      maxwidth = MAX(maxwidth, width);
r253707r253708
968968      ui_menu::stack_push(global_alloc_clear<ui_menu_directory>(machine(), container));
969969   // anything else is a driver
970970   else if ((FPTR)driver == 3) {
971      save_main_option(machine());     
971      save_main_option(machine());
972972   }
973973   // anything else is a driver
974974   else
r253707r253708
14131413         if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
14141414            cloneof = false;
14151415      }
1416      item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
1416      item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
14171417         (void *)m_searchlist[curitem]);
14181418   }
14191419}
r253707r253708
17581758            hover = phover + filter;
17591759         }
17601760
1761/*         if (afilter == filter)
1762         {
1763            bgcolor = UI_SELECTED_BG_COLOR;
1764            fgcolor = UI_SELECTED_COLOR;
1765         }
1761/*          if (afilter == filter)
1762            {
1763                bgcolor = UI_SELECTED_BG_COLOR;
1764                fgcolor = UI_SELECTED_COLOR;
1765            }
17661766*/
17671767         if (bgcolor != UI_TEXT_BG_COLOR)
17681768            container->add_rect(x1, y1, x2, y1 + line_height_max, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
r253707r253708
17971797            convert_command_glyph(str);
17981798         }
17991799
1800         mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
1800         mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
18011801            DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
18021802         y1 += line_height_max;
18031803      }
r253707r253708
19051905
19061906      for (int x = UI_FIRST_LOAD; x < UI_LAST_LOAD; ++x)
19071907      {
1908         mui.draw_text_full(container, dats_info[x], origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
1908         mui.draw_text_full(container, dats_info[x], origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
19091909            WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
19101910         txt_lenght += 0.01f;
19111911         title_size = MAX(txt_lenght, title_size);
19121912      }
19131913
1914      mui.draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
1914      mui.draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
19151915         WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
19161916
19171917      draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curdats_view, UI_FIRST_LOAD, UI_LAST_LOAD, title_size);
r253707r253708
19481948
19491949      if (buffer.empty())
19501950      {
1951         mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
1951         mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
19521952            WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
19531953         return;
19541954      }
r253707r253708
20022002                  JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size);
20032003
20042004               mui.draw_text_full(container, last_part.c_str(), effective_left + item_width, oy1,
2005                  origx2 - origx1 - 2.0f * gutter_width - item_width, JUSTIFY_RIGHT, WRAP_TRUNCATE,
2005                  origx2 - origx1 - 2.0f * gutter_width - item_width, JUSTIFY_RIGHT, WRAP_TRUNCATE,
20062006                  DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
20072007            }
20082008         }
r253707r253708
20222022               std::string first_part(tempbuf.substr(0, first_dspace));
20232023               std::string last_part(tempbuf.substr(first_dspace + 1));
20242024               strtrimspace(last_part);
2025               mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width, JUSTIFY_LEFT,
2025               mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width, JUSTIFY_LEFT,
20262026                  WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
20272027
2028               mui.draw_text_full(container, last_part.c_str(), effective_left, oy1, origx2 - origx1 - 2.0f * gutter_width,
2028               mui.draw_text_full(container, last_part.c_str(), effective_left, oy1, origx2 - origx1 - 2.0f * gutter_width,
20292029                  JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
20302030            }
20312031            else
2032               mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
2032               mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
20332033                  WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
20342034         }
20352035         else
2036            mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
2036            mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
20372037               WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
20382038
20392039         oy1 += (line_height * text_size);
r253707r253708
20652065
20662066         for (auto & elem: t_text)
20672067         {
2068            mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
2068            mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
20692069               DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
20702070            txt_lenght += 0.01f;
20712071            title_size = MAX(txt_lenght, title_size);
20722072         }
20732073
2074         mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1,
2074         mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1,
20752075            JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
20762076
20772077         draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size);
r253707r253708
21222122         else if (r == r_visible_lines - 1 && itemline != totallines - 1)
21232123            info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
21242124         else
2125            mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
2125            mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
21262126               WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
21272127         oy1 += (line_height * text_size);
21282128      }
trunk/src/emu/ui/selsoft.cpp
r253707r253708
1// license:BSD-3-Clause
1// license:BSD-3-Clause
22// copyright-holders:Dankan1890
33/***************************************************************************
44
r253707r253708
2929std::string reselect_last::swlist;
3030bool reselect_last::m_reselect = false;
3131static const char *region_lists[] = { "arab", "arg", "asia", "aus", "aut", "bel", "blr", "bra", "can", "chi", "chn", "cze", "den",
32                                      "ecu", "esp", "euro", "fin", "fra", "gbr", "ger", "gre", "hkg", "hun", "irl", "isr",
33                                      "isv", "ita", "jpn", "kaz", "kor", "lat", "lux", "mex", "ned", "nld", "nor", "nzl",
34                                      "pol", "rus", "slo", "spa", "sui", "swe", "tha", "tpe", "tw", "uk", "ukr", "usa" };
32                              "ecu", "esp", "euro", "fin", "fra", "gbr", "ger", "gre", "hkg", "hun", "irl", "isr",
33                              "isv", "ita", "jpn", "kaz", "kor", "lat", "lux", "mex", "ned", "nld", "nor", "nzl",
34                              "pol", "rus", "slo", "spa", "sui", "swe", "tha", "tpe", "tw", "uk", "ukr", "usa" };
3535
3636//-------------------------------------------------
3737//  compares two items in the software list and
r253707r253708
424424            old_software = m_has_empty_start ? curitem + 1 : curitem;
425425
426426         item_append(m_displaylist[curitem]->longname.c_str(), m_displaylist[curitem]->devicetype.c_str(),
427                     m_displaylist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]);
427                  m_displaylist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]);
428428      }
429429   }
430430
r253707r253708
434434
435435      for (int curitem = 0; m_searchlist[curitem] != nullptr; ++curitem)
436436         item_append(m_searchlist[curitem]->longname.c_str(), m_searchlist[curitem]->devicetype.c_str(),
437                     m_searchlist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
438                     (void *)m_searchlist[curitem]);
437                  m_searchlist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
438                  (void *)m_searchlist[curitem]);
439439   }
440440
441441   item_append(MENU_SEPARATOR_ITEM, nullptr, flags_ui, nullptr);
r253707r253708
636636   for (int line = 0; line < 3; ++line)
637637   {
638638      mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
639                                    DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
639                              DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
640640      width += 2 * UI_BOX_LR_BORDER;
641641      maxwidth = MAX(width, maxwidth);
642642   }
r253707r253708
659659   for (int line = 0; line < 3; ++line)
660660   {
661661      mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
662                                    DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
662                              DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
663663      y1 += mui.get_line_height();
664664   }
665665
r253707r253708
781781   for (auto & elem : tempbuf)
782782   {
783783      mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
784                                    DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
784                              DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
785785      width += 2 * UI_BOX_LR_BORDER;
786786      maxwidth = MAX(maxwidth, width);
787787   }
r253707r253708
808808   for (auto & elem : tempbuf)
809809   {
810810      mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
811                                    DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
811                              DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
812812      y1 += machine().ui().get_line_height();
813813   }
814814}
r253707r253708
10881088//-------------------------------------------------
10891089void ui_menu_select_software::build_list(std::vector<ui_software_info *> &s_drivers, const char *filter_text, int filter)
10901090{
1091
10921091   if (s_drivers.empty() && filter == -1)
10931092   {
10941093      filter = sw_filters::actual;
r253707r253708
13191318            hover = phover + filter;
13201319         }
13211320
1322/*         if (afilter == filter)
1323         {
1324            bgcolor = UI_SELECTED_BG_COLOR;
1325            fgcolor = UI_SELECTED_COLOR;
1326         }
1321/*          if (afilter == filter)
1322            {
1323                bgcolor = UI_SELECTED_BG_COLOR;
1324                fgcolor = UI_SELECTED_COLOR;
1325            }
13271326*/
13281327         if (bgcolor != UI_TEXT_BG_COLOR)
13291328            container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
r253707r253708
13591358         }
13601359
13611360         mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
1362                            DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
1361                        DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
13631362         y1 += line_height;
13641363      }
13651364
r253707r253708
14391438   if (soft && soft->usage.empty())
14401439   {
14411440      mui.draw_text_full(container, _("History"), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
1442                                    DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
1441                              DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
14431442      ui_globals::cur_sw_dats_view = 0;
14441443   }
14451444   else
r253707r253708
14531452      for (auto & elem : t_text)
14541453      {
14551454         mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
1456                                       DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
1455                                 DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
14571456         txt_lenght += 0.01f;
14581457         title_size = MAX(txt_lenght, title_size);
14591458      }
14601459
14611460      mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1,
1462                                    JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR,
1463                                    nullptr, nullptr);
1461                              JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR,
1462                              nullptr, nullptr);
14641463
14651464      draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size);
14661465   }
r253707r253708
14841483   if (buffer.empty())
14851484   {
14861485      mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
1487                                    WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
1486                              WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
14881487      return;
14891488   }
14901489   else
r253707r253708
15121511         info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
15131512      else
15141513         mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1,
1515                                       JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR,
1516                                       nullptr, nullptr, text_size);
1514                                 JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR,
1515                                 nullptr, nullptr, text_size);
15171516      oy1 += (line_height * text_size);
15181517   }
15191518
r253707r253708
18201819   float width;
18211820   ui_manager &mui = machine().ui();
18221821   mui.draw_text_full(container, _("Software part selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
1823                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
1822                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
18241823   width += 2 * UI_BOX_LR_BORDER;
18251824   float maxwidth = MAX(origx2 - origx1, width);
18261825
r253707r253708
18401839
18411840   // draw the text within it
18421841   mui.draw_text_full(container, _("Software part selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
1843                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
1842                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
18441843}
18451844
18461845//-------------------------------------------------
r253707r253708
19581957   float width;
19591958   ui_manager &mui = machine().ui();
19601959   mui.draw_text_full(container, _("Bios selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
1961                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
1960                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
19621961   width += 2 * UI_BOX_LR_BORDER;
19631962   float maxwidth = MAX(origx2 - origx1, width);
19641963
r253707r253708
19781977
19791978   // draw the text within it
19801979   mui.draw_text_full(container, _("Bios selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
1981                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
1980                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
19821981}
trunk/src/emu/ui/sndmenu.cpp
r253707r253708
150150   float width;
151151   ui_manager &mui = machine().ui();
152152   mui.draw_text_full(container, _("Sound Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
153                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
153                           DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
154154   width += 2 * UI_BOX_LR_BORDER;
155155   float maxwidth = MAX(origx2 - origx1, width);
156156
r253707r253708
170170
171171   // draw the text within it
172172   mui.draw_text_full(container, _("Sound Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
173                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
173                           DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
174174}
trunk/src/emu/ui/ui.cpp
r253707r253708
16981698   if (machine.ui_input().pressed(IPT_UI_PAUSE))
16991699   {
17001700      // with a shift key, it is single step
1701//      if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT)))
1702//      {
1703//         machine.ui().set_single_step(true);
1704//         machine.resume();
1705//      }
1706//      else
1701//      if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT)))
1702//      {
1703//          machine.ui().set_single_step(true);
1704//          machine.resume();
1705//      }
1706//      else
17071707         machine.toggle_pause();
17081708   }
17091709
r253707r253708
27022702      if (curwidth > maxwidth)
27032703         maxwidth = curwidth;
27042704
2705        xstart.push_back(linestart - origs);
2706        xend.push_back(s - origs);
2705      xstart.push_back(linestart - origs);
2706      xend.push_back(s - origs);
27072707
27082708      // loop from the line start and add the characters
27092709      while (linestart < s)
trunk/src/emu/ui/ui.h
r253707r253708
103103   INT32           defval;             /* default value */
104104   INT32           maxval;             /* maximum value */
105105   INT32           incval;             /* increment value */
106   bool         hidden;            /* hidden or not */
107   INT32         id;               /* unique identifier */
108   char          description[1];     /* textual description */
106   bool            hidden;             /* hidden or not */
107   INT32           id;                 /* unique identifier */
108   char            description[1];     /* textual description */
109109};
110110
111111
r253707r253708
114114class ui_manager
115115{
116116public:
117    // construction/destruction
118    ui_manager(running_machine &machine);
117   // construction/destruction
118   ui_manager(running_machine &machine);
119119
120120   void init();
121121
122    // getters
123    running_machine &machine() const { return m_machine; }
124    bool single_step() const { return m_single_step; }
122   // getters
123   running_machine &machine() const { return m_machine; }
124   bool single_step() const { return m_single_step; }
125125   ui_options &options() { return m_ui_options; }
126126
127    // setters
128    void set_single_step(bool single_step) { m_single_step = single_step; }
127   // setters
128   void set_single_step(bool single_step) { m_single_step = single_step; }
129129
130    // methods
131    void initialize(running_machine &machine);
132    UINT32 set_handler(ui_callback callback, UINT32 param);
133    void display_startup_screens(bool first_time, bool show_disclaimer);
134    void set_startup_text(const char *text, bool force);
135    void update_and_render(render_container *container);
136    render_font *get_font();
137    float get_line_height();
138    float get_char_width(unicode_char ch);
139    float get_string_width(const char *s);
140    void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor);
141    void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor);
142    void draw_text(render_container *container, const char *buf, float x, float y);
130   // methods
131   void initialize(running_machine &machine);
132   UINT32 set_handler(ui_callback callback, UINT32 param);
133   void display_startup_screens(bool first_time, bool show_disclaimer);
134   void set_startup_text(const char *text, bool force);
135   void update_and_render(render_container *container);
136   render_font *get_font();
137   float get_line_height();
138   float get_char_width(unicode_char ch);
139   float get_string_width(const char *s);
140   void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor);
141   void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor);
142   void draw_text(render_container *container, const char *buf, float x, float y);
143143   void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = nullptr, float *totalheight = nullptr, float text_size = 1.0f);
144144   void draw_text_box(render_container *container, const char *text, int justify, float xpos, float ypos, rgb_t backcolor);
145    void draw_message_window(render_container *container, const char *text);
145   void draw_message_window(render_container *container, const char *text);
146146
147    void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4);
148    void show_fps_temp(double seconds);
149    void set_show_fps(bool show);
150    bool show_fps() const;
151    bool show_fps_counter();
152    void set_show_profiler(bool show);
153    bool show_profiler() const;
154    void show_menu();
155    void show_mouse(bool status);
156    bool is_menu_active();
157    bool can_paste();
158    void paste();
159    bool use_natural_keyboard() const;
160    void set_use_natural_keyboard(bool use_natural_keyboard);
161    void image_handler_ingame();
162    void increase_frameskip();
163    void decrease_frameskip();
164    void request_quit();
147   void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4);
148   void show_fps_temp(double seconds);
149   void set_show_fps(bool show);
150   bool show_fps() const;
151   bool show_fps_counter();
152   void set_show_profiler(bool show);
153   bool show_profiler() const;
154   void show_menu();
155   void show_mouse(bool status);
156   bool is_menu_active();
157   bool can_paste();
158   void paste();
159   bool use_natural_keyboard() const;
160   void set_use_natural_keyboard(bool use_natural_keyboard);
161   void image_handler_ingame();
162   void increase_frameskip();
163   void decrease_frameskip();
164   void request_quit();
165165
166    // print the game info string into a buffer
167    std::string &game_info_astring(std::string &str);
166   // print the game info string into a buffer
167   std::string &game_info_astring(std::string &str);
168168
169    // slider controls
170    const slider_state *get_slider_list(void);
169   // slider controls
170   const slider_state *get_slider_list(void);
171171
172    // other
173    void process_natural_keyboard();
172   // other
173   void process_natural_keyboard();
174174
175    void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; }
176    bool show_timecode_counter();
177    bool show_timecode_total();
175   void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; }
176   bool show_timecode_counter();
177   bool show_timecode_total();
178178
179179   // word wrap
180    int wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size = 1.0f);
180   int wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size = 1.0f);
181181
182    // draw an outlined box with given line color and filled with a texture
183    void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
182   // draw an outlined box with given line color and filled with a texture
183   void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
184184
185    // return text string width with given text size
186    float get_string_width_ex(const char *s, float text_size);
185   // return text string width with given text size
186   float get_string_width_ex(const char *s, float text_size);
187187
188188private:
189    // instance variables
190    running_machine &       m_machine;
191    render_font *           m_font;
192    ui_callback             m_handler_callback;
193    UINT32                  m_handler_param;
194    bool                    m_single_step;
195    bool                    m_showfps;
196    osd_ticks_t             m_showfps_end;
197    bool                    m_show_profiler;
198    osd_ticks_t             m_popup_text_end;
199    bool                    m_use_natural_keyboard;
189   // instance variables
190   running_machine &       m_machine;
191   render_font *           m_font;
192   ui_callback             m_handler_callback;
193   UINT32                  m_handler_param;
194   bool                    m_single_step;
195   bool                    m_showfps;
196   osd_ticks_t             m_showfps_end;
197   bool                    m_show_profiler;
198   osd_ticks_t             m_popup_text_end;
199   bool                    m_use_natural_keyboard;
200200   std::unique_ptr<UINT8[]> m_non_char_keys_down;
201    render_texture *        m_mouse_arrow_texture;
202    bool                    m_mouse_show;
203    bool                    m_show_timecode_counter;
201   render_texture *        m_mouse_arrow_texture;
202   bool                    m_mouse_show;
203   bool                    m_show_timecode_counter;
204204   bool                    m_show_timecode_total;
205205   bool                    m_load_save_hold;
206206   ui_options              m_ui_options;
207207
208    // text generators
209    std::string &disclaimer_string(std::string &buffer);
210    std::string &warnings_string(std::string &buffer);
208   // text generators
209   std::string &disclaimer_string(std::string &buffer);
210   std::string &warnings_string(std::string &buffer);
211211
212    // UI handlers
213    static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state);
214    static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state);
215    static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state);
216    static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state);
217    static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state);
218    static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state);
212   // UI handlers
213   static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state);
214   static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state);
215   static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state);
216   static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state);
217   static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state);
218   static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state);
219219
220    // private methods
221    void exit();
220   // private methods
221   void exit();
222222};
223223
224224
trunk/src/emu/ui/utils.cpp
r253707r253708
2525
2626// Main filters
2727UINT16 main_filters::actual = 0;
28const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Working", "Mechanical", "Not Mechanical",
28const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Working", "Mechanical", "Not Mechanical",
2929   "Category", "Favorites", "BIOS", "Originals", "Clones", "Manufacturers", "Years", "Support Save",
3030   "Not Support Save", "CHD", "No CHD", "Vertical", "Horizontal", "Custom" };
3131size_t main_filters::length = ARRAY_LENGTH(main_filters::text);
trunk/src/emu/uiinput.cpp
r253707r253708
326326}
327327
328328/*-------------------------------------------------
329   push_mouse_wheel_event - pushes a mouse
330   wheel event to the specified render_target
329    push_mouse_wheel_event - pushes a mouse
330    wheel event to the specified render_target
331331-------------------------------------------------*/
332332
333333void ui_input_manager::push_mouse_wheel_event(render_target *target, INT32 x, INT32 y, short delta, int ucNumLines)
r253707r253708
350350{
351351   for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++)
352352      m_next_repeat[code] = osd_ticks();
353}
No newline at end of file
353}
trunk/src/emu/video.h
r253707r253708
9494   void begin_recording(const char *name, movie_format format);
9595   void end_recording(movie_format format);
9696   void add_sound_to_recording(const INT16 *sound, int numsamples);
97   
97
9898   void set_timecode_enabled(bool value) { m_timecode_enabled = value; }
9999   bool get_timecode_enabled() { return m_timecode_enabled; }
100100   bool get_timecode_write() { return m_timecode_write; }
r253707r253708
104104   void add_to_total_time(attotime time) { m_timecode_total += time; }
105105   std::string &timecode_text(std::string &str);
106106   std::string &timecode_total_text(std::string &str);
107   
108107
108
109109private:
110110   // internal helpers
111111   void exit();
r253707r253708
196196
197197   static const attoseconds_t ATTOSECONDS_PER_SPEED_UPDATE = ATTOSECONDS_PER_SECOND / 4;
198198   static const int PAUSED_REFRESH_RATE = 30;
199   
200   bool               m_timecode_enabled;      // inp.timecode record enabled
201   bool               m_timecode_write;      // Show/hide timer at right (partial time)
202   std::string            m_timecode_text;      // Message for that video part (intro, gameplay, extra)
203   attotime            m_timecode_start;      // Starting timer for that video part (intro, gameplay, extra)
204   attotime            m_timecode_total;      // Show/hide timer at left (total elapsed on resulting video preview)
205   
199
200   bool                    m_timecode_enabled;     // inp.timecode record enabled
201   bool                    m_timecode_write;       // Show/hide timer at right (partial time)
202   std::string             m_timecode_text;        // Message for that video part (intro, gameplay, extra)
203   attotime                m_timecode_start;       // Starting timer for that video part (intro, gameplay, extra)
204   attotime                m_timecode_total;       // Show/hide timer at left (total elapsed on resulting video preview)
205
206206};
207207
208208#endif  /* __VIDEO_H__ */
trunk/src/lib/util/options.h
r253707r253708
112112      std::string             m_defdata;          // default data for this item
113113      std::string             m_minimum;          // minimum value
114114      std::string             m_maximum;          // maximum value
115      bool               m_changed;         // changed flag
115      bool                    m_changed;          // changed flag
116116   };
117117
118118   // construction/destruction
trunk/src/mame/arcade.lst
r253707r253708
382382frogger         // GX392 (c) 1981 Konami
383383froggers1       // (c) 1981 Sega
384384froggers2       // 834-0068 (c) 1981 Sega
385froggers3      //
385froggers3       //
386386froggermc       // 800-3110 (c) 1981 Sega
387387amidar          // GX337 (c) 1982 Konami
388388amidar1         // GX337 (c) 1981 Konami
r253707r253708
21082108sboblbobla      // bootleg
21092109sboblboblb      // bootleg
21102110sboblboblc      // bootleg
2111sboblbobld      // bootleg
2111sboblbobld      // bootleg
21122112bublboblb       // bootleg
21132113bub68705        // bootleg
21142114dland           // bootleg
r253707r253708
51555155vmahjong        // 1997.02 Virtual Mahjong (Micronet)
51565156pclub2kc        // 1997.02 Print Club Kome Kome Club
51575157pclub2fc        // 1997.04 Print Club 2 Felix The Cat
5158pclub2pe      //
5159pclub2wb      //
5160pclub2pf      //
5161pclub26w      //
5162pclub27s      //
5163pclubyo2      //
5158pclub2pe        //
5159pclub2wb        //
5160pclub2pf        //
5161pclub26w        //
5162pclub27s        //
5163pclubyo2        //
51645164groovef         // 1997.05 Groove on Fight (Atlus)
51655165nclubv3         // 1997.07 Name Club Ver. 3
5166nclubv2         //
5167nameclub      //
5166nclubv2         //
5167nameclub        //
51685168pclb2elk        // 1997.07 Print Club Custom
51695169pclub2          // 1997.09 Print Club 2
51705170thunt           // 1997.09 Puzzle & Action Treasure Hunt (Sega (Deniam License))
51715171thuntk
51725172winterht        // 1997.10 Winter Heat (Data East)
51735173prc297wi        // 1997.10 Print Club 2 '97 Winter Ver
5174prc297wia      //
5174prc297wia       //
51755175prc298sp        // 1997.10 Print Club 2 '98 Spring Ver
5176prc298su      //
5177pclove         //
5178pclove2         //
5176prc298su        //
5177pclove          //
5178pclove2         //
51795179cotton2         // 1997.11 Cotton 2 (Success)
51805180hanagumi        // 1997.11 Sakura Taisen Hanagumi Taisen Columns
51815181findlove        // 1997.12 Find Love (Daiki / FCF)
r253707r253708
63816381            // MBV ??
63826382            // MBW ??
63836383wcvol95         // MBX (c) 1993 Data East
6384wcvol95x      // ?
6384wcvol95x        // ?
63856385            // MBY ??
63866386backfire        // MBZ (c) 1995
63876387backfirea       // MBZ (c) 1995
r253707r253708
77097709athena          //       'UP' (c) 1986
77107710fitegolf        //       'GU' (c) 1988
77117711fitegolfu       //       'GU' (c) 1988
7712fitegolf2      //
7712fitegolf2       //
77137713countryc        // A7004 'CC' (c) 1988
77147714ikari           // A5004 'IW' (c) 1986
77157715ikaria          // A5004 'IW' (c) 1986
r253707r253708
88258825rdft2aa         // (c) 1997 Seibu Kaihatsu (Dream Island license)
88268826rdft2j          // (c) 1997 Seibu Kaihatsu
88278827rdft2ja         // (c) 1997 Seibu Kaihatsu
8828rdft2it         // (c) 1997 Seibu Kaihatsu
8828rdft2it         // (c) 1997 Seibu Kaihatsu
88298829rdft2t          // (c) 1997 Seibu Kaihatsu
88308830rdft2u          // (c) 1997 Seibu Kaihatsu (Fabtek license)
88318831rdft2us         // (c) 1997 Seibu Kaihatsu (Fabtek license)
r253707r253708
89748974edfbl           // (c) 1991
8975897564street        // (c) 1991
8976897664streetj       // (c) 1991 (Japan)
897764streetja      // (c) 1991 (Japan)
897764streetja      // (c) 1991 (Japan)
89788978soldam          // (c) 1992
89798979soldamj         // (c) 1992 (Japan)
89808980bigstrik        // (c) 1992
r253707r253708
91939193squash          // (c) 1992 - Ref 922804/2
91949194wrally          // (c) 1993 - Ref 930705
91959195wrallya         // (c) 1993 - Ref 930705
9196wrallyb         // (c) 1993 - Ref 930217
9196wrallyb         // (c) 1993 - Ref 930217
91979197wrallyat        // (c) 1993 - Ref 930217
91989198glass           // (c) 1993 - Ref 931021
91999199glass10         // (c) 1993 - Ref 931021
r253707r253708
93039303bonkadv         // (c) 1994 Kaneko
93049304gtmr            // (c) 1994 Kaneko
93059305gtmra           // (c) 1994 Kaneko
9306gtmrb         // (c) 1994 Kaneko
9307gtmro         // (c) 1994 Kaneko
9306gtmrb           // (c) 1994 Kaneko
9307gtmro           // (c) 1994 Kaneko
93089308gtmre           // (c) 1994 Kaneko
93099309gtmrusa         // (c) 1994 Kaneko (US)
93109310gtmr2           // (c) 1995 Kaneko
r253707r253708
98889888// http://www.esdgame.co.kr/english/
98899889multchmp        // (c) 1999 (World)
98909890multchmpk       // (c) 1998 (Korea)
9891multchmpa      // (c) 1998 (World)
9891multchmpa       // (c) 1998 (World)
98929892mchampdx        // (c) 1999 ESD
98939893mchampdxa       // (c) 1999 ESD
98949894mchampdxb       // (c) 1999 ESD
r253707r253708
1056710567aplatoon        // (c) 199? Nova?
1056810568zortonbr        // (c) 1993 Web Picmatic
1056910569
10570crospuzl      //
10570crospuzl        //
1057110571// Crystal System
1057210572crysbios
1057310573crysking        // 2001 Brezzasoft. Crystal of the kings
r253707r253708
10770107709ballsht3       // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games"
10771107719ballshtc       // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games"
1077210772megaphx         // (c) 1991 Dinamic / Inder
10773flagrall      // ?
10773flagrall        // ?
1077410774gumbo           // (c) 1994 Min Corp.
1077510775mspuzzleg       // (c) 1994 Min Corp.
1077610776mspuzzle        // (c) 1994 Min Corp.
r253707r253708
3273232732fi8275
3273332733
3273432734l9nibble   // unknown Nibble game.
32735 
No newline at end of file
32735   
trunk/src/mame/audio/zaccaria.h
r253707r253708
132132   UINT8   m_host_command;
133133};
134134
135#endif // __AUDIO_ZACCARIA_H__
No newline at end of file
135#endif // __AUDIO_ZACCARIA_H__
trunk/src/mame/drivers/1943.cpp
r253707r253708
786786   /* front background */
787787   ROM_LOAD( "bm14.5f",   0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) )
788788   /* back background probably same gfx different layout */
789   ROM_LOAD( "mkb07.8k",  0xc000, 0x4000, CRC(ae1b317f) SHA1(d311c198d77ec932d776427e2ebfffe90e5330c3) ) 
789   ROM_LOAD( "mkb07.8k",  0xc000, 0x4000, CRC(ae1b317f) SHA1(d311c198d77ec932d776427e2ebfffe90e5330c3) )
790790   ROM_CONTINUE( 0x8000, 0x4000 )
791 
791
792792   ROM_REGION( 0x0c00, "proms", 0 )
793793   ROM_LOAD( "bm1.12a",   0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) )    /* red component */
794794   ROM_LOAD( "bm2.13a",   0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) )    /* green component */
trunk/src/mame/drivers/1945kiii.cpp
r253707r253708
160160
161161WRITE16_MEMBER(k3_state::flagrall_soundbanks_w)
162162{
163
164163   data &= mem_mask;
165   
164
166165   // 0x0200 on startup
167166   // 0x0100 on startup
168167
r253707r253708
311310   PORT_DIPSETTING(       0x0003, DEF_STR( 1C_1C ) )
312311   PORT_DIPSETTING(       0x0002, DEF_STR( 1C_2C ) )
313312   PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW1:3" )
314   PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW1:4" )     
313   PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW1:4" )
315314   PORT_DIPNAME(  0x0010, 0x0000, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SW1:5")
316315   PORT_DIPSETTING(       0x0010, DEF_STR( Off ) )
317316   PORT_DIPSETTING(       0x0000, DEF_STR( On ) )
318317   PORT_DIPNAME(  0x0020, 0x0020, "Dip Control" )  PORT_DIPLOCATION("SW1:6")
319318   PORT_DIPSETTING(       0x0020, DEF_STR( Off ) )
320   PORT_DIPSETTING(       0x0000, DEF_STR( On ) )     
319   PORT_DIPSETTING(       0x0000, DEF_STR( On ) )
321320   PORT_DIPUNUSED_DIPLOC( 0x0040, IP_ACTIVE_LOW, "SW1:7" )
322321   PORT_DIPNAME(  0x0080, 0x0080, "Picture Test" )  PORT_DIPLOCATION("SW1:8")
323322   PORT_DIPSETTING(       0x0080, DEF_STR( Off ) )
r253707r253708
331330   PORT_DIPNAME(  0x0400, 0x0400, "Bonus Type" )  PORT_DIPLOCATION("SW2:3")
332331   PORT_DIPSETTING (      0x0400, "0" )
333332   PORT_DIPSETTING(       0x0000, "1" )
334   PORT_DIPUNUSED_DIPLOC( 0x0800, IP_ACTIVE_LOW, "SW2:4" )   
333   PORT_DIPUNUSED_DIPLOC( 0x0800, IP_ACTIVE_LOW, "SW2:4" )
335334   PORT_DIPNAME(  0x3000, 0x3000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6")
336335   PORT_DIPSETTING(       0x0000, DEF_STR( Very_Hard ) )
337336   PORT_DIPSETTING(       0x1000, DEF_STR( Hard ) )
338337   PORT_DIPSETTING(       0x2000, DEF_STR( Easy ) )
339338   PORT_DIPSETTING(       0x3000, DEF_STR( Normal ) )
340   PORT_DIPUNUSED_DIPLOC( 0x4000, IP_ACTIVE_LOW, "SW2:7" )   
339   PORT_DIPUNUSED_DIPLOC( 0x4000, IP_ACTIVE_LOW, "SW2:7" )
341340   PORT_DIPNAME(  0x8000, 0x8000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8")
342341   PORT_DIPSETTING(       0x8000, DEF_STR( Off ) )
343342   PORT_DIPSETTING(       0x0000, DEF_STR( On ) )
r253707r253708
440439   ROM_LOAD32_BYTE( "5_u6.bin",  0x000001, 0x080000, CRC(1ac0bd0c) SHA1(ab71bb84e61f5c7168601695f332a8d4a30d9948) )
441440   ROM_LOAD32_BYTE( "2_u7.bin",  0x000002, 0x080000, CRC(5f6db2b3) SHA1(84caa019d3b75be30a14d19ccc2f28e5e94028bd) )
442441   ROM_LOAD32_BYTE( "6_u8.bin",  0x000003, 0x080000, CRC(79e4643c) SHA1(274f2741f39c63e32f49c6a1a72ded1263bdcdaa) )
443     
442
444443   ROM_LOAD32_BYTE( "3_u58.bin", 0x200000, 0x040000, CRC(c913df7d) SHA1(96e89ecb9e5f4d596d71d7ba35af7b2af4670342) )
445444   ROM_LOAD32_BYTE( "4_u59.bin", 0x200001, 0x040000, CRC(cb192384) SHA1(329b4c1a4dc388d9f4ce063f9a54cbf3b967682a) )
446445   ROM_LOAD32_BYTE( "7_u60.bin", 0x200002, 0x040000, CRC(f187a7bf) SHA1(f4ce9ac9fe376250fe426de6ee404fc7841ef08a) )
trunk/src/mame/drivers/amazonlf.cpp
r253707r253708
11// license:BSD-3-Clause
22// copyright-holders:David Haywood
33/*
4 
4
55  uses ADC 'Amazon-LF' SoC, EISC CPU core - similar to crystal system?
66
77*/
trunk/src/mame/drivers/apple1.cpp
r253707r253708
66
77    Next generation driver written in February 2016 by R. Belmont.
88    Thanks to the original crew.
9
9
1010    Apple I has:
11       6502 @ 1.023 MHz (~0.960 MHz with RAM refresh)
12       4 or 8 KB RAM on-board
13       256 byte Monitor ROM
14      No IRQs, no sound, dumb terminal video
15      6820 PIA for keyboard / terminal interface
16 
17   -------------------------------------------------------------------
18 
19   How to use cassettes:
20   The system has no error checking or checksums, and the cassette
21   has no header.
22   Therefore, you must know the details, and pass these to the
23   interface yourself.
24 
25   BASIC has no cassette handling. You must enter the monitor
26   with: CALL -151
27   then when finished, re-enter BASIC with: E2B3R
11        6502 @ 1.023 MHz (~0.960 MHz with RAM refresh)
12        4 or 8 KB RAM on-board
13        256 byte Monitor ROM
14        No IRQs, no sound, dumb terminal video
15        6820 PIA for keyboard / terminal interface
2816
29   Examples:
17    -------------------------------------------------------------------
3018
31   A machine-language program will typically be like this:
32   C100R    (enter the interface)
33   0300.0FFFR  (enter the load and end addresses, then load the tape)
34   You start the tape.
35   When the prompt returns you stop the tape.
36   0300R  (run your program)
19    How to use cassettes:
20    The system has no error checking or checksums, and the cassette
21    has no header.
22    Therefore, you must know the details, and pass these to the
23    interface yourself.
3724
25    BASIC has no cassette handling. You must enter the monitor
26    with: CALL -151
27    then when finished, re-enter BASIC with: E2B3R
3828
39   To Load Tape Basic:
40   C100R
41   E000.EFFFR
42   You start the tape.
43   When the prompt returns you stop the tape.
44   E000R  (It must say 4C - if not, your tape is no good).
45   The BASIC prompt will appear
46   >@
29    Examples:
4730
31    A machine-language program will typically be like this:
32    C100R    (enter the interface)
33    0300.0FFFR  (enter the load and end addresses, then load the tape)
34    You start the tape.
35    When the prompt returns you stop the tape.
36    0300R  (run your program)
4837
49   A BASIC program is split into two areas, one for the scratch pad,
50   and one for the program proper.
51   In BASIC you may have to adjust the allowed memory area, such as
52   LOMEM = 768
53   Then, go to the monitor: CALL -151
54   C100R    (enter the interface)
55   00A4.00FFR 0300.0FFFR   (load the 2 parts)
56   You start the tape.
57   When the prompt returns you stop the tape.
58   E2B3R    (back to BASIC)
59   You can LIST or RUN now.
6038
39    To Load Tape Basic:
40    C100R
41    E000.EFFFR
42    You start the tape.
43    When the prompt returns you stop the tape.
44    E000R  (It must say 4C - if not, your tape is no good).
45    The BASIC prompt will appear
46    >@
6147
62   Saving is almost the same, when you specify the address range, enter
63   W instead of R. The difficulty is finding out how long your program is.
6448
65   Insert a blank tape
66   C100R
67   0300.0FFFW
68   Quickly press Record.
69   When the prompt returns, press Stop.
49    A BASIC program is split into two areas, one for the scratch pad,
50    and one for the program proper.
51    In BASIC you may have to adjust the allowed memory area, such as
52    LOMEM = 768
53    Then, go to the monitor: CALL -151
54    C100R    (enter the interface)
55    00A4.00FFR 0300.0FFFR   (load the 2 parts)
56    You start the tape.
57    When the prompt returns you stop the tape.
58    E2B3R    (back to BASIC)
59    You can LIST or RUN now.
7060
61
62    Saving is almost the same, when you specify the address range, enter
63    W instead of R. The difficulty is finding out how long your program is.
64
65    Insert a blank tape
66    C100R
67    0300.0FFFW
68    Quickly press Record.
69    When the prompt returns, press Stop.
70
7171**********************************************************************/
7272
7373#include "emu.h"
r253707r253708
8282
8383#include "softlist.h"
8484
85#define A1_CPU_TAG   "maincpu"
86#define A1_PIA_TAG   "pia6821"
87#define A1_BUS_TAG   "a1bus"
85#define A1_CPU_TAG  "maincpu"
86#define A1_PIA_TAG  "pia6821"
87#define A1_BUS_TAG  "a1bus"
8888#define A1_BASICRAM_TAG "basicram"
8989
9090class apple1_state : public driver_device
r253707r253708
146146
147147static const UINT8 apple1_keymap[] =
148148{
149   '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '=', '[', ']', ';', '\'',   // KEY0
150   ',', '.', '/', '\\', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',   // KEY1
151   'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_',   // KEY2
152   ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                        // KEY3
149   '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '=', '[', ']', ';', '\'',    // KEY0
150   ',', '.', '/', '\\', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',    // KEY1
151   'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_',    // KEY2
152   ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                              // KEY3
153153
154   ')', '!', '@', '#', '$', '%', '^', '&', '*', '(', '_', '+', '[', ']', ':', '"',      // KEY0 + shift
154   ')', '!', '@', '#', '$', '%', '^', '&', '*', '(', '_', '+', '[', ']', ':', '"',     // KEY0 + shift
155155   '<', '>', '?', '\\', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',    // KEY1 + shift
156156   'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_',    // KEY2 + shift
157   ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                        // KEY3 + shift
157   ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                              // KEY3 + shift
158158
159   '0', '1', '\x00', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', '8', '9', '\x1f', '=', '\x1b', '\x1d', ';', '\'',   // KEY0 + CTRL
160   ',', '.', '/', '\x1c', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c',   // KEY1 + CTRL
161   '\x0d', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\r', '_',   // KEY2 + CTRL
162   ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                        // KEY3 + CTRL
159   '0', '1', '\x00', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', '8', '9', '\x1f', '=', '\x1b', '\x1d', ';', '\'', // KEY0 + CTRL
160   ',', '.', '/', '\x1c', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c',  // KEY1 + CTRL
161   '\x0d', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\r', '_',  // KEY2 + CTRL
162   ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                              // KEY3 + CTRL
163163
164164};
165165
r253707r253708
236236   bool bKeypress = false;
237237
238238   // handle special keys first:
239   if (special & 0x10)   // RESET
239   if (special & 0x10) // RESET
240240   {
241241      m_reset_down = true;
242242      m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
r253707r253708
248248      m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
249249   }
250250
251   if (special & 0x20)   // CLEAR SCREEN
251   if (special & 0x20) // CLEAR SCREEN
252252   {
253253      m_clear_down = true;
254254      memset(m_vram, 0, sizeof(m_vram));
r253707r253708
282282            {
283283               rawkey = (port * 16) + bit;
284284               m_lastports[port] |= (1 << bit);
285               port = 4;   // force outer for loop to quit too
285               port = 4;   // force outer for loop to quit too
286286               bKeypress = true;
287287            }
288            else   // key up
288            else    // key up
289289            {
290290               m_lastports[port] &= ~(1 << bit);
291291            }
r253707r253708
433433
434434READ8_MEMBER(apple1_state::pia_keyboard_r)
435435{
436   return m_transchar | 0x80;   // bit 7 is wired high, similar-ish to the Apple II
436   return m_transchar | 0x80;  // bit 7 is wired high, similar-ish to the Apple II
437437}
438438
439439WRITE8_MEMBER(apple1_state::pia_display_w)
440440{
441   data &= 0x7f;   // D7 is ignored by the video h/w
441   data &= 0x7f;   // D7 is ignored by the video h/w
442442
443443   // ignore characters if CLEAR is down
444444   if (m_clear_down)
r253707r253708
624624
625625/*    YEAR  NAME    PARENT  COMPAT  MACHINE     INPUT   STATE         INIT     COMPANY            FULLNAME */
626626COMP( 1976, apple1,  0,     0,      apple1,     apple1, driver_device,  0,        "Apple Computer",    "Apple I", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE )
627
trunk/src/mame/drivers/apple2e.cpp
r253707r253708
29582958   PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
29592959   PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
29602960   PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH)  PORT_CHAR('\\') PORT_CHAR('|')
2961   PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS)     PORT_CHAR('`') PORT_CHAR(0xbf)   // inverted question mark
2961   PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS)     PORT_CHAR('`') PORT_CHAR(0xbf)  // inverted question mark
29622962   PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0)      PORT_CHAR('0') PORT_CHAR('=')
29632963   PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS)  PORT_CHAR('\'') PORT_CHAR('?')
29642964
r253707r253708
29842984   PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return")   PORT_CODE(KEYCODE_ENTER)    PORT_CHAR(13)
29852985   PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_UP)        PORT_CODE(KEYCODE_UP)
29862986   PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE)  PORT_CHAR(' ')
2987   PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE)  PORT_CHAR(0xc7) PORT_CHAR(0xa1)   // c with cedilla / inverted exclamation point
2987   PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE)  PORT_CHAR(0xc7) PORT_CHAR(0xa1) // c with cedilla / inverted exclamation point
29882988
29892989   PORT_START("X7")
29902990   PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
r253707r253708
35573557
35583558ROM_START(apple2ees)
35593559   ROM_REGION(0x2000,"gfx1",0)
3560   ROM_LOAD( "341-0212-a.e9", 0x000000, 0x002000, CRC(bc5575ef) SHA1(aa20c257255ef552295d32a3f56ccbb52b8716c3) )
3560   ROM_LOAD( "341-0212-a.e9", 0x000000, 0x002000, CRC(bc5575ef) SHA1(aa20c257255ef552295d32a3f56ccbb52b8716c3) )
35613561
35623562   ROM_REGION(0x8000,"maincpu",0)
35633563   ROM_LOAD ( "342-0135-b.64", 0x0000, 0x2000, CRC(e248835e) SHA1(523838c19c79f481fa02df56856da1ec3816d16e))
35643564   ROM_LOAD ( "342-0134-a.64", 0x2000, 0x2000, CRC(fc3d59d8) SHA1(8895a4b703f2184b673078f411f4089889b61c54))
35653565
35663566   ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
3567   ROM_LOAD( "341-0211-a.f12", 0x000000, 0x000800, CRC(fac15d54) SHA1(abe019de22641b0647e829a1d4745759bdffe86a) )
3567   ROM_LOAD( "341-0211-a.f12", 0x000000, 0x000800, CRC(fac15d54) SHA1(abe019de22641b0647e829a1d4745759bdffe86a) )
35683568ROM_END
35693569
35703570ROM_START(mprof3)
trunk/src/mame/drivers/argox.cpp
r253707r253708
5151         m_maincpu(*this, "maincpu")
5252   { }
5353
54        DECLARE_DRIVER_INIT(os214);
54      DECLARE_DRIVER_INIT(os214);
5555   required_device<cpu_device> m_maincpu;
5656};
5757
r253707r253708
7676}
7777
7878ROM_START( os214 )
79    ROM_REGION( 0x080000, "maincpu", 0 )
80    ROM_LOAD16_BYTE( "u9_s2a2-4.03_argox_am.u9", 0x000000, 0x040000, CRC(3bd8b2b1) SHA1(546f9fd8d7e1f589f6e594a332a3429041b49eea) )
81    ROM_LOAD16_BYTE( "u8_s2a2-4.03_argox_am.u8", 0x000001, 0x040000, CRC(d49f52af) SHA1(0ca5a70c6c3995f275226af26db965f6ba7ed123) )
79   ROM_REGION( 0x080000, "maincpu", 0 )
80   ROM_LOAD16_BYTE( "u9_s2a2-4.03_argox_am.u9", 0x000000, 0x040000, CRC(3bd8b2b1) SHA1(546f9fd8d7e1f589f6e594a332a3429041b49eea) )
81   ROM_LOAD16_BYTE( "u8_s2a2-4.03_argox_am.u8", 0x000001, 0x040000, CRC(d49f52af) SHA1(0ca5a70c6c3995f275226af26db965f6ba7ed123) )
8282ROM_END
8383
8484/*    YEAR  NAME   PARENT  COMPAT  MACHINE  INPUT  CLASS         INIT  COMPANY  FULLNAME                         FLAGS   */
trunk/src/mame/drivers/asteroid.cpp
r253707r253708
774774
775775/*  Space Rocks (J.Estevez, Barcelona).
776776    Seems to be a legit spanish set, since there are documented cabs
777   registered in Spain.
777    registered in Spain.
778778*/
779779ROM_START( spcrocks )
780780   ROM_REGION( 0x8000, "maincpu", 0 )
trunk/src/mame/drivers/blmbycar.cpp
r253707r253708
329329{
330330   save_item(NAME(m_pot_wheel));
331331   save_item(NAME(m_old_val));
332   
332
333333   membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000);
334334}
335335
r253707r253708
377377MACHINE_START_MEMBER(blmbycar_state,watrball)
378378{
379379   save_item(NAME(m_retvalue));
380   
380
381381   membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000);
382382}
383383
trunk/src/mame/drivers/bublbobl.cpp
r253707r253708
18971897GAME( 1986, sboblbobl,  bublbobl, boblbobl, sboblbobl,  bublbobl_state, bublbobl, ROT0,  "bootleg (Datsu)", "Super Bobble Bobble (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
18981898GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl,   bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bobble Bobble (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
18991899GAME( 1986, sboblboblb, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bobble Bobble (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
1900GAME( 1986, sboblbobld, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bobble Bobble (bootleg, set 4)", MACHINE_SUPPORTS_SAVE )
1900GAME( 1986, sboblbobld, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bobble Bobble (bootleg, set 4)", MACHINE_SUPPORTS_SAVE )
19011901GAME( 1986, sboblboblc, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bubble Bobble (bootleg)", MACHINE_SUPPORTS_SAVE ) // the title screen on this one isn't hacked
19021902GAME( 1986, bub68705,   bublbobl, bub68705, bublbobl,   bublbobl_state, bublbobl, ROT0,  "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE )
19031903
trunk/src/mame/drivers/cobra.cpp
r253707r253708
156156        0x000ac:        Viewport center Y
157157
158158        0x00114:        xxxxxxxx xxxxxxxx -------- --------             Framebuffer pixel read line count
159                      -------- -------- xxxxxxxx xxxxxxxx             Framebuffer pixel read pixel count
159                        -------- -------- xxxxxxxx xxxxxxxx             Framebuffer pixel read pixel count
160160
161161        0x00118:        xxxxxxxx xxxxxxxx -------- --------             Framebuffer pixel read X pos
162162                        -------- -------- xxxxxxxx xxxxxxxx             Framebuffer pixel read Y pos
r253707r253708
26682668                  case 0x0e0000:      buffer = &m_overlay->pix32(y+i); break;
26692669                  case 0x000800:      buffer = &m_zbuffer->pix32(y+i); break;
26702670                  case 0x000200:      buffer = &m_stencil->pix32(y+i); break;
2671   
2671
26722672                  default:
26732673                  {
26742674                     fatalerror("gfxfifo_exec: fb read from buffer %08X!\n", m_gfx_gram[0x80100/4]);
trunk/src/mame/drivers/esq5505.cpp
r253707r253708
582582         }
583583         else if (val == 0x02)
584584         {
585//            printf("Analog tests!\n");
585//              printf("Analog tests!\n");
586586            m_panel->xmit_char(54 | 0x80); m_panel->xmit_char(0); // Preset down
587587            m_panel->xmit_char(8 | 0x80);  m_panel->xmit_char(0); // Compare down
588588            m_panel->xmit_char(8);         m_panel->xmit_char(0); // Compare up
r253707r253708
595595      if (val < 20) val += shift;
596596      if (oldval == 0 && newval == 1)
597597      {
598   //      printf("key pressed %d\n", val);
598   //      printf("key pressed %d\n", val);
599599         m_panel->xmit_char(val);
600600         m_panel->xmit_char(0x00);
601601      }
r253707r253708
794794static INPUT_PORTS_START( sq1 )
795795#if KEYBOARD_HACK
796796   PORT_START("KEY0")
797   PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)         PORT_CHAR('q')  PORT_CHAR('Q')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  148) PORT_NAME("PITCH")  // 148=PITCH   (lo 1)
798   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1)         PORT_CHAR('1')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  149) PORT_NAME("CONTROL")  // 149=CONTROL   (hi 1)
799   PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W)         PORT_CHAR('w')  PORT_CHAR('W')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  132) PORT_NAME("ENV1")  // 132=ENV1      (lo 2)
800   PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2)         PORT_CHAR('2')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  133) PORT_NAME("CLICK")  // 133=CLICK   (hi 2)
801   PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E)         PORT_CHAR('e')  PORT_CHAR('E')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  182) PORT_NAME("LFO")  // 182=LFO      (lo 3)
802   PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3)         PORT_CHAR('3')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  183) PORT_NAME("SONG")  // 183=SONG      (hi 3)
803   PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R)         PORT_CHAR('r')  PORT_CHAR('R')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  134) PORT_NAME("FILTER")  // 134=FILTER   (lo 4)
804   PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4)         PORT_CHAR('4')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  135) PORT_NAME("SEQ")  // 135=SEQ      (hi 4)
805   PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T)         PORT_CHAR('t')  PORT_CHAR('T')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  142) PORT_NAME("ENV2")  // 142=ENV2      (lo 5)
806   PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5)         PORT_CHAR('5')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  143) PORT_NAME("EVENT")  // 143=EVENT   (hi 5)
807   PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y)         PORT_CHAR('y')  PORT_CHAR('Y')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  150) PORT_NAME("AMP")  // 150=AMP      (lo 6)
808   PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6)         PORT_CHAR('6')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  151) PORT_NAME("PARAM")  // 151=PARAM   (hi 6)
809   PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U)         PORT_CHAR('u')  PORT_CHAR('U')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  166) PORT_NAME("OUTPUT")  // 166=OUTPUT   (lo 7)
810   PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7)         PORT_CHAR('7')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  167) PORT_NAME("MIX")  // 167=MIX      (hi 7)
811   PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I)         PORT_CHAR('i')  PORT_CHAR('I')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  158) PORT_NAME("P. EFFECT")  // 158=P.EFFECT   (lo 8)
812   PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8)         PORT_CHAR('8')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  159) PORT_NAME("S. EFFECT")  // 159=S.EFFECT   (hi 8)
797   PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)         PORT_CHAR('q')  PORT_CHAR('Q')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  148) PORT_NAME("PITCH")  // 148=PITCH  (lo 1)
798   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1)         PORT_CHAR('1')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  149) PORT_NAME("CONTROL")  // 149=CONTROL  (hi 1)
799   PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W)         PORT_CHAR('w')  PORT_CHAR('W')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  132) PORT_NAME("ENV1")  // 132=ENV1        (lo 2)
800   PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2)         PORT_CHAR('2')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  133) PORT_NAME("CLICK")  // 133=CLICK  (hi 2)
801   PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E)         PORT_CHAR('e')  PORT_CHAR('E')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  182) PORT_NAME("LFO")  // 182=LFO      (lo 3)
802   PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3)         PORT_CHAR('3')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  183) PORT_NAME("SONG")  // 183=SONG        (hi 3)
803   PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R)         PORT_CHAR('r')  PORT_CHAR('R')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  134) PORT_NAME("FILTER")  // 134=FILTER    (lo 4)
804   PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4)         PORT_CHAR('4')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  135) PORT_NAME("SEQ")  // 135=SEQ      (hi 4)
805   PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T)         PORT_CHAR('t')  PORT_CHAR('T')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  142) PORT_NAME("ENV2")  // 142=ENV2        (lo 5)
806   PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5)         PORT_CHAR('5')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  143) PORT_NAME("EVENT")  // 143=EVENT  (hi 5)
807   PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y)         PORT_CHAR('y')  PORT_CHAR('Y')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  150) PORT_NAME("AMP")  // 150=AMP      (lo 6)
808   PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6)         PORT_CHAR('6')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  151) PORT_NAME("PARAM")  // 151=PARAM  (hi 6)
809   PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U)         PORT_CHAR('u')  PORT_CHAR('U')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  166) PORT_NAME("OUTPUT")  // 166=OUTPUT    (lo 7)
810   PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7)         PORT_CHAR('7')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  167) PORT_NAME("MIX")  // 167=MIX      (hi 7)
811   PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I)         PORT_CHAR('i')  PORT_CHAR('I')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  158) PORT_NAME("P. EFFECT")  // 158=P.EFFECT   (lo 8)
812   PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8)         PORT_CHAR('8')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  159) PORT_NAME("S. EFFECT")  // 159=S.EFFECT   (hi 8)
813813   PORT_START("KEY1")
814   PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O)         PORT_CHAR('o')  PORT_CHAR('O')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  174) PORT_NAME("MIDI")  // 174=MIDI      (lo 9)
815   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9)         PORT_CHAR('9')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  175) PORT_NAME("SYSTEM")  // 175=SYSTEM   (hi 9)
816   PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P)         PORT_CHAR('p')  PORT_CHAR('P')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  164) PORT_NAME("WAVE")  // 164=WAVE      (lo 0)
817   PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0)         PORT_CHAR('0')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  165) PORT_NAME("LOCATE")  // 165=LOCATE   (hi 0)
814   PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O)         PORT_CHAR('o')  PORT_CHAR('O')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  174) PORT_NAME("MIDI")  // 174=MIDI        (lo 9)
815   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9)         PORT_CHAR('9')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  175) PORT_NAME("SYSTEM")  // 175=SYSTEM    (hi 9)
816   PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P)         PORT_CHAR('p')  PORT_CHAR('P')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  164) PORT_NAME("WAVE")  // 164=WAVE        (lo 0)
817   PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0)         PORT_CHAR('0')                  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  165) PORT_NAME("LOCATE")  // 165=LOCATE    (hi 0)
818818   PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G)         PORT_CHAR('g')  PORT_CHAR('G')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  144) PORT_NAME("TRACK 1")  // 144=Track 1
819819   PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H)         PORT_CHAR('h')  PORT_CHAR('H')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  160) PORT_NAME("TRACK 2")  // 160=Track 2
820820   PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J)         PORT_CHAR('j')  PORT_CHAR('J')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  152) PORT_NAME("TRACK 3")  // 152=Track 3
r253707r253708
828828   PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN)                                      PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  140) PORT_NAME("PROG DN")  // 140=ProgDn
829829   PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP)                                        PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  141) PORT_NAME("PROG UP")  // 141=ProgUp
830830   PORT_START("KEY2")
831   PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT)                                     PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  156) PORT_NAME("ROM/INT SELECT +")  // 156=ROM/INT Select   189=track +
832   PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT)                                      PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  157) PORT_NAME("ROM/INT SELECT -")  // 157=ROM/INT Select   190=track -
831   PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT)                                     PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  156) PORT_NAME("ROM/INT SELECT +")  // 156=ROM/INT Select  189=track +
832   PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT)                                      PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  157) PORT_NAME("ROM/INT SELECT -")  // 157=ROM/INT Select  190=track -
833833   PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z)         PORT_CHAR('z')  PORT_CHAR('Z')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  180) PORT_NAME("SOUND SELECT")  // 180=SOUND Select
834834   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A)         PORT_CHAR('a')  PORT_CHAR('A')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  181) PORT_NAME("SOUND EDIT")  // 181=SOUND Edit
835835   PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S)         PORT_CHAR('s')  PORT_CHAR('S')  PORT_CHANGED_MEMBER(DEVICE_SELF, esq5505_state, key_stroke,  184) PORT_NAME("SEQ EDIT")  // 184=SEQ Edit
trunk/src/mame/drivers/fidel6502.cpp
r253707r253708
33/******************************************************************************
44
55    Fidelity Electronics 6502 based board driver
6   
6
77******************************************************************************
88
99Champion Sensory Chess Challenger (CSC)
r253707r253708
286286   // devices/pointers
287287   optional_device<pia6821_device> m_6821pia;
288288   optional_device<generic_slot_device> m_cart;
289   
289
290290   TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); }
291291   TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); }
292292
r253707r253708
309309   DECLARE_WRITE8_MEMBER(sc12_control_w);
310310   DECLARE_READ8_MEMBER(sc12_input_r);
311311   DECLARE_READ8_MEMBER(sc12_cart_r);
312   
312
313313   // 6080/6092/6093 (Excellence)
314314   DECLARE_INPUT_CHANGED_MEMBER(fexcelv_bankswitch);
315315   DECLARE_READ8_MEMBER(fexcelv_speech_r);
r253707r253708
331331{
332332   // 7442 0-8: led select, input mux
333333   m_inp_mux = 1 << m_led_select & 0x3ff;
334   
334
335335   // 7442 9: speaker out
336336   m_speaker->level_w(m_inp_mux >> 9 & 1);
337337
r253707r253708
374374
375375   // d1: TSI START line
376376   m_speech->start_w(data >> 1 & 1);
377   
377
378378   // d4: lower TSI volume
379379   m_speech->set_output_gain(0, (data & 0x10) ? 0.5 : 1.0);
380380}
r253707r253708
391391   // d5: button row 8 (active low)
392392   // d6,d7: language switches
393393   data |= (~read_inputs(9) >> 3 & 0x20) | (~m_inp_matrix[9]->read() << 6 & 0xc0);
394   
394
395395   return data;
396396}
397397
r253707r253708
520520   // a0-a2,d0: 74259(1)
521521   UINT8 mask = 1 << offset;
522522   m_led_select = (m_led_select & ~mask) | ((data & 1) ? mask : 0);
523   
523
524524   // 74259 Q0-Q3: 7442 a0-a3
525525   // 7442 0-8: led data, input mux
526526   UINT16 sel = 1 << (m_led_select & 0xf) & 0x3ff;
r253707r253708
536536   // a0-a2,d1: digit segment data (model 6093)
537537   m_7seg_data = (m_7seg_data & ~mask) | ((data & 2) ? mask : 0);
538538   UINT8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
539   
539
540540   // update display: 4 7seg leds, 2*8 chessboard leds
541541   for (int i = 0; i < 6; i++)
542542      m_display_state[i] = (led_sel >> i & 1) ? ((i < 2) ? led_data : seg_data) : 0;
r253707r253708
550550   {
551551      // a0-a2,d2: 74259(2) to speech board
552552      m_speech_data = (m_speech_data & ~mask) | ((data & 4) ? mask : 0);
553   
553
554554      // 74259 Q6: TSI ROM A11
555555      m_speech->force_update(); // update stream to now
556556      m_speech_bank = (m_speech_bank & ~1) | (m_speech_data >> 6 & 1);
r253707r253708
566566{
567567   // a0-a2,d6: from speech board: language switches and TSI BUSY line, otherwise tied to VCC
568568   UINT8 d6 = (read_safe(m_inp_matrix[9], 0xff) >> offset & 1) ? 0x40 : 0;
569   
569
570570   // a0-a2,d7: multiplexed inputs (active low)
571571   return d6 | ((read_inputs(9) >> offset & 1) ? 0 : 0x80);
572572}
trunk/src/mame/drivers/fidel68k.cpp
r253707r253708
33/******************************************************************************
44
55    Fidelity Electronics 68000 based board driver
6   
6
77    TODO:
88    - how does dual-CPU work?
99    - IRQ level/timing is unknown
trunk/src/mame/drivers/fidelz80.cpp
r253707r253708
1616    Chess pieces are required, but theoretically blindfold chess is possible.
1717    Chessboard artwork is provided for boards with pressure/magnet sensors.
1818    Read the official manual(s) on how to play.
19   
19
2020    Keypad legend:
2121    - RE: Reset
2222    - CL: Clear
r253707r253708
2929    - RV: Reverse
3030    - ST: Set/Stop
3131    - TM: Time
32   
32
3333    Peripherals, compatible with various boards:
3434    - Fidelity Challenger Printer - thermal printer, MCU=?
35   
35
3636    Program/data cartridges, for various boards, some cross-compatible:
3737    - CG6: Greatest Chess Games 1
3838    - CAC: Challenger Advanced Chess - 8KB 101-1038A01
3939    - CB9: Challenger Book Openings 1 - 8KB?
4040    - CB16: Challenger Book Openings 2 - 8+8KB 101-1042A01,02
4141    - others are alt. titles of these?
42   
42
4343    Board hardware descriptions below.
4444    Detailed RE work done by Kevin 'kevtris' Horton, except where noted
4545
r253707r253708
534534   DECLARE_WRITE8_MEMBER(vcc_ppi_portc_w);
535535   DECLARE_WRITE8_MEMBER(cc10_ppi_porta_w);
536536   TIMER_DEVICE_CALLBACK_MEMBER(beeper_off_callback);
537   
537
538538   // BCC
539539   DECLARE_READ8_MEMBER(bcc_input_r);
540540   DECLARE_WRITE8_MEMBER(bcc_control_w);
r253707r253708
938938
939939   // d4: TSI BUSY line
940940   data |= (m_speech->busy_r()) ? 0 : 0x10;
941   
941
942942   return data;
943943}
944944
r253707r253708
947947   // d0,d1: input mux highest bits
948948   // d5: enable language switch
949949   m_inp_mux = (m_inp_mux & 0xff) | (data << 8 & 0x300) | (data << 5 & 0x400);
950   
950
951951   // d7: TSI ROM A12
952952   m_speech->force_update(); // update stream to now
953953   m_speech_bank = data >> 7 & 1;
954   
954
955955   // d6: TSI START line
956956   m_speech->start_w(data >> 6 & 1);
957   
957
958958   // d2: lower TSI volume
959959   m_speech->set_output_gain(0, (data & 4) ? 0.5 : 1.0);
960960}
trunk/src/mame/drivers/galaxi.cpp
r253707r253708
1717    1x MC1458P (u10)(sound)
1818    1x TDA2003 (u8)(sound)
1919    1x oscillator 10.000MHz (QZ1)
20    1x oscillator 16.000000 (QZ2)
20    1x oscillator 16.000000 (QZ2)
2121  ROMs:
2222    1x AT27C020 (1)
2323    2x M27C4001 (2,3)
trunk/src/mame/drivers/goldstar.cpp
r253707r253708
67636763   32*8   /* every char takes 32 consecutive bytes */
67646764};
67656765
6766static const gfx_layout super9_tilelayout =  // Green is OK. Red needs normal goldstar order...
6766static const gfx_layout super9_tilelayout =  // Green is OK. Red needs normal goldstar order...
67676767{
67686768   8,32,    /* 8*32 characters */
67696769   256,    /* 256 tiles */
r253707r253708
86298629/* Cherry Gold I (bootleg)
86308630   It runs in CB3e similar hardware...
86318631
86321x TMPZ84C00AP-6  u15                8-bit Microprocessor
86333x D71055C        u30, u39, u40    Programmable Peripheral Interface
86341x WF19054        u27                Programmable Sound Generator
86351x SN76489AN      u28                Digital Complex Sound Generator
86361x oscillator    unmarked  Y1   
86321x TMPZ84C00AP-6  u15               8-bit Microprocessor
86333x D71055C        u30, u39, u40     Programmable Peripheral Interface
86341x WF19054        u27               Programmable Sound Generator
86351x SN76489AN      u28               Digital Complex Sound Generator
86361x oscillator   unmarked  Y1
86378637
86388638ROMs
863986391x D27256      1.u3
r253707r253708
866086601x battery 5,5V
86618661
86628662Notes
8663PCB is marked "REV.3"
8663PCB is marked "REV.3"
86648664*/
86658665ROM_START( chryglda )
86668666   ROM_REGION( 0x10000, "maincpu", 0 )
r253707r253708
92689268
92699269
92709270/* Cherry Master I (CM1-1.01)
9271   Sticker with "Cherry Master V4 -B-" on the PCB.   
9271   Sticker with "Cherry Master V4 -B-" on the PCB.
92729272   Similar to cmasterb. Different program.
92739273
927492741x TMPZ84C00AP-6   u80    8-bit Microprocessor
r253707r253708
929692961x pushbutton (SW6)
929792971x trimmer (volume)(VR1)
929892985x 8x2 switches DIP(SW1-SW5)
92991x battery 5.5V(BT1)
92991x battery 5.5V(BT1)
93009300*/
93019301ROM_START( cmasterg )
93029302   ROM_REGION( 0x10000, "maincpu", 0 )
r253707r253708
1205912059   Lacks of Dyna copyright. Maybe bootleg.
1206012060
1206112061   Not reels stop options.
12062   Tried any input on the real hardware without luck.   
12062   Tried any input on the real hardware without luck.
1206312063*/
1206412064ROM_START( scmaster )  // all roms unique
1206512065   ROM_REGION( 0x10000, "maincpu", 0 )
r253707r253708
1348313483   m_maincpu->space(AS_IO).install_read_handler(0x17, 0x17, read8_delegate(FUNC(cmaster_state::fixedval48_r),this));
1348413484}
1348513485
13486DRIVER_INIT_MEMBER(cmaster_state, rp96sub)   // 95 33 95 33 70 6C 70 6C... XORs seem ok. need bitswap and handler.
13486DRIVER_INIT_MEMBER(cmaster_state, rp96sub)  // 95 33 95 33 70 6C 70 6C... XORs seem ok. need bitswap and handler.
1348713487{
1348813488   int i;
1348913489   UINT8 *ROM = memregion("maincpu")->base();
r253707r253708
1350213502      ROM[i] = x;
1350313503   }
1350413504
13505//   m_maincpu->space(AS_IO).install_read_handler(0x34, 0x34, read8_delegate(FUNC(cmaster_state::fixedvalb2_r),this));
13505//  m_maincpu->space(AS_IO).install_read_handler(0x34, 0x34, read8_delegate(FUNC(cmaster_state::fixedvalb2_r),this));
1350613506}
1350713507
1350813508
trunk/src/mame/drivers/goupil.cpp
r253707r253708
11// license:BSD-3-Clause
2// copyright-holders:Jean-François DEL NERO
2// copyright-holders:Jean-Francois DEL NERO
33/***************************************************************************
44
55    SMT Goupil G1 driver
r253707r253708
1717    -> The internal Basic is working (-> 6800 0xC3 illegal opcode emulation needed).
1818
1919    02/04/2016
20    Jean-François DEL NERO
20    Jean-Francois DEL NERO
2121
2222****************************************************************************/
2323
r253707r253708
3939class goupil_g1_state : public driver_device
4040{
4141public:
42    goupil_g1_state(const machine_config &mconfig, device_type type, const char *tag)
43        : driver_device(mconfig, type, tag)
44        , m_acia(*this,  "ef6850")
45        , m_ef9364(*this, "ef9364")
46        , m_maincpu(*this, "maincpu")
47        , m_via_video(*this, "m_via_video")
48        , m_via_keyb(*this, "m_via_keyb")
49        , m_via_modem(*this, "m_via_modem")
50        , m_fdc(*this, "fd1791")
51        , m_floppy0(*this, "fd1791:0")
52        , m_floppy1(*this, "fd1791:1")
53        , m_floppy(NULL)
54    { }
42   goupil_g1_state(const machine_config &mconfig, device_type type, const char *tag)
43      : driver_device(mconfig, type, tag)
44      , m_acia(*this,  "ef6850")
45      , m_ef9364(*this, "ef9364")
46      , m_maincpu(*this, "maincpu")
47      , m_via_video(*this, "m_via_video")
48      , m_via_keyb(*this, "m_via_keyb")
49      , m_via_modem(*this, "m_via_modem")
50      , m_fdc(*this, "fd1791")
51      , m_floppy0(*this, "fd1791:0")
52      , m_floppy1(*this, "fd1791:1")
53      , m_floppy(NULL)
54   { }
5555
56    DECLARE_WRITE8_MEMBER(via_video_pba_w);
57    DECLARE_WRITE8_MEMBER(via_video_pbb_w);
58    DECLARE_WRITE_LINE_MEMBER(via_video_ca2_w);
56   DECLARE_WRITE8_MEMBER(via_video_pba_w);
57   DECLARE_WRITE8_MEMBER(via_video_pbb_w);
58   DECLARE_WRITE_LINE_MEMBER(via_video_ca2_w);
5959
60    DECLARE_READ8_MEMBER(kbd1_r);
61    DECLARE_READ8_MEMBER(kbd2_r);
62    DECLARE_READ8_MEMBER(shift_kb1_r);
63    DECLARE_READ8_MEMBER(shift_kb2_r);
64    DECLARE_READ8_MEMBER(ctrl_kb1_r);
65    DECLARE_READ8_MEMBER(ctrl_kb2_r);
60   DECLARE_READ8_MEMBER(kbd1_r);
61   DECLARE_READ8_MEMBER(kbd2_r);
62   DECLARE_READ8_MEMBER(shift_kb1_r);
63   DECLARE_READ8_MEMBER(shift_kb2_r);
64   DECLARE_READ8_MEMBER(ctrl_kb1_r);
65   DECLARE_READ8_MEMBER(ctrl_kb2_r);
6666
67    DECLARE_WRITE8_MEMBER(scanlines_kbd1_w);
68    DECLARE_WRITE8_MEMBER(scanlines_kbd2_w);
67   DECLARE_WRITE8_MEMBER(scanlines_kbd1_w);
68   DECLARE_WRITE8_MEMBER(scanlines_kbd2_w);
6969
70    DECLARE_READ_LINE_MEMBER(via_keyb_ca2_r);
70   DECLARE_READ_LINE_MEMBER(via_keyb_ca2_r);
7171
72    virtual void machine_start() override;
73    virtual void machine_reset() override;
72   virtual void machine_start() override;
73   virtual void machine_reset() override;
7474
75    UINT8 m_row_kbd1;
76    UINT8 m_row_kbd2;
77    int old_state_ca2;
78    UINT8 via_video_pbb_data;
79    UINT8 cnttim;
80    UINT8 valkeyb;
81    TIMER_DEVICE_CALLBACK_MEMBER(goupil_scanline);
75   UINT8 m_row_kbd1;
76   UINT8 m_row_kbd2;
77   int old_state_ca2;
78   UINT8 via_video_pbb_data;
79   UINT8 cnttim;
80   UINT8 valkeyb;
81   TIMER_DEVICE_CALLBACK_MEMBER(goupil_scanline);
8282
8383private:
84    required_device<acia6850_device> m_acia;
85    required_device<ef9364_device> m_ef9364;
86    required_device<cpu_device> m_maincpu;
87    required_device<via6522_device> m_via_video;
88    required_device<via6522_device> m_via_keyb;
89    required_device<via6522_device> m_via_modem;
90    required_device<fd1791_t> m_fdc;
91    required_device<floppy_connector> m_floppy0;
92    required_device<floppy_connector> m_floppy1;
93    floppy_image_device *m_floppy;
84   required_device<acia6850_device> m_acia;
85   required_device<ef9364_device> m_ef9364;
86   required_device<cpu_device> m_maincpu;
87   required_device<via6522_device> m_via_video;
88   required_device<via6522_device> m_via_keyb;
89   required_device<via6522_device> m_via_modem;
90   required_device<fd1791_t> m_fdc;
91   required_device<floppy_connector> m_floppy0;
92   required_device<floppy_connector> m_floppy1;
93   floppy_image_device *m_floppy;
9494};
9595
9696/**********************************
r253707r253708
104104
105105TIMER_DEVICE_CALLBACK_MEMBER( goupil_g1_state::goupil_scanline )
106106{
107    m_ef9364->update_scanline((UINT16)param);
107   m_ef9364->update_scanline((UINT16)param);
108108}
109109
110110static ADDRESS_MAP_START(goupil_mem, AS_PROGRAM, 8, goupil_g1_state)
111    ADDRESS_MAP_UNMAP_HIGH
112    AM_RANGE(0x0000,0x3fff) AM_RAM
113    AM_RANGE(0x4000,0x7fff) AM_RAM
114    AM_RANGE(0xC000,0xE3FF) AM_ROM AM_REGION("maincpu", 0x1000) // Basic ROM (BASIC 1 up to BASIC 9).
111   ADDRESS_MAP_UNMAP_HIGH
112   AM_RANGE(0x0000,0x3fff) AM_RAM
113   AM_RANGE(0x4000,0x7fff) AM_RAM
114   AM_RANGE(0xC000,0xE3FF) AM_ROM AM_REGION("maincpu", 0x1000) // Basic ROM (BASIC 1 up to BASIC 9).
115115
116    AM_RANGE(0xe400,0xe7ff) AM_RAM
117    AM_RANGE(0xE800,0xE80F) AM_DEVREADWRITE("ef6850", acia6850_device, data_r, data_w)
118    AM_RANGE(0xE810,0xE81F) AM_DEVREADWRITE("m_via_video", via6522_device, read, write)
116   AM_RANGE(0xe400,0xe7ff) AM_RAM
117   AM_RANGE(0xE800,0xE80F) AM_DEVREADWRITE("ef6850", acia6850_device, data_r, data_w)
118   AM_RANGE(0xE810,0xE81F) AM_DEVREADWRITE("m_via_video", via6522_device, read, write)
119119
120    AM_RANGE(0xE820,0xE820) AM_DEVREADWRITE("i8279_kb1", i8279_device, data_r, data_w )
121    AM_RANGE(0xE821,0xE821) AM_DEVREADWRITE("i8279_kb1", i8279_device, status_r, cmd_w )
120   AM_RANGE(0xE820,0xE820) AM_DEVREADWRITE("i8279_kb1", i8279_device, data_r, data_w )
121   AM_RANGE(0xE821,0xE821) AM_DEVREADWRITE("i8279_kb1", i8279_device, status_r, cmd_w )
122122
123    AM_RANGE(0xE830,0xE830) AM_DEVREADWRITE("i8279_kb2", i8279_device, data_r, data_w )
124    AM_RANGE(0xE831,0xE831) AM_DEVREADWRITE("i8279_kb2", i8279_device, status_r, cmd_w )
123   AM_RANGE(0xE830,0xE830) AM_DEVREADWRITE("i8279_kb2", i8279_device, data_r, data_w )
124   AM_RANGE(0xE831,0xE831) AM_DEVREADWRITE("i8279_kb2", i8279_device, status_r, cmd_w )
125125
126    AM_RANGE(0xE840,0xE84F) AM_DEVREADWRITE("m_via_keyb", via6522_device, read, write)
126   AM_RANGE(0xE840,0xE84F) AM_DEVREADWRITE("m_via_keyb", via6522_device, read, write)
127127
128    AM_RANGE(0xE860,0xE86F) AM_DEVREADWRITE("m_via_modem", via6522_device, read, write)
128   AM_RANGE(0xE860,0xE86F) AM_DEVREADWRITE("m_via_modem", via6522_device, read, write)
129129
130    AM_RANGE(0xe8f0,0xe8ff) AM_DEVREADWRITE("fd1791", fd1791_t, read, write)
131    //AM_RANGE(0xf08a,0xf08a) AM_READWRITE( fdc_sel0_r, fdc_sel0_w )
132    //AM_RANGE(0xf08b,0xf08b) AM_READWRITE( fdc_sel1_r, fdc_sel1_w )
130   AM_RANGE(0xe8f0,0xe8ff) AM_DEVREADWRITE("fd1791", fd1791_t, read, write)
131   //AM_RANGE(0xf08a,0xf08a) AM_READWRITE( fdc_sel0_r, fdc_sel0_w )
132   //AM_RANGE(0xf08b,0xf08b) AM_READWRITE( fdc_sel1_r, fdc_sel1_w )
133133
134    AM_RANGE(0xf400,0xf7ff) AM_ROM AM_REGION("maincpu", 0x0800) // Modem (MOD 3)
135    AM_RANGE(0xf800,0xffff) AM_ROM AM_REGION("maincpu", 0x0000) // Monitor (MON 1 + MON 2)
134   AM_RANGE(0xf400,0xf7ff) AM_ROM AM_REGION("maincpu", 0x0800) // Modem (MOD 3)
135   AM_RANGE(0xf800,0xffff) AM_ROM AM_REGION("maincpu", 0x0000) // Monitor (MON 1 + MON 2)
136136ADDRESS_MAP_END
137137
138138static ADDRESS_MAP_START( goupil_io, AS_IO, 8, goupil_g1_state)
139    ADDRESS_MAP_UNMAP_HIGH
139   ADDRESS_MAP_UNMAP_HIGH
140140ADDRESS_MAP_END
141141
142142WRITE8_MEMBER( goupil_g1_state::scanlines_kbd1_w )
143143{
144    m_row_kbd1 = data;
144   m_row_kbd1 = data;
145145}
146146
147147READ8_MEMBER( goupil_g1_state::ctrl_kb1_r )
148148{
149    char kbdrow[6];
150    unsigned char data;
149   char kbdrow[6];
150   unsigned char data;
151151
152    kbdrow[0] = 'C';
153    kbdrow[1] = 'T';
154    kbdrow[2] = 'R';
155    kbdrow[3] = '0';
156    kbdrow[4] = 0;
152   kbdrow[0] = 'C';
153   kbdrow[1] = 'T';
154   kbdrow[2] = 'R';
155   kbdrow[3] = '0';
156   kbdrow[4] = 0;
157157
158    data = ioport(kbdrow)->read();
159    if( data & 0x02 )
160        return 1;
161    else
162        return 0;
158   data = ioport(kbdrow)->read();
159   if( data & 0x02 )
160      return 1;
161   else
162      return 0;
163163}
164164
165165READ8_MEMBER( goupil_g1_state::ctrl_kb2_r )
166166{
167    return 1;
167   return 1;
168168}
169169
170170READ8_MEMBER( goupil_g1_state::shift_kb1_r )
171171{
172    char kbdrow[6];
173    unsigned char data;
172   char kbdrow[6];
173   unsigned char data;
174174
175    kbdrow[0] = 'C';
176    kbdrow[1] = 'T';
177    kbdrow[2] = 'R';
178    kbdrow[3] = '0';
179    kbdrow[4] = 0;
175   kbdrow[0] = 'C';
176   kbdrow[1] = 'T';
177   kbdrow[2] = 'R';
178   kbdrow[3] = '0';
179   kbdrow[4] = 0;
180180
181    data = ioport(kbdrow)->read();
182    if( data & 0x01 )
183        return 1;
184    else
185        return 0;
181   data = ioport(kbdrow)->read();
182   if( data & 0x01 )
183      return 1;
184   else
185      return 0;
186186}
187187
188188READ8_MEMBER( goupil_g1_state::shift_kb2_r )
189189{
190    return 1;
190   return 1;
191191}
192192
193193READ8_MEMBER( goupil_g1_state::kbd1_r )
194194{
195    char kbdrow[6];
196    UINT8 data = 0xff;
195   char kbdrow[6];
196   UINT8 data = 0xff;
197197
198    kbdrow[0] = 'A';
199    kbdrow[1] = 'X';
200    kbdrow[2] = '0' + ( m_row_kbd1 & 7 ) ;
201    kbdrow[3] = 0;
198   kbdrow[0] = 'A';
199   kbdrow[1] = 'X';
200   kbdrow[2] = '0' + ( m_row_kbd1 & 7 ) ;
201   kbdrow[3] = 0;
202202
203    data = ioport(kbdrow)->read();
203   data = ioport(kbdrow)->read();
204204
205    return data;
205   return data;
206206}
207207
208208WRITE8_MEMBER( goupil_g1_state::scanlines_kbd2_w )
209209{
210    m_row_kbd2 = data & 7;
210   m_row_kbd2 = data & 7;
211211}
212212
213213READ_LINE_MEMBER( goupil_g1_state::via_keyb_ca2_r )
214214{
215    return 0;
215   return 0;
216216}
217217
218218READ8_MEMBER( goupil_g1_state::kbd2_r )
219219{
220    char kbdrow[6];
221    UINT8 data = 0xff;
220   char kbdrow[6];
221   UINT8 data = 0xff;
222222
223    kbdrow[0] = 'B';
224    kbdrow[1] = 'X';
225    kbdrow[2] = '0' + ( m_row_kbd2 & 7 ) ;
226    kbdrow[3] = 0;
223   kbdrow[0] = 'B';
224   kbdrow[1] = 'X';
225   kbdrow[2] = '0' + ( m_row_kbd2 & 7 ) ;
226   kbdrow[3] = 0;
227227
228    data = ioport(kbdrow)->read();
228   data = ioport(kbdrow)->read();
229229
230    return data;
230   return data;
231231}
232232
233233/* Input ports */
234234static INPUT_PORTS_START( goupil_g1 )
235    PORT_START("AX0")
236    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
237    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
238    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
239    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
240    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
241    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
242    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
243    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
244    PORT_START("AX1")
245    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
246    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
247    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
248    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
249    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
250    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
251    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
252    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
253    PORT_START("AX2")
254    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
255    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
256    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
257    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
258    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
259    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('?')
260    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
261    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
262    PORT_START("AX3")
263    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
264    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
265    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
266    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
267    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
268    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
269    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2)
270    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3)
271    PORT_START("AX4")
272    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
273    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
274    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
275    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
276    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
277    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP)  PORT_CHAR(':') PORT_CHAR('/')
278    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
279    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('.')
280    PORT_START("AX5")
281    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
282    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
283    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
284    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
285    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BS") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
286    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
287    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
288    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
289    PORT_START("AX6")
290    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
291    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00F9) PORT_CHAR('%')
292    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
293    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
294    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
295    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
296    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
297    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
298    PORT_START("AX7")
299    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
300    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1)
301    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
302    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
303    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
304    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
305    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
306    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
235   PORT_START("AX0")
236   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
237   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
238   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
239   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
240   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
241   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
242   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
243   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
244   PORT_START("AX1")
245   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
246   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
247   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
248   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
249   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
250   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
251   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
252   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
253   PORT_START("AX2")
254   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
255   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
256   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
257   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
258   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
259   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('?')
260   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
261   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
262   PORT_START("AX3")
263   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
264   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
265   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
266   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
267   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
268   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
269   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2)
270   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3)
271   PORT_START("AX4")
272   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
273   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
274   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
275   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
276   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
277   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP)  PORT_CHAR(':') PORT_CHAR('/')
278   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
279   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('.')
280   PORT_START("AX5")
281   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
282   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
283   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
284   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
285   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BS") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
286   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
287   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
288   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
289   PORT_START("AX6")
290   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
291   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00F9) PORT_CHAR('%')
292   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
293   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
294   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
295   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
296   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
297   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
298   PORT_START("AX7")
299   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
300   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1)
301   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
302   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
303   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
304   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
305   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
306   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
307307
308    PORT_START("CTR0")
309    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
310    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
308   PORT_START("CTR0")
309   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
310   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
311311
312    PORT_START("BX0")
313    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
314    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
315    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
316    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
317    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
318    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
319    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
320    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
321    PORT_START("BX1")
322    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
323    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
324    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
325    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
326    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
327    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
328    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
329    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
330    PORT_START("BX2")
331    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
332    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
333    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
334    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
335    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
336    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
337    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
338    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
339    PORT_START("BX3")
340    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
341    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
342    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
343    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
344    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
345    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
346    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
347    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
348    PORT_START("BX4")
349    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
350    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
351    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
352    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
353    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
354    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
355    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
356    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
357    PORT_START("BX5")
358    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
359    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
360    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
361    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
362    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
363    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
364    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
365    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
366    PORT_START("BX6")
367    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
368    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
369    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
370    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
371    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
372    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
373    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
374    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
375    PORT_START("BX7")
376    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
377    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
378    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
379    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
380    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
381    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
382    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
383    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
312   PORT_START("BX0")
313   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
314   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
315   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
316   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
317   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
318   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
319   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
320   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
321   PORT_START("BX1")
322   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
323   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
324   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
325   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
326   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
327   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
328   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
329   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
330   PORT_START("BX2")
331   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
332   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
333   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
334   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
335   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
336   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
337   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
338   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
339   PORT_START("BX3")
340   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
341   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
342   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
343   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
344   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
345   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
346   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
347   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
348   PORT_START("BX4")
349   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
350   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
351   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
352   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
353   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
354   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
355   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
356   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
357   PORT_START("BX5")
358   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
359   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
360   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
361   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
362   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
363   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
364   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
365   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
366   PORT_START("BX6")
367   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
368   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
369   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
370   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
371   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
372   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
373   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
374   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
375   PORT_START("BX7")
376   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
377   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
378   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
379   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
380   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
381   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
382   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
383   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
384384INPUT_PORTS_END
385385
386386static SLOT_INTERFACE_START( goupil_floppies )
387    SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
387   SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
388388SLOT_INTERFACE_END
389389
390390void goupil_g1_state::machine_start()
391391{
392    std::string region_tag;
392   std::string region_tag;
393393
394    m_floppy = NULL;
395    valkeyb = 0xFF;
394   m_floppy = NULL;
395   valkeyb = 0xFF;
396396}
397397
398398void goupil_g1_state::machine_reset()
r253707r253708
401401
402402WRITE8_MEMBER(goupil_g1_state::via_video_pba_w)
403403{
404    #ifdef DBGMODE
405    printf("%s: write via_video_pba_w reg : 0x%X\n",machine().describe_context(),data);
406    #endif
407    m_ef9364->char_latch_w(data);
404   #ifdef DBGMODE
405   printf("%s: write via_video_pba_w reg : 0x%X\n",machine().describe_context(),data);
406   #endif
407   m_ef9364->char_latch_w(data);
408408}
409409
410410WRITE8_MEMBER(goupil_g1_state::via_video_pbb_w)
411411{
412    #ifdef DBGMODE
413    printf("%s: write via_video_pbb_w reg : 0x%X\n",machine().describe_context(),data);
414    #endif
415    via_video_pbb_data = data;
412   #ifdef DBGMODE
413   printf("%s: write via_video_pbb_w reg : 0x%X\n",machine().describe_context(),data);
414   #endif
415   via_video_pbb_data = data;
416416}
417417
418418WRITE_LINE_MEMBER( goupil_g1_state::via_video_ca2_w )
419419{
420    if(old_state_ca2==0 && state==1)
421    {
422        m_ef9364->command_w(via_video_pbb_data&0xF);
423    }
424    old_state_ca2 = state;
420   if(old_state_ca2==0 && state==1)
421   {
422      m_ef9364->command_w(via_video_pbb_data&0xF);
423   }
424   old_state_ca2 = state;
425425}
426426
427427static MACHINE_CONFIG_START( goupil_g1, goupil_g1_state )
428    /* basic machine hardware */
429    MCFG_CPU_ADD("maincpu",M6808, CPU_CLOCK)
430    MCFG_CPU_PROGRAM_MAP(goupil_mem)
431    MCFG_CPU_IO_MAP(goupil_io)
428   /* basic machine hardware */
429   MCFG_CPU_ADD("maincpu",M6808, CPU_CLOCK)
430   MCFG_CPU_PROGRAM_MAP(goupil_mem)
431   MCFG_CPU_IO_MAP(goupil_io)
432432
433    /* sound hardware */
434    // TODO !
433   /* sound hardware */
434   // TODO !
435435
436    MCFG_DEVICE_ADD ("ef6850", ACIA6850, 0)
436   MCFG_DEVICE_ADD ("ef6850", ACIA6850, 0)
437437
438    /* screen */
439    MCFG_SCREEN_ADD("screen", RASTER)
440    MCFG_SCREEN_REFRESH_RATE(50)
441    MCFG_SCREEN_UPDATE_DEVICE("ef9364", ef9364_device, screen_update)
438   /* screen */
439   MCFG_SCREEN_ADD("screen", RASTER)
440   MCFG_SCREEN_REFRESH_RATE(50)
441   MCFG_SCREEN_UPDATE_DEVICE("ef9364", ef9364_device, screen_update)
442442
443    MCFG_SCREEN_SIZE((64*8), (16*(8+4)))
444    MCFG_SCREEN_VISIBLE_AREA(0, (64*8)-1, 0, (16*(8+4))-1)
445    MCFG_PALETTE_ADD("palette", 16)
443   MCFG_SCREEN_SIZE((64*8), (16*(8+4)))
444   MCFG_SCREEN_VISIBLE_AREA(0, (64*8)-1, 0, (16*(8+4))-1)
445   MCFG_PALETTE_ADD("palette", 16)
446446
447    MCFG_DEVICE_ADD("ef9364", EF9364, VIDEO_CLOCK)
448    MCFG_EF9364_PALETTE("palette")
449    MCFG_EF9364_PAGES_CNT(1);
450    MCFG_TIMER_DRIVER_ADD_SCANLINE("goupil_sl", goupil_g1_state, goupil_scanline, "screen", 0, 10)
447   MCFG_DEVICE_ADD("ef9364", EF9364, VIDEO_CLOCK)
448   MCFG_EF9364_PALETTE("palette")
449   MCFG_EF9364_PAGES_CNT(1);
450   MCFG_TIMER_DRIVER_ADD_SCANLINE("goupil_sl", goupil_g1_state, goupil_scanline, "screen", 0, 10)
451451
452    MCFG_DEVICE_ADD("m_via_video", VIA6522, 0)
453    MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(goupil_g1_state, via_video_pba_w))
454    MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(goupil_g1_state, via_video_pbb_w))
455    MCFG_VIA6522_CA2_HANDLER(WRITELINE(goupil_g1_state, via_video_ca2_w))
452   MCFG_DEVICE_ADD("m_via_video", VIA6522, 0)
453   MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(goupil_g1_state, via_video_pba_w))
454   MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(goupil_g1_state, via_video_pbb_w))
455   MCFG_VIA6522_CA2_HANDLER(WRITELINE(goupil_g1_state, via_video_ca2_w))
456456
457    MCFG_DEVICE_ADD("m_via_keyb", VIA6522, 0)
458    MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
457   MCFG_DEVICE_ADD("m_via_keyb", VIA6522, 0)
458   MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
459459
460    MCFG_DEVICE_ADD("m_via_modem", VIA6522, 0)
461    MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
460   MCFG_DEVICE_ADD("m_via_modem", VIA6522, 0)
461   MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
462462
463    /* Floppy */
464    MCFG_FD1791_ADD("fd1791", XTAL_8MHz )
465    MCFG_FLOPPY_DRIVE_ADD("fd1791:0", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
466    MCFG_FLOPPY_DRIVE_ADD("fd1791:1", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
463   /* Floppy */
464   MCFG_FD1791_ADD("fd1791", XTAL_8MHz )
465   MCFG_FLOPPY_DRIVE_ADD("fd1791:0", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
466   MCFG_FLOPPY_DRIVE_ADD("fd1791:1", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
467467
468    MCFG_DEVICE_ADD("i8279_kb1", I8279, CPU_CLOCK)
469    MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd1_w))           // scan SL lines
470    MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd1_r))                         // kbd RL lines
471    MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb1_r))
472    MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb1_r))
473    MCFG_I8279_OUT_IRQ_CB(DEVWRITELINE("m_via_keyb", via6522_device, write_ca1))
468   MCFG_DEVICE_ADD("i8279_kb1", I8279, CPU_CLOCK)
469   MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd1_w))           // scan SL lines
470   MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd1_r))                         // kbd RL lines
471   MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb1_r))
472   MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb1_r))
473   MCFG_I8279_OUT_IRQ_CB(DEVWRITELINE("m_via_keyb", via6522_device, write_ca1))
474474
475    MCFG_DEVICE_ADD("i8279_kb2", I8279, CPU_CLOCK)
476    MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd2_w))           // scan SL lines
477    MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd2_r))                         // kbd RL lines
478    MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb2_r))
479    MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb2_r))
475   MCFG_DEVICE_ADD("i8279_kb2", I8279, CPU_CLOCK)
476   MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd2_w))           // scan SL lines
477   MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd2_r))                         // kbd RL lines
478   MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb2_r))
479   MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb2_r))
480480
481481MACHINE_CONFIG_END
482482
483483/* ROM definition */
484484ROM_START( goupilg1 )
485    ROM_REGION( 0x10000, "maincpu", 0 )
486    ROM_DEFAULT_BIOS("v1_0")
485   ROM_REGION( 0x10000, "maincpu", 0 )
486   ROM_DEFAULT_BIOS("v1_0")
487487
488    ROM_SYSTEM_BIOS(0, "v1_0", "Version 1.0")
489    ROMX_LOAD( "SMT_Goupil_G1_MON_1.bin", 0x0000, 0x0400, CRC(98B7BE69) SHA1(69E83FE78A43FCF2B08FB0BCEFB0D217A57B1ECB), ROM_BIOS(1) )
490    ROM_LOAD ( "SMT_Goupil_G1_MON_2.bin", 0x0400, 0x0400, CRC(19386B81) SHA1(E52F63FD29D374319781E9677DE6D3FD61A3684C) )
488   ROM_SYSTEM_BIOS(0, "v1_0", "Version 1.0")
489   ROMX_LOAD( "SMT_Goupil_G1_MON_1.bin", 0x0000, 0x0400, CRC(98B7BE69) SHA1(69E83FE78A43FCF2B08FB0BCEFB0D217A57B1ECB), ROM_BIOS(1) )
490   ROM_LOAD ( "SMT_Goupil_G1_MON_2.bin", 0x0400, 0x0400, CRC(19386B81) SHA1(E52F63FD29D374319781E9677DE6D3FD61A3684C) )
491491
492    ROM_LOAD( "SMT_Goupil_G1_MOD_3.bin", 0x0800, 0x0400, CRC(E662F152) SHA1(11B91C5737E7572A2C18472B66BBD16B485132D5) )
492   ROM_LOAD( "SMT_Goupil_G1_MOD_3.bin", 0x0800, 0x0400, CRC(E662F152) SHA1(11B91C5737E7572A2C18472B66BBD16B485132D5) )
493493
494    ROMX_LOAD( "SMT_Goupil_G1_Basic_1.bin", 0x1000, 0x0400, CRC(AD105B12) SHA1(631CD4B997F76B57BF2509E4BFF30B1595C8BD13), ROM_BIOS(1) )
495    ROMX_LOAD( "SMT_Goupil_G1_Basic_2.bin", 0x1400, 0x0400, CRC(0C5C309C) SHA1(F1CAB4B0F9191E53113790A95F1AB7108F9406A1), ROM_BIOS(1) )
496    ROMX_LOAD( "SMT_Goupil_G1_Basic_3.bin", 0x1800, 0x0400, CRC(1F1EB127) SHA1(DBBB880C79D515ACBFCB2BE9A4C96962F3E4EDEA), ROM_BIOS(1) )
497    ROMX_LOAD( "SMT_Goupil_G1_Basic_4.bin", 0x1C00, 0x0400, CRC(09BE48E4) SHA1(86CAE0D159583C1D572A5754F3BB6B4A2E479359), ROM_BIOS(1) )
498    ROMX_LOAD( "SMT_Goupil_G1_Basic_5.bin", 0x2000, 0x0400, CRC(BDEB395C) SHA1(32A50468F1CA772EE45A1F5C61C66F3ECC774074), ROM_BIOS(1) )
499    ROMX_LOAD( "SMT_Goupil_G1_Basic_6.bin", 0x2400, 0x0400, CRC(850A4000) SHA1(720F0BB3E45877835219B7E1D943EF4F19B9977D), ROM_BIOS(1) )
500    ROMX_LOAD( "SMT_Goupil_G1_Basic_7.bin", 0x2800, 0x0400, CRC(586C7670) SHA1(13E2E96B9F1A53555CE0D55F657CF3C6B96F10A0), ROM_BIOS(1) )
501    ROMX_LOAD( "SMT_Goupil_G1_Basic_8.bin", 0x2C00, 0x0400, CRC(33281300) SHA1(CE631FA8157A3F8869C5FEFE24B7F40E06696DF9), ROM_BIOS(1) )
502    ROMX_LOAD( "SMT_Goupil_G1_Basic_9.bin", 0x3000, 0x0400, CRC(A3911201) SHA1(8623A0A2D83EB3A27A795030643C5C05A4350A9F), ROM_BIOS(1) )
494   ROMX_LOAD( "SMT_Goupil_G1_Basic_1.bin", 0x1000, 0x0400, CRC(AD105B12) SHA1(631CD4B997F76B57BF2509E4BFF30B1595C8BD13), ROM_BIOS(1) )
495   ROMX_LOAD( "SMT_Goupil_G1_Basic_2.bin", 0x1400, 0x0400, CRC(0C5C309C) SHA1(F1CAB4B0F9191E53113790A95F1AB7108F9406A1), ROM_BIOS(1) )
496   ROMX_LOAD( "SMT_Goupil_G1_Basic_3.bin", 0x1800, 0x0400, CRC(1F1EB127) SHA1(DBBB880C79D515ACBFCB2BE9A4C96962F3E4EDEA), ROM_BIOS(1) )
497   ROMX_LOAD( "SMT_Goupil_G1_Basic_4.bin", 0x1C00, 0x0400, CRC(09BE48E4) SHA1(86CAE0D159583C1D572A5754F3BB6B4A2E479359), ROM_BIOS(1) )
498   ROMX_LOAD( "SMT_Goupil_G1_Basic_5.bin", 0x2000, 0x0400, CRC(BDEB395C) SHA1(32A50468F1CA772EE45A1F5C61C66F3ECC774074), ROM_BIOS(1) )
499   ROMX_LOAD( "SMT_Goupil_G1_Basic_6.bin", 0x2400, 0x0400, CRC(850A4000) SHA1(720F0BB3E45877835219B7E1D943EF4F19B9977D), ROM_BIOS(1) )
500   ROMX_LOAD( "SMT_Goupil_G1_Basic_7.bin", 0x2800, 0x0400, CRC(586C7670) SHA1(13E2E96B9F1A53555CE0D55F657CF3C6B96F10A0), ROM_BIOS(1) )
501   ROMX_LOAD( "SMT_Goupil_G1_Basic_8.bin", 0x2C00, 0x0400, CRC(33281300) SHA1(CE631FA8157A3F8869C5FEFE24B7F40E06696DF9), ROM_BIOS(1) )
502   ROMX_LOAD( "SMT_Goupil_G1_Basic_9.bin", 0x3000, 0x0400, CRC(A3911201) SHA1(8623A0A2D83EB3A27A795030643C5C05A4350A9F), ROM_BIOS(1) )
503503
504    ROM_REGION( 0x400, "ef9364", 0 )
505    ROM_LOAD( "SMT_Goupil_G1_Charset.bin", 0x0000, 0x0400, CRC(8B6DA54B) SHA1(AC2204600F45C6DD0DF1E759B62ED25928F02A12) )
504   ROM_REGION( 0x400, "ef9364", 0 )
505   ROM_LOAD( "SMT_Goupil_G1_Charset.bin", 0x0000, 0x0400, CRC(8B6DA54B) SHA1(AC2204600F45C6DD0DF1E759B62ED25928F02A12) )
506506ROM_END
507507
508508/* Driver */
trunk/src/mame/drivers/hh_tms1k.cpp
r253707r253708
669669  Coleco Zodiac - The Astrology Computer
670670  * TMS1100 MP3435 (no decap)
671671  * 8-digit 7seg display, 12 other LEDs, 1-bit sound
672 
672
673673  As the name suggests, this is an astrologic calculator. Refer to the
674674  (very extensive) manual on how to use it.
675675
r253707r253708
858858   UINT16 seg = m_o;
859859   if (m_r & 0x200)
860860      seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
861   
861
862862   set_display_segmask(0x1ff, 0xff);
863863   display_matrix(11, 9, seg, m_r & 0x1ff);
864864}
r253707r253708
13511351  Conic Electronic Football II
13521352  * TMS1100 MP1181 (no decap)
13531353  * 9-digit LED grid, 1-bit sound
1354 
1354
13551355  This is a clone of Coleco's Quarterback, similar at hardware-level too.
13561356  It was also sold by Tandy under the same title.
13571357
r253707r253708
13781378   UINT16 seg = m_o;
13791379   if (~m_r & 2)
13801380      seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
1381   
1381
13821382   set_display_segmask(0x1ff, 0xff);
13831383   display_matrix(11, 9, seg, m_r >> 1 & 0x1ff);
13841384}
r253707r253708
13901390
13911391   // R8-R10: input mux
13921392   m_inp_mux = data >> 8 & 7;
1393   
1393
13941394   // R1-R10: select digit/segment
13951395   m_r = data;
13961396   prepare_display();
r253707r253708
43974397  Featuring The Electronic Dive-Control Center
43984398  * TMS1100 M34038-NLL (die labeled 1100E, M34038)
43994399  * 11 LEDs, 4-bit sound
4400 
4400
44014401  This is a board game. The electronic accessory is the emulated part here.
44024402
44034403***************************************************************************/
trunk/src/mame/drivers/hp9845.cpp
r253707r253708
7979      m_io_key1(*this , "KEY1"),
8080      m_io_key2(*this , "KEY2"),
8181      m_io_key3(*this , "KEY3"),
82                m_t15(*this , "t15")
82            m_t15(*this , "t15")
8383   { }
8484
8585   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
r253707r253708
101101
102102      DECLARE_WRITE8_MEMBER(pa_w);
103103
104        DECLARE_WRITE_LINE_MEMBER(t15_irq_w);
105        DECLARE_WRITE_LINE_MEMBER(t15_flg_w);
106        DECLARE_WRITE_LINE_MEMBER(t15_sts_w);
104      DECLARE_WRITE_LINE_MEMBER(t15_irq_w);
105      DECLARE_WRITE_LINE_MEMBER(t15_flg_w);
106      DECLARE_WRITE_LINE_MEMBER(t15_sts_w);
107107
108108private:
109109      required_device<hp_5061_3001_cpu_device> m_lpu;
r253707r253708
113113   required_ioport m_io_key1;
114114   required_ioport m_io_key2;
115115   required_ioport m_io_key3;
116        required_device<hp_taco_device> m_t15;
116      required_device<hp_taco_device> m_t15;
117117
118118      void set_video_mar(UINT16 mar);
119119      void video_fill_buff(bool buff_idx);
r253707r253708
150150      UINT8 m_kb_scancode;
151151      UINT16 m_kb_status;
152152
153        // State of PPU I/O
154        UINT8 m_ppu_pa;
153      // State of PPU I/O
154      UINT8 m_ppu_pa;
155155};
156156
157157static INPUT_PORTS_START(hp9845b)
r253707r253708
332332      m_video_frame = 0;
333333
334334      m_irl_pending = 0;
335                m_irh_pending = 0;
335            m_irh_pending = 0;
336336
337337      memset(&m_kb_state[ 0 ] , 0 , sizeof(m_kb_state));
338338      m_kb_scancode = 0x7f;
339339      m_kb_status = 0;
340340
341                m_ppu_pa = 0;
341            m_ppu_pa = 0;
342342}
343343
344344void hp9845b_state::set_video_mar(UINT16 mar)
r253707r253708
593593
594594WRITE8_MEMBER(hp9845b_state::pa_w)
595595{
596        m_ppu_pa = data;
596      m_ppu_pa = data;
597597
598598      // TODO: handle sts & flg
599599      if (data == 15) {
600                        // RHS tape drive (T15)
601                        m_ppu->status_w(m_t15->sts_r());
602                        m_ppu->flag_w(m_t15->flg_r());
600                  // RHS tape drive (T15)
601                  m_ppu->status_w(m_t15->sts_r());
602                  m_ppu->flag_w(m_t15->flg_r());
603603      } else {
604604            m_ppu->status_w(0);
605605            m_ppu->flag_w(0);
r253707r253708
608608
609609WRITE_LINE_MEMBER(hp9845b_state::t15_irq_w)
610610{
611        if (state) {
612                BIT_SET(m_irh_pending , 7);
613        } else {
614                BIT_CLR(m_irh_pending , 7);
615        }
616        update_irq();
611      if (state) {
612            BIT_SET(m_irh_pending , 7);
613      } else {
614            BIT_CLR(m_irh_pending , 7);
615      }
616      update_irq();
617617}
618618
619619WRITE_LINE_MEMBER(hp9845b_state::t15_flg_w)
620620{
621        if (m_ppu_pa == 15) {
622                m_ppu->flag_w(state);
623        }
621      if (m_ppu_pa == 15) {
622            m_ppu->flag_w(state);
623      }
624624}
625625
626626WRITE_LINE_MEMBER(hp9845b_state::t15_sts_w)
627627{
628        if (m_ppu_pa == 15) {
629                m_ppu->status_w(state);
630        }
628      if (m_ppu_pa == 15) {
629            m_ppu->status_w(state);
630      }
631631}
632632
633633static MACHINE_CONFIG_START( hp9845a, hp9845_state )
r253707r253708
678678      // PA = 0, IC = 3
679679      // Keyboard status input & keyboard interrupt clear
680680      AM_RANGE(HP_MAKE_IOADDR(0 , 3) , HP_MAKE_IOADDR(0 , 3)) AM_READWRITE(kb_status_r , kb_irq_clear_w)
681        // PA = 15, IC = 0..3
682        // Right-hand side tape drive (T15)
683        AM_RANGE(HP_MAKE_IOADDR(15 , 0) , HP_MAKE_IOADDR(15 , 3))        AM_DEVREADWRITE("t15" , hp_taco_device , reg_r , reg_w)
681      // PA = 15, IC = 0..3
682      // Right-hand side tape drive (T15)
683      AM_RANGE(HP_MAKE_IOADDR(15 , 0) , HP_MAKE_IOADDR(15 , 3))        AM_DEVREADWRITE("t15" , hp_taco_device , reg_r , reg_w)
684684ADDRESS_MAP_END
685685
686686static MACHINE_CONFIG_START( hp9845b, hp9845b_state )
r253707r253708
706706   // Actual keyboard refresh rate should be KEY_SCAN_OSCILLATOR / 128 (2560 Hz)
707707   MCFG_TIMER_DRIVER_ADD_PERIODIC("kb_timer" , hp9845b_state , kb_scan , attotime::from_hz(100))
708708
709        // Tape controller
710        MCFG_DEVICE_ADD("t15" , HP_TACO , 4000000)
711        MCFG_TACO_IRQ_HANDLER(WRITELINE(hp9845b_state , t15_irq_w))
712        MCFG_TACO_FLG_HANDLER(WRITELINE(hp9845b_state , t15_flg_w))
713        MCFG_TACO_STS_HANDLER(WRITELINE(hp9845b_state , t15_sts_w))
709      // Tape controller
710      MCFG_DEVICE_ADD("t15" , HP_TACO , 4000000)
711      MCFG_TACO_IRQ_HANDLER(WRITELINE(hp9845b_state , t15_irq_w))
712      MCFG_TACO_FLG_HANDLER(WRITELINE(hp9845b_state , t15_flg_w))
713      MCFG_TACO_STS_HANDLER(WRITELINE(hp9845b_state , t15_sts_w))
714714
715715      MCFG_SOFTWARE_LIST_ADD("optrom_list", "hp9845b_rom")
716716MACHINE_CONFIG_END
trunk/src/mame/drivers/jangou.cpp
r253707r253708
100100   UINT32 screen_update_jangou(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
101101   TIMER_CALLBACK_MEMBER(cvsd_bit_timer_callback);
102102   DECLARE_WRITE_LINE_MEMBER(jngolady_vclk_cb);
103   
103
104104   std::unique_ptr<bitmap_ind16> m_tmp_bitmap;
105105};
106106
r253707r253708
846846   MCFG_CPU_IO_MAP(cpu1_io)
847847
848848   MCFG_JANGOU_BLITTER_ADD("blitter", MASTER_CLOCK/4)
849   
849
850850   /* video hardware */
851851   MCFG_SCREEN_ADD("screen", RASTER)
852852   MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4,320,0,256,264,16,240) // assume same as nightgal.cpp
trunk/src/mame/drivers/k28.cpp
r253707r253708
88  * MM5445N VFD driver, 9-digit alphanumeric display same as snmath
99  * 2*TMS6100 (32KB VSM)
1010  * SC-01-A speech chip
11 
11
1212  3 models exist:
1313  - 7-230: darkblue case, toy-ish looks
1414  - 7-231: gray case, hardware is the same
1515  - 7-232: this one is completely different hw --> driver tispeak.cpp
16 
16
1717  TODO:
1818  - external module support (no dumps yet)
1919  - SC-01 frog speech is why this driver is marked NOT_WORKING
r253707r253708
8383   DECLARE_WRITE8_MEMBER(mcu_p2_w);
8484   DECLARE_WRITE8_MEMBER(mcu_prog_w);
8585   DECLARE_READ8_MEMBER(mcu_t1_r);
86   
86
8787   DECLARE_INPUT_CHANGED_MEMBER(power_on);
8888   void power_off();
8989
r253707r253708
140140{
141141   m_power_on = true;
142142   m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
143   
143
144144   // the game relies on reading the on-button as pressed when it's turned on
145145   m_onbutton_timer->adjust(attotime::from_msec(250));
146146}
r253707r253708
274274   // d0-d2: input mux high bits
275275   m_inp_mux = (m_inp_mux & 0xf) | (~data << 4 & 0x70);
276276   m_phoneme = (m_phoneme & 0xf) | (data << 4 & 0x30);
277   
277
278278   // d3: SC-01 strobe, latch phoneme on rising edge
279279   int strobe = data >> 3 & 1;
280280   if (!strobe && m_speech_strobe)
281281      m_speech->write(space, 0, m_phoneme);
282282   m_speech_strobe = strobe;
283   
283
284284   // d5: VFD driver data enable
285285   m_vfd_data_enable = ~data >> 5 & 1;
286286   if (m_vfd_data_enable)
r253707r253708
299299READ8_MEMBER(k28_state::mcu_p1_r)
300300{
301301   UINT8 data = 0;
302   
302
303303   // multiplexed inputs (active low)
304304   for (int i = 0; i < 7; i++)
305305      if (m_inp_mux >> i & 1)
306306      {
307307         data |= m_inp_matrix[i]->read();
308         
308
309309         // force press on-button at boot
310310         if (i == 5 && m_onbutton_timer->enabled())
311311            data |= 1;
312312      }
313   
313
314314   return data ^ 0xff;
315315}
316316
r253707r253708
326326   m_vfd_data_in = data & 1;
327327   if (m_vfd_data_enable)
328328      m_vfd_shiftreg = (m_vfd_shiftreg & U64(~1)) | m_vfd_data_in;
329   
329
330330   // d0-d3: VSM data, input mux and SC-01 phoneme lower nibble
331331   m_tms6100->add_w(space, 0, data);
332332   m_inp_mux = (m_inp_mux & ~0xf) | (~data & 0xf);
r253707r253708
339339   int state = (data) ? 1 : 0;
340340   bool rise = state == 1 && !m_vfd_clock;
341341   m_vfd_clock = state;
342   
342
343343   // on rising edge
344344   if (rise)
345345   {
346346      // leading 1 triggers shift start
347347      if (m_vfd_shiftcount == 0 && ~m_vfd_shiftreg & 1)
348348         return;
349     
349
350350      // output shiftreg on 35th clock
351351      if (m_vfd_shiftcount == 35)
352352      {
353353         m_vfd_shiftcount = 0;
354         
354
355355         // output 0-15: digit segment data
356356         UINT16 seg_data = (UINT16)(m_vfd_shiftreg >> 19);
357357         seg_data = BITSWAP16(seg_data,0,1,13,9,10,12,14,8,3,4,5,2,15,11,6,7);
r253707r253708
360360         UINT16 digit_sel = (UINT16)(m_vfd_shiftreg >> 10) & 0x1ff;
361361         set_display_segmask(0x1ff, 0x3fff);
362362         display_matrix(16, 9, seg_data, digit_sel);
363         
363
364364         // output 25: power-off request on falling edge
365365         if (~m_vfd_shiftreg & m_vfd_shiftreg_out & 0x200)
366366            power_off();
trunk/src/mame/drivers/kurukuru.cpp
r253707r253708
214214  - Bet distribution (1, 2, 3, 4, 5~10)
215215
216216  - Omake (bonus) distribution (games total, win games, loss games)
217 
217
218218  Pressing the Bookkeeping key once more, you exit the mode and go back to the game.
219219
220220
r253707r253708
437437/*
438438
439439 00h  W --> bankswitching reg...
440
440
441441 10h  W --> 00's           \
442442 11h  W --> 02 8f 20 91...  > V9938 OK
443443 13h  W -->                /
r253707r253708
810810
811811/*  Pyon Pyon Jump.
812812    Ver 1.40.
813   199?, Success / Taiyo Jidoki.
813    199?, Success / Taiyo Jidoki.
814814*/
815815ROM_START( ppj )
816816   ROM_REGION( 0x08000, "maincpu", 0 )
trunk/src/mame/drivers/m5.cpp
r253707r253708
22// copyright-holders:Curt Coder, Ales Dlabac
33/***************************************************************************
44
5   Sord m.5
5    Sord m.5
66
7   http://www.retropc.net/mm/m5/
8   http://www.museo8bits.es/wiki/index.php/Sord_M5 not working
9   http://k5.web.klfree.net/content/view/10/11/ not working
10   http://k5.web.klfree.net/images/stories/sord/m5heap.htm  not working
11   http://k5.klfree.net/index.php?option=com_content&task=view&id=5&Itemid=3
12   http://k5.klfree.net/index.php?option=com_content&task=view&id=10&Itemid=11
13   http://k5.klfree.net/index.php?option=com_content&task=view&id=14&Itemid=3
14   http://www.dlabi.cz/?s=sord
15   https://www.facebook.com/groups/59667560188/
16   http://www.oldcomp.cz/viewtopic.php?f=103&t=1164
7    http://www.retropc.net/mm/m5/
8    http://www.museo8bits.es/wiki/index.php/Sord_M5 not working
9    http://k5.web.klfree.net/content/view/10/11/ not working
10    http://k5.web.klfree.net/images/stories/sord/m5heap.htm  not working
11    http://k5.klfree.net/index.php?option=com_content&task=view&id=5&Itemid=3
12    http://k5.klfree.net/index.php?option=com_content&task=view&id=10&Itemid=11
13    http://k5.klfree.net/index.php?option=com_content&task=view&id=14&Itemid=3
14    http://www.dlabi.cz/?s=sord
15    https://www.facebook.com/groups/59667560188/
16    http://www.oldcomp.cz/viewtopic.php?f=103&t=1164
1717
1818****************************************************************************/
1919
r253707r253708
2121
2222TODO:
2323
24   - fd5 floppy
25   - SI-5 serial interface (8251, ROM)
26   - ramdisk for KRX Memory expansion
27   - rewrite fd5 floppy as unpluggable device
28   - move dipswitch declaration to softwarelist file?
29   - 64krx: get windows ROM version with cpm & ramdisk support (Stuchlik S.E.I. version)
24    - fd5 floppy
25    - SI-5 serial interface (8251, ROM)
26    - ramdisk for KRX Memory expansion
27    - rewrite fd5 floppy as unpluggable device
28    - move dipswitch declaration to softwarelist file?
29    - 64krx: get windows ROM version with cpm & ramdisk support (Stuchlik S.E.I. version)
3030
31   - brno mod: make the dsk image writeable
32   - brno mod: in console version lost data on RAMDISK after soft reset
33   - brno mod: add support for lzr floppy disc format
34   - brno mod: include basic-i
31    - brno mod: make the dsk image writeable
32    - brno mod: in console version lost data on RAMDISK after soft reset
33    - brno mod: add support for lzr floppy disc format
34    - brno mod: include basic-i
3535
3636
3737
3838CHANGELOG:
3939
404010.02.2016
41   - fixed bug: crash if rom card was only cart
42   - fixed bug: when em-5 selected monitor rom wasn't paged in
43   - brno mod: spin motor on upon restart
44   - brno mod: windowed boot as default rom
45   - brno mod: fixed bug: tape command in menu now works
41    - fixed bug: crash if rom card was only cart
42    - fixed bug: when em-5 selected monitor rom wasn't paged in
43    - brno mod: spin motor on upon restart
44    - brno mod: windowed boot as default rom
45    - brno mod: fixed bug: tape command in menu now works
4646
474705.02.2016
48   - added BRNO modification - 1024kB Ramdisk + CP/M support
49   - 32/64KB RAM expansions EM-5, 64KBI, 64KBF, 64KRX
50   - since now own version of rom and slot handlers
51   - 2 slots for carts
48    - added BRNO modification - 1024kB Ramdisk + CP/M support
49    - 32/64KB RAM expansions EM-5, 64KBI, 64KBF, 64KRX
50    - since now own version of rom and slot handlers
51    - 2 slots for carts
5252
5353
5454******************************************************************************
r253707r253708
5858================================================
5959
6060Used ports:
61EM-64, 64KBI:   OUT 6CH,00H   - enables ROM
62            OUT 6CH,01H   - enables RAM
6364KBF:         OUT 30H,00000xxxB   - enables RAM or ROM, see bellow
6464KRD, 64KRX:   OUT 7FH,00000000B   - enables RAM
65            OUT 7FH,11111111B   - enables ROM
66            OUT 7FH,xxxxxxxxB   - enables RAM and ROM, see bellow
61EM-64, 64KBI:   OUT 6CH,00H - enables ROM
62                OUT 6CH,01H - enables RAM
6364KBF:          OUT 30H,00000xxxB   - enables RAM or ROM, see bellow
6464KRD, 64KRX:   OUT 7FH,00000000B   - enables RAM
65                OUT 7FH,11111111B   - enables ROM
66                OUT 7FH,xxxxxxxxB   - enables RAM and ROM, see bellow
6767
6868===========================================================================================================================
6969
r253707r253708
7878------------------------------------------
7979Memory paging is done by using "OUT &30,mod".
8080
81MODE   READ                     WRITE
81MODE    READ                            WRITE
8282----------------------------------------------------------------------
83 00   8 KB MON + 20 KB BF + 36 KB RAM      28 KB DIS + 36 KB RAM
84 01   64 KB RAM                     64 KB RAM
85 02   8 KB MON + 56 KB RAM            64 KB RAM
86 03   64 KB RAM                     28 KB DIS + 36 KB RAM
87 04   64 KB RAM                     16 KB DIS + 48 KB RAM
88 05   8 KB MON + 20 KB BF + 36 KB RAM      64 KB RAM
89 06   8 KB MON + 20 KB DIS + 36 KB RAM   64 KB RAM
90 07   64 KB DIS                     64 KB DIS
91           
83 00 8 KB MON + 20 KB BF + 36 KB RAM     28 KB DIS + 36 KB RAM
84 01 64 KB RAM                           64 KB RAM
85 02 8 KB MON + 56 KB RAM                64 KB RAM
86 03 64 KB RAM                           28 KB DIS + 36 KB RAM
87 04 64 KB RAM                           16 KB DIS + 48 KB RAM
88 05 8 KB MON + 20 KB BF + 36 KB RAM     64 KB RAM
89 06 8 KB MON + 20 KB DIS + 36 KB RAM    64 KB RAM
90 07 64 KB DIS                           64 KB DIS
91
9292Version LZR ( 2C )
9393================
9494
9595+------------+
96|////////////|   READ ONLY AREA
96|////////////|  READ ONLY AREA
9797+------------+
98|\\\\\\\\\\\\|   WRITE ONLY AREA
98|\\\\\\\\\\\\|  WRITE ONLY AREA
9999+------------+
100|XXXXXXXXXXXX|   R&W AREA
100|XXXXXXXXXXXX|  R&W AREA
101101+------------+
102|            |   DISABLED R&W
102|            |  DISABLED R&W
103103+------------+
104104
105     0   0   0   1   1   2   2   2   3   3   4   4   4   5   5   6   6
106kB     0   4   8   2   6   0   4   8   2   6   0   4   8   2   6   0   4
107     +-------+-------------------+
108ROM     |MONITOR|      BASIC-F      |
109     +-------+-------+-------+---+---+-------+-------+-------+-------+
110RAM     |       |       |       |       |       |       |       |       |
111     +-------+-------+-------+-------+-------+-------+-------+-------+
105      0   0   0   1   1   2   2   2   3   3   4   4   4   5   5   6   6
106kB    0   4   8   2   6   0   4   8   2   6   0   4   8   2   6   0   4
107      +-------+-------------------+
108ROM   |MONITOR|      BASIC-F      |
109      +-------+-------+-------+---+---+-------+-------+-------+-------+
110RAM   |       |       |       |       |       |       |       |       |
111      +-------+-------+-------+-------+-------+-------+-------+-------+
112112CART  |       |       |       |       |       |       |       |       |
113     +-------+-------+-------+-------+-------+-------+-------+-------+
113      +-------+-------+-------+-------+-------+-------+-------+-------+
114114
115115
116116Mode
117   +-------+-------------------+
118   |///////|///////////////////|
119   +-------+-------+-------+---+---+-------+-------+-------+-------+
120M0   |       |       |       |   |XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
121   +-------+-------+-------+-------+-------+-------+-------+-------+
117    +-------+-------------------+
118    |///////|///////////////////|
119    +-------+-------+-------+---+---+-------+-------+-------+-------+
120M0  |       |       |       |   |XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
121    +-------+-------+-------+-------+-------+-------+-------+-------+
122122
123   +-------+-------------------+
124   |       |                   |
125   +-------+-------+-------+---+---+-------+-------+-------+-------+
126M1   |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
127   +-------+-------+-------+-------+-------+-------+-------+-------+
123    +-------+-------------------+
124    |       |                   |
125    +-------+-------+-------+---+---+-------+-------+-------+-------+
126M1  |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
127    +-------+-------+-------+-------+-------+-------+-------+-------+
128128
129   +-------+-------------------+
130   |///////|                   |
131   +-------+-------+-------+---+---+-------+-------+-------+-------+
132M2   |\\\\\\\|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
133   +-------+-------+-------+-------+-------+-------+-------+-------+
129    +-------+-------------------+
130    |///////|                   |
131    +-------+-------+-------+---+---+-------+-------+-------+-------+
132M2  |\\\\\\\|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
133    +-------+-------+-------+-------+-------+-------+-------+-------+
134134
135   +-------+-------------------+
136   |       |                   |
137   +-------+-------+-------+---+---+-------+-------+-------+-------+
138M3   |///////|///////|///////|///|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
139   +-------+-------+-------+-------+-------+-------+-------+-------+
135    +-------+-------------------+
136    |       |                   |
137    +-------+-------+-------+---+---+-------+-------+-------+-------+
138M3  |///////|///////|///////|///|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
139    +-------+-------+-------+-------+-------+-------+-------+-------+
140140
141   +-------+-------------------+
142   |       |                   |
143   +-------+-------+-------+---+---+-------+-------+-------+-------+
144M4   |///////|///////|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
145   +-------+-------+-------+-------+-------+-------+-------+-------+
141    +-------+-------------------+
142    |       |                   |
143    +-------+-------+-------+---+---+-------+-------+-------+-------+
144M4  |///////|///////|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
145    +-------+-------+-------+-------+-------+-------+-------+-------+
146146
147   +-------+-------------------+
148   |///////|///////////////////|
149   +-------+-------+-------+---+---+-------+-------+-------+-------+
150M5   |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
151   +-------+-------+-------+-------+-------+-------+-------+-------+
147    +-------+-------------------+
148    |///////|///////////////////|
149    +-------+-------+-------+---+---+-------+-------+-------+-------+
150M5  |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
151    +-------+-------+-------+-------+-------+-------+-------+-------+
152152
153   +-------+-------------------+
154   |///////|                   |
155   +-------+-------+-------+---+---+-------+-------+-------+-------+
156M6   |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
157   +-------+-------+-------+---+---+-------+-------+-------+-------+
158         |///////|///////|///|
159          +-------+-------+---+
153    +-------+-------------------+
154    |///////|                   |
155    +-------+-------+-------+---+---+-------+-------+-------+-------+
156M6  |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
157    +-------+-------+-------+---+---+-------+-------+-------+-------+
158            |///////|///////|///|
159            +-------+-------+---+
160160
161   +-------+-------------------+
162   |       |                   |
163   +-------+-------+-------+---+---+-------+-------+-------+-------+
164M7   |       |       |       |       |       |       |       |       |
165   +-------+-------+-------+-------+-------+-------+-------+-------+
166   |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
167   +---------------------------------------------------------------+
161    +-------+-------------------+
162    |       |                   |
163    +-------+-------+-------+---+---+-------+-------+-------+-------+
164M7  |       |       |       |       |       |       |       |       |
165    +-------+-------+-------+-------+-------+-------+-------+-------+
166    |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
167    +---------------------------------------------------------------+
168168
169169===========================================================================================================
170170
r253707r253708
181181     |          |                           | EPROM 16K| | EPROM 16K|
182182     |          |                           |        4 | |        6 |
1831837FFF +----------+ +----------+              +----------+ +----------+
184                  |   SRAM   |             
1857000 +----------+ +----------+             
186     |          |             
184                  |   SRAM   |
1857000 +----------+ +----------+
186     |          |
1871876000 |          |                           +----------+
188188     |          |                           |          |
1891895000 |          |                           | EPROM 8K |
r253707r253708
213213using OUT (7FH),A, where each bit of A means 8KB memory chunk ( state: 0=RAM,
2142141=ROM, bit: 0=1, 1=2, 2=3, 3=always SRAM, 4=4, 5=5, 6=6, 7=7 ).
215215
216           
216
217217*/
218218
219219/*
220220*************************************************************
221*                  BRNO MOD                     *
221*                       BRNO MOD                            *
222222*************************************************************
223223HW and SW was originally created by Pavel Brychta with help of Jiri Kubin and L. Novak
224224This driver mod was implemented by Ales Dlabac with great help of Pavel Brychta. Without him this would never happen
r253707r253708
230230you can map any of possible 256 ramdisc blocks what allows user to have 1024kB large ramdisc.
231231Of course to be able to realise this is necessary page out all roms
232232
233As pagination port MMU(page select) is used.
233As pagination port MMU(page select) is used.
234234For RAM write protection port CASEN is used. 0=access to ramdisk enabled, 0xff=ramdisk access disabled(data protection), &80=ROM2+48k RAM, &81=ROM2+4k RAM(this is not implemented)
235235For ROM page out port RAMEN is used. 0=rom enable; 0xff=rom+sord ram disabled (ramdisk visible)
236236
r253707r253708
243243c. Area where the first sector of 1st track is loaded, simultaneously is reserved for Hook program
244244d. Reserved for memory tests and ramdisk mapping(pagination). After boot is used as buffer for cursor position,
245245   type of floppy and so on. Area consists of:
246   
246
2472477FFFH .... bootloader version
2482487FFEH .... identification byte of floppy - is transferred from EPROM, it might be changed by SETUP
2492497FFDH .... number of last Ramdisk segment of RAM
2507FFBH .... address of cursor in VRAM in 40 columns CRT. For 80 columns CRT both bytes are zero 
2507FFBH .... address of cursor in VRAM in 40 columns CRT. For 80 columns CRT both bytes are zero
2512517FF9H .... X,Y cursor actual position for 40 columns CRTs. In case of 80 columns CRT both bytes are zero
2522527203H .... Actual memory bank buffer
253           
253
254254System floppy disk header on track 00 of 1st sector
255       byte 0-1  ... system disk identification SY
256        byte 2    ... # of physical sectors for BIOS or DOS plus # of segments for DIR
257        byte 3-4  ... Start address for loading of BIOS or DOS
258        byte 5    ... # of bytes for possible HOOK program
259        byte 6-   ... HOOK   program, or either BIOS or DOS
255         byte 0-1  ... system disk identification SY
256         byte 2    ... # of physical sectors for BIOS or DOS plus # of segments for DIR
257         byte 3-4  ... Start address for loading of BIOS or DOS
258         byte 5    ... # of bytes for possible HOOK program
259         byte 6-   ... HOOK program, or either BIOS or DOS
260260
261261In case of HOOK, bytes 8 and 9 contains characters 'H' and 'O' for HOOK testing
262262
r253707r253708
266266
267267 Floppy formats as follows:
268268
269 A: Ramdisk 1024kB, 8 sectors,
270 B: Floppy format "Heat Magnolia" SingleSide SingleDensity , 40 tracks, 9 sectors, 512  sec. length, 128 dirs, offset 3, 166kB
271 C: Floppy format "Robotron aka PC1715", DS DD,             80 tracks, 5 sectors, 1024 sec. length, 128 dirs, offset 2, 780kB
269 A: Ramdisk 1024kB, 8 sectors,
270 B: Floppy format "Heat Magnolia" SingleSide SingleDensity , 40 tracks, 9 sectors, 512  sec. length, 128 dirs, offset 3, 166kB
271 C: Floppy format "Robotron aka PC1715", DS DD,              80 tracks, 5 sectors, 1024 sec. length, 128 dirs, offset 2, 780kB
272272
273273**********************************************************************************************************************************/
274274
r253707r253708
498498
499499WRITE8_MEMBER( m5_state::mem64KBI_w ) //out 0x6c
500500{
501
502501   if (m_ram_type != MEM64KBI) return;
503502
504503   address_space &program = m_maincpu->space(AS_PROGRAM);
505504   std::string region_tag;
506505   m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str());
507506   memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());
508   
507
509508   if (m_ram_mode == BIT(data, 0))
510509      return;
511   
510
512511   m_ram_mode = BIT(data, 0);
513   
512
514513   //if 32kb only mode don't map top ram
515514   if (m_ram_mode && (m_DIPS->read() & 4) != 4)
516515   {
r253707r253708
520519   {
521520      program.install_rom(0x0000, 0x1fff, memregion(Z80_TAG)->base());
522521      program.unmap_write(0x0000, 0x1fff);
523     
522
524523      //if AUTOSTART is on don't load any ROM cart
525524      if (m_cart && (m_DIPS->read() & 2) != 2)
526525      {
r253707r253708
530529      else
531530         program.unmap_readwrite(0x2000, 0x3fff);
532531   }
533   
532
534533   logerror("64KBI: ROM %s", m_ram_mode == 0 ? "enabled\n" : "disabled\n");
535534}
536535
r253707r253708
544543
545544   address_space &program = m_maincpu->space(AS_PROGRAM);
546545   std::string region_tag;
547   m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str());   //ROM region of the cart
548   memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());   //RAM region of the cart
546   m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); //ROM region of the cart
547   memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());   //RAM region of the cart
549548   memory_region *rom_region=memregion(region_tag.assign(m_cart->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); //region where clasic ROM cartridge resides
550   
549
551550   if (m_ram_mode == data)
552551      return;
553552
554553   m_ram_mode = data;
555   
554
556555   switch(m_ram_mode)
557556   {
558      case 0:   
557      case 0:
559558         program.unmap_write(0x0000, 0x6fff);
560559         membank("bank1r")->set_base(memregion(Z80_TAG)->base());
561560         membank("bank2r")->set_base(m_cart_rom->base());
562561         membank("bank3r")->set_base(m_cart_rom->base()+0x2000);
563562         membank("bank4r")->set_base(m_cart_rom->base()+0x4000);
564         membank("bank5r")->set_base(ram_region->base()+0x8000);      membank("bank5w")->set_base(ram_region->base()+0x8000);
565         membank("bank6r")->set_base(ram_region->base()+0xc000);      membank("bank6w")->set_base(ram_region->base()+0xc000);
563         membank("bank5r")->set_base(ram_region->base()+0x8000);     membank("bank5w")->set_base(ram_region->base()+0x8000);
564         membank("bank6r")->set_base(ram_region->base()+0xc000);     membank("bank6w")->set_base(ram_region->base()+0xc000);
566565         break;
567566      case 1:
568567         program.install_write_bank(0x0000,0x1fff,"bank1w");
569568         program.install_write_bank(0x2000,0x3fff,"bank2w");
570569         program.install_write_bank(0x4000,0x5fff,"bank3w");
571570         program.install_write_bank(0x6000,0x6fff,"bank4w");
572         membank("bank1r")->set_base(ram_region->base()+0x0000);      membank("bank1w")->set_base(ram_region->base()+0x0000);
573         membank("bank2r")->set_base(ram_region->base()+0x2000);      membank("bank2w")->set_base(ram_region->base()+0x2000);
574         membank("bank3r")->set_base(ram_region->base()+0x4000);      membank("bank3w")->set_base(ram_region->base()+0x4000);
575         membank("bank4r")->set_base(ram_region->base()+0x6000);      membank("bank4w")->set_base(ram_region->base()+0x6000);
576         membank("bank5r")->set_base(ram_region->base()+0x8000);      membank("bank5w")->set_base(ram_region->base()+0x8000);
577         membank("bank6r")->set_base(ram_region->base()+0xc000);      membank("bank6w")->set_base(ram_region->base()+0xc000);
571         membank("bank1r")->set_base(ram_region->base()+0x0000);     membank("bank1w")->set_base(ram_region->base()+0x0000);
572         membank("bank2r")->set_base(ram_region->base()+0x2000);     membank("bank2w")->set_base(ram_region->base()+0x2000);
573         membank("bank3r")->set_base(ram_region->base()+0x4000);     membank("bank3w")->set_base(ram_region->base()+0x4000);
574         membank("bank4r")->set_base(ram_region->base()+0x6000);     membank("bank4w")->set_base(ram_region->base()+0x6000);
575         membank("bank5r")->set_base(ram_region->base()+0x8000);     membank("bank5w")->set_base(ram_region->base()+0x8000);
576         membank("bank6r")->set_base(ram_region->base()+0xc000);     membank("bank6w")->set_base(ram_region->base()+0xc000);
578577         break;
579578      case 2:
580579         program.install_write_bank(0x0000,0x1fff,"bank1w");
581580         program.install_write_bank(0x2000,0x3fff,"bank2w");
582581         program.install_write_bank(0x4000,0x5fff,"bank3w");
583582         program.install_write_bank(0x6000,0x6fff,"bank4w");
584         membank("bank1r")->set_base(memregion(Z80_TAG)->base());   membank("bank1w")->set_base(ram_region->base()+0x0000);
585         membank("bank2r")->set_base(ram_region->base()+0x2000);      membank("bank2w")->set_base(ram_region->base()+0x2000);
586         membank("bank3r")->set_base(ram_region->base()+0x4000);      membank("bank3w")->set_base(ram_region->base()+0x4000);
587         membank("bank4r")->set_base(ram_region->base()+0x6000);      membank("bank4w")->set_base(ram_region->base()+0x6000);
588         membank("bank5r")->set_base(ram_region->base()+0x8000);      membank("bank5w")->set_base(ram_region->base()+0x8000);
589         membank("bank6r")->set_base(ram_region->base()+0xc000);      membank("bank6w")->set_base(ram_region->base()+0xc000);
583         membank("bank1r")->set_base(memregion(Z80_TAG)->base());    membank("bank1w")->set_base(ram_region->base()+0x0000);
584         membank("bank2r")->set_base(ram_region->base()+0x2000);     membank("bank2w")->set_base(ram_region->base()+0x2000);
585         membank("bank3r")->set_base(ram_region->base()+0x4000);     membank("bank3w")->set_base(ram_region->base()+0x4000);
586         membank("bank4r")->set_base(ram_region->base()+0x6000);     membank("bank4w")->set_base(ram_region->base()+0x6000);
587         membank("bank5r")->set_base(ram_region->base()+0x8000);     membank("bank5w")->set_base(ram_region->base()+0x8000);
588         membank("bank6r")->set_base(ram_region->base()+0xc000);     membank("bank6w")->set_base(ram_region->base()+0xc000);
590589         break;
591590      case 3:
592591         program.unmap_write(0x0000, 0x6fff);
r253707r253708
594593         membank("bank2r")->set_base(ram_region->base()+0x2000);
595594         membank("bank3r")->set_base(ram_region->base()+0x4000);
596595         membank("bank4r")->set_base(ram_region->base()+0x6000);
597         membank("bank5r")->set_base(ram_region->base()+0x8000);      membank("bank5w")->set_base(ram_region->base()+0x8000);
598         membank("bank6r")->set_base(ram_region->base()+0xc000);      membank("bank6w")->set_base(ram_region->base()+0xc000);
596         membank("bank5r")->set_base(ram_region->base()+0x8000);     membank("bank5w")->set_base(ram_region->base()+0x8000);
597         membank("bank6r")->set_base(ram_region->base()+0xc000);     membank("bank6w")->set_base(ram_region->base()+0xc000);
599598         break;
600599      case 4:
601600         program.unmap_write(0x0000, 0x3fff);
r253707r253708
603602         program.install_write_bank(0x6000,0x6fff,"bank4w");
604603         membank("bank1r")->set_base(ram_region->base()+0x0000);
605604         membank("bank2r")->set_base(ram_region->base()+0x2000);
606         membank("bank3r")->set_base(ram_region->base()+0x4000);      membank("bank3w")->set_base(ram_region->base()+0x4000);
607         membank("bank4r")->set_base(ram_region->base()+0x6000);      membank("bank4w")->set_base(ram_region->base()+0x6000);
608         membank("bank5r")->set_base(ram_region->base()+0x8000);      membank("bank5w")->set_base(ram_region->base()+0x8000);
609         membank("bank6r")->set_base(ram_region->base()+0xc000);      membank("bank6w")->set_base(ram_region->base()+0xc000);
605         membank("bank3r")->set_base(ram_region->base()+0x4000);     membank("bank3w")->set_base(ram_region->base()+0x4000);
606         membank("bank4r")->set_base(ram_region->base()+0x6000);     membank("bank4w")->set_base(ram_region->base()+0x6000);
607         membank("bank5r")->set_base(ram_region->base()+0x8000);     membank("bank5w")->set_base(ram_region->base()+0x8000);
608         membank("bank6r")->set_base(ram_region->base()+0xc000);     membank("bank6w")->set_base(ram_region->base()+0xc000);
610609         break;
611610      case 5:
612611         program.install_write_bank(0x0000,0x1fff,"bank1w");
613612         program.install_write_bank(0x2000,0x3fff,"bank2w");
614613         program.install_write_bank(0x4000,0x5fff,"bank3w");
615614         program.install_write_bank(0x6000,0x6fff,"bank4w");
616         membank("bank1r")->set_base(memregion(Z80_TAG)->base());   membank("bank1w")->set_base(ram_region->base()+0x0000);
617         membank("bank2r")->set_base(m_cart_rom->base());         membank("bank2w")->set_base(ram_region->base()+0x2000);
618         membank("bank3r")->set_base(m_cart_rom->base()+0x2000);      membank("bank3w")->set_base(ram_region->base()+0x4000);
619         membank("bank4r")->set_base(m_cart_rom->base()+0x4000);      membank("bank4w")->set_base(ram_region->base()+0x6000);
620         membank("bank5r")->set_base(ram_region->base()+0x8000);      membank("bank5w")->set_base(ram_region->base()+0x8000);
621         membank("bank6r")->set_base(ram_region->base()+0xc000);      membank("bank6w")->set_base(ram_region->base()+0xc000);
615         membank("bank1r")->set_base(memregion(Z80_TAG)->base());    membank("bank1w")->set_base(ram_region->base()+0x0000);
616         membank("bank2r")->set_base(m_cart_rom->base());            membank("bank2w")->set_base(ram_region->base()+0x2000);
617         membank("bank3r")->set_base(m_cart_rom->base()+0x2000);     membank("bank3w")->set_base(ram_region->base()+0x4000);
618         membank("bank4r")->set_base(m_cart_rom->base()+0x4000);     membank("bank4w")->set_base(ram_region->base()+0x6000);
619         membank("bank5r")->set_base(ram_region->base()+0x8000);     membank("bank5w")->set_base(ram_region->base()+0x8000);
620         membank("bank6r")->set_base(ram_region->base()+0xc000);     membank("bank6w")->set_base(ram_region->base()+0xc000);
622621         break;
623622      case 6:
624623         program.install_write_bank(0x0000,0x1fff,"bank1w");
625624         program.install_write_bank(0x2000,0x3fff,"bank2w");
626625         program.install_write_bank(0x4000,0x5fff,"bank3w");
627626         program.install_write_bank(0x6000,0x6fff,"bank4w");
628         membank("bank1r")->set_base(memregion(Z80_TAG)->base());   membank("bank1w")->set_base(ram_region->base()+0x0000);
629         membank("bank2r")->set_base(rom_region->base()+0x0000);      membank("bank2w")->set_base(ram_region->base()+0x2000);
630         membank("bank3r")->set_base(rom_region->base()+0x2000);      membank("bank3w")->set_base(ram_region->base()+0x4000);
631         membank("bank4r")->set_base(rom_region->base()+0x4000);      membank("bank4w")->set_base(ram_region->base()+0x6000);
632         membank("bank5r")->set_base(ram_region->base()+0x8000);      membank("bank5w")->set_base(ram_region->base()+0x8000);
633         membank("bank6r")->set_base(ram_region->base()+0xc000);      membank("bank6w")->set_base(ram_region->base()+0xc000);
627         membank("bank1r")->set_base(memregion(Z80_TAG)->base());    membank("bank1w")->set_base(ram_region->base()+0x0000);
628         membank("bank2r")->set_base(rom_region->base()+0x0000);     membank("bank2w")->set_base(ram_region->base()+0x2000);
629         membank("bank3r")->set_base(rom_region->base()+0x2000);     membank("bank3w")->set_base(ram_region->base()+0x4000);
630         membank("bank4r")->set_base(rom_region->base()+0x4000);     membank("bank4w")->set_base(ram_region->base()+0x6000);
631         membank("bank5r")->set_base(ram_region->base()+0x8000);     membank("bank5w")->set_base(ram_region->base()+0x8000);
632         membank("bank6r")->set_base(ram_region->base()+0xc000);     membank("bank6w")->set_base(ram_region->base()+0xc000);
634633         break;
635634      case 7: //probably this won't work - it should redirect rw to another ram module
636635         program.install_write_bank(0x0000,0x1fff,"bank1w");
r253707r253708
638637         program.install_write_bank(0x4000,0x5fff,"bank3w");
639638         program.install_write_bank(0x6000,0x6fff,"bank4w");
640639         program.install_readwrite_bank(0x7000,0x7fff,"sram");
641         membank("bank1r")->set_base(rom_region->base()+0x0000);      membank("bank1w")->set_base(rom_region->base()+0x0000);
642         membank("bank2r")->set_base(rom_region->base()+0x2000);      membank("bank2w")->set_base(rom_region->base()+0x2000);
643         membank("bank3r")->set_base(rom_region->base()+0x4000);      membank("bank3w")->set_base(rom_region->base()+0x4000);
644         membank("bank4r")->set_base(rom_region->base()+0x6000);      membank("bank4w")->set_base(rom_region->base()+0x6000);
640         membank("bank1r")->set_base(rom_region->base()+0x0000);     membank("bank1w")->set_base(rom_region->base()+0x0000);
641         membank("bank2r")->set_base(rom_region->base()+0x2000);     membank("bank2w")->set_base(rom_region->base()+0x2000);
642         membank("bank3r")->set_base(rom_region->base()+0x4000);     membank("bank3w")->set_base(rom_region->base()+0x4000);
643         membank("bank4r")->set_base(rom_region->base()+0x6000);     membank("bank4w")->set_base(rom_region->base()+0x6000);
645644         membank("sram")->set_base(rom_region->base()+0x7000);
646         membank("bank5r")->set_base(rom_region->base()+0x8000);      membank("bank5w")->set_base(rom_region->base()+0x8000);
647         membank("bank6r")->set_base(rom_region->base()+0xc000);      membank("bank6w")->set_base(rom_region->base()+0xc000);
645         membank("bank5r")->set_base(rom_region->base()+0x8000);     membank("bank5w")->set_base(rom_region->base()+0x8000);
646         membank("bank6r")->set_base(rom_region->base()+0xc000);     membank("bank6w")->set_base(rom_region->base()+0xc000);
648647         break;
649648   }
650   
649
651650   logerror("64KBF RAM mode set to %d\n", m_ram_mode);
652651}
653652
r253707r253708
657656
658657WRITE8_MEMBER( m5_state::mem64KRX_w ) //out 0x7f
659658{
660     
661659   if (m_ram_type != MEM64KRX) return;
662660   if (m_ram_mode == data) return;
663661
r253707r253708
665663   std::string region_tag;
666664   m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str());
667665   memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());
668   
666
669667   m_ram_mode = data;
670668
671   BIT(m_ram_mode, 0) ? membank("bank1r")->set_base(memregion(Z80_TAG)->base())   :   membank("bank1r")->set_base(ram_region->base());
672   BIT(m_ram_mode, 1) ? membank("bank2r")->set_base(m_cart_rom->base())         :   membank("bank2r")->set_base(ram_region->base()+0x2000);
673   BIT(m_ram_mode, 2) ? membank("bank3r")->set_base(m_cart_rom->base()+0x2000)      :   membank("bank3r")->set_base(ram_region->base()+0x4000);
669   BIT(m_ram_mode, 0) ? membank("bank1r")->set_base(memregion(Z80_TAG)->base())    :   membank("bank1r")->set_base(ram_region->base());
670   BIT(m_ram_mode, 1) ? membank("bank2r")->set_base(m_cart_rom->base())            :   membank("bank2r")->set_base(ram_region->base()+0x2000);
671   BIT(m_ram_mode, 2) ? membank("bank3r")->set_base(m_cart_rom->base()+0x2000)     :   membank("bank3r")->set_base(ram_region->base()+0x4000);
674672
675673   if ((m_DIPS->read() & 0x01))
676674   {
677      BIT(m_ram_mode, 4) ? membank("bank5r")->set_base(m_cart_rom->base()+0x6000)   :   membank("bank5r")->set_base(ram_region->base()+0x8000);
678      BIT(m_ram_mode, 5) ? membank("bank6r")->set_base(m_cart_rom->base()+0xa000)   :   membank("bank6r")->set_base(ram_region->base()+0xc000);
675      BIT(m_ram_mode, 4) ? membank("bank5r")->set_base(m_cart_rom->base()+0x6000) :   membank("bank5r")->set_base(ram_region->base()+0x8000);
676      BIT(m_ram_mode, 5) ? membank("bank6r")->set_base(m_cart_rom->base()+0xa000) :   membank("bank6r")->set_base(ram_region->base()+0xc000);
679677   }
680678   else
681679   {
682      BIT(m_ram_mode, 6) ? membank("bank5r")->set_base(m_cart_rom->base()+0xe000)   :   membank("bank5r")->set_base(ram_region->base()+0x8000);
683      BIT(m_ram_mode, 7) ? membank("bank6r")->set_base(m_cart_rom->base()+0x12000):   membank("bank6r")->set_base(ram_region->base()+0xc000);
680      BIT(m_ram_mode, 6) ? membank("bank5r")->set_base(m_cart_rom->base()+0xe000) :   membank("bank5r")->set_base(ram_region->base()+0x8000);
681      BIT(m_ram_mode, 7) ? membank("bank6r")->set_base(m_cart_rom->base()+0x12000):   membank("bank6r")->set_base(ram_region->base()+0xc000);
684682   }
685683
686684   //if KRX ROM is paged out page in cart ROM if any
r253707r253708
705703static ADDRESS_MAP_START( m5_mem, AS_PROGRAM, 8, m5_state )
706704   ADDRESS_MAP_UNMAP_HIGH
707705   AM_RANGE(0x0000, 0x1fff) AM_READ_BANK("bank1r") AM_WRITE_BANK("bank1w") //monitor rom(bios)
708   AM_RANGE(0x2000, 0x3fff) AM_READ_BANK("bank2r") AM_WRITE_BANK("bank2w")
709   AM_RANGE(0x4000, 0x5fff) AM_READ_BANK("bank3r") AM_WRITE_BANK("bank3w")   
710   AM_RANGE(0x6000, 0x6fff) AM_READ_BANK("bank4r") AM_WRITE_BANK("bank4w")
711   AM_RANGE(0x7000, 0x7fff) AM_RAM                                 //4kb internal RAM
706   AM_RANGE(0x2000, 0x3fff) AM_READ_BANK("bank2r") AM_WRITE_BANK("bank2w")
707   AM_RANGE(0x4000, 0x5fff) AM_READ_BANK("bank3r") AM_WRITE_BANK("bank3w")
708   AM_RANGE(0x6000, 0x6fff) AM_READ_BANK("bank4r") AM_WRITE_BANK("bank4w")
709   AM_RANGE(0x7000, 0x7fff) AM_RAM                                         //4kb internal RAM
712710   AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank5r") AM_WRITE_BANK("bank5w")
713711   AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank6r") AM_WRITE_BANK("bank6w")
714712ADDRESS_MAP_END
r253707r253708
864862   PORT_DIPNAME(0x01, 0x01, "KRX: BASIC[on]/MSX[off]") //switching between BASIC and MSX ROMs which share same address area
865863   PORT_DIPSETTING(   0x00, DEF_STR( Off ))
866864   PORT_DIPSETTING(   0x01, DEF_STR( On ))
867   PORT_DIPNAME(0x02, 0x00, "KBI: AUTOSTART")   //pages out cart and starts loading from tape
865   PORT_DIPNAME(0x02, 0x00, "KBI: AUTOSTART")  //pages out cart and starts loading from tape
868866   PORT_DIPSETTING(   0x00, DEF_STR( Off ))
869867   PORT_DIPSETTING(   0x02, DEF_STR( On ))
870868   PORT_DIPNAME(0x04, 0x00, "KBI: 32kb only") //compatible with em-5
r253707r253708
10511049   AM_RANGE(0x37, 0x37) AM_READ_PORT("JOY")
10521050   AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_DEVWRITE("cent_data_out", output_latch_device, write)
10531051   AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_READWRITE(sts_r, com_w)
1054//  AM_RANGE(0x60, 0x63)                                                         //   SIO
1055   AM_RANGE(0x64, 0x67) AM_READWRITE(mmu_r, mmu_w)                                       //   MMU - page select (ramdisk memory paging)
1056   AM_RANGE(0x68, 0x6b) AM_READWRITE(ramsel_r, ramsel_w)                                 //   CASEN 0=access to ramdisk enabled, 0xff=ramdisk access disabled(data protection), &80=ROM2+48k RAM, &81=ROM2+4k RAM
1057   AM_RANGE(0x6c, 0x6f) AM_READWRITE(romsel_r, romsel_w)                                 //   RAMEN 0=rom enable; 0xff=rom+sord ram disabled (ramdisk visible)
1058//   AM_RANGE(0x70, 0x73) AM_MIRROR(0x04) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write)      //   PIO
1059   AM_RANGE(0x78, 0x7b) AM_DEVREADWRITE(WD2797_TAG, wd_fdc_t, read, write)                     //  WD2797 registers -> 78 - status/cmd, 79 - track #, 7a - sector #, 7b - data
1060   AM_RANGE(0x7c, 0x7c) AM_READWRITE(fd_r, fd_w)                                       //   drive select
1052//  AM_RANGE(0x60, 0x63)                                                                            //  SIO
1053   AM_RANGE(0x64, 0x67) AM_READWRITE(mmu_r, mmu_w)                                                 //  MMU - page select (ramdisk memory paging)
1054   AM_RANGE(0x68, 0x6b) AM_READWRITE(ramsel_r, ramsel_w)                                           //  CASEN 0=access to ramdisk enabled, 0xff=ramdisk access disabled(data protection), &80=ROM2+48k RAM, &81=ROM2+4k RAM
1055   AM_RANGE(0x6c, 0x6f) AM_READWRITE(romsel_r, romsel_w)                                           //  RAMEN 0=rom enable; 0xff=rom+sord ram disabled (ramdisk visible)
1056//  AM_RANGE(0x70, 0x73) AM_MIRROR(0x04) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write)     //  PIO
1057   AM_RANGE(0x78, 0x7b) AM_DEVREADWRITE(WD2797_TAG, wd_fdc_t, read, write)                         //  WD2797 registers -> 78 - status/cmd, 79 - track #, 7a - sector #, 7b - data
1058   AM_RANGE(0x7c, 0x7c) AM_READWRITE(fd_r, fd_w)                                                   //  drive select
10611059ADDRESS_MAP_END
10621060
10631061
10641062READ8_MEMBER( brno_state::mmu_r )
10651063{
1066   return 0;   
1064   return 0;
10671065}
10681066
10691067
10701068WRITE8_MEMBER( brno_state::mmu_w )
10711069{
1072
10731070   m_ramcpu = m_maincpu->state_int(Z80_B);
10741071   m_rambank = ~data; //m_maincpu->state_int(Z80_A);
10751072   m_rammap[m_ramcpu >> 4]=m_rambank;
r253707r253708
10961093   }
10971094
10981095   //logerror("RAMdisk page change(CPURAM<=BANK): &%02X00<=%02X at address &%04X\n",m_ramcpu,m_rambank,m_maincpu->state_int(Z80_PC)-2);
1099     
11001096
1097
11011098}
11021099
11031100READ8_MEMBER( brno_state::ramsel_r )
11041101{
1105   return m_ramen;   
1102   return m_ramen;
11061103}
11071104
11081105
r253707r253708
11201117
11211118READ8_MEMBER( brno_state::romsel_r )
11221119{
1123   return m_romen;   
1120   return m_romen;
11241121}
11251122
11261123WRITE8_MEMBER( brno_state::romsel_w ) //out 6c
r253707r253708
11291126
11301127   if (!data)
11311128   {
1132      program.install_rom(0x0000, 0x3fff, memregion(Z80_TAG)->base());
1129      program.install_rom(0x0000, 0x3fff, memregion(Z80_TAG)->base());
11331130      program.unmap_write(0x0000, 0x3fff);
11341131      m_romen=true;
11351132   }
11361133
11371134   else
1138   {
1135   {
11391136      program.install_readwrite_bank(0x0000, 0x0fff, "bank1");
11401137      program.install_readwrite_bank(0x1000, 0x1fff, "bank2");
11411138      program.install_readwrite_bank(0x2000, 0x2fff, "bank3");
r253707r253708
11461143
11471144      m_romen=false;
11481145   }
1149   
1146
11501147   logerror("RAMEN change: out (&6c),%x\n",data);
11511148}
11521149
r253707r253708
11661163   floppy_image_device *floppy;
11671164   m_floppy = NULL;
11681165   int disk = 0;
1169                       
1170 
1171   floppy = m_floppy0->get_device();     
1166
1167
1168   floppy = m_floppy0->get_device();
11721169   if (floppy)
11731170   {
11741171      if(BIT(data,0))
r253707r253708
11811178         floppy->mon_w(1);
11821179      }
11831180   }
1184   floppy = m_floppy1->get_device();     
1181   floppy = m_floppy1->get_device();
11851182   if (floppy)
11861183   {
11871184      if(BIT(data,1))
r253707r253708
11931190      {
11941191         floppy->mon_w(1);
11951192      }
1196   }             
1193   }
11971194
11981195   m_fdc->set_floppy(m_floppy);
11991196   if (m_floppy)
12001197   {
12011198      m_floppy->set_rpm(300);
12021199      m_floppy->mon_w(0);
1203      logerror("Select floppy %d\n", disk);         
1204   }
1200      logerror("Select floppy %d\n", disk);
1201   }
12051202
12061203}
12071204
r253707r253708
12311228   save_item(NAME(m_intra));
12321229   save_item(NAME(m_ibfa));
12331230   save_item(NAME(m_obfa));
1234   
1231
12351232}
12361233
12371234void m5_state::machine_reset()
r253707r253708
12401237   std::string region_tag;
12411238
12421239   //is ram/rom cart plugged in?
1243   if (m_cart1->exists())
1240   if (m_cart1->exists())
12441241   {
1245      if (m_cart1->get_type() > 0)
1242      if (m_cart1->get_type() > 0)
12461243         m_cart_ram=m_cart1;
12471244      else
12481245         m_cart=m_cart1;
12491246   }
1250   if (m_cart2->exists())
1247   if (m_cart2->exists())
12511248   {
1252      if (m_cart2->get_type() > 0)
1249      if (m_cart2->get_type() > 0)
12531250         m_cart_ram=m_cart2;
12541251      else
12551252         m_cart=m_cart2;
r253707r253708
12591256      {
12601257         membank("bank1r")->set_base(memregion(Z80_TAG)->base());
12611258         program.unmap_write(0x0000, 0x1fff);
1262      //   program.unmap_readwrite(0x2000, 0x6fff); //if you uncomment this line Sord starts cassette loading but it is not correct on real hw
1259      //  program.unmap_readwrite(0x2000, 0x6fff); //if you uncomment this line Sord starts cassette loading but it is not correct on real hw
12631260         program.unmap_readwrite(0x8000, 0xffff);
12641261         return;
12651262      }
r253707r253708
12711268
12721269      m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str());
12731270      memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());
1274     
1271
12751272      switch (m_ram_type)
12761273      {
12771274         case EM_5:
12781275            program.install_rom(0x0000, 0x1fff, memregion(Z80_TAG)->base());
1279            program.unmap_write(0x0000, 0x1fff);   
1276            program.unmap_write(0x0000, 0x1fff);
12801277            program.install_readwrite_handler(0x8000, 0xffff, read8_delegate(FUNC(m5_cart_slot_device::read_ram),(m5_cart_slot_device*)m_cart_ram), write8_delegate(FUNC(m5_cart_slot_device::write_ram),(m5_cart_slot_device*)m_cart_ram));
12811278            if (m_cart)
12821279            {
r253707r253708
12861283            break;
12871284         case MEM64KBI:
12881285            program.install_rom(0x0000, 0x1fff, memregion(Z80_TAG)->base());
1289            program.unmap_write(0x0000, 0x1fff);   
1286            program.unmap_write(0x0000, 0x1fff);
12901287            program.install_ram(0x8000, 0xffff, ram_region->base()+0x8000);
12911288
12921289            //if AUTOSTART is on then page out cart and start tape loading
r253707r253708
12971294            }
12981295            else
12991296               program.unmap_readwrite(0x2000, 0x6fff); //monitor rom is testing this area for 0xFFs otherwise thinks there is some ROM cart plugged in
1300           
1297
13011298            break;
13021299         case MEM64KBF:
13031300            program.unmap_write(0x0000, 0x6fff);
r253707r253708
13091306            membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
13101307            break;
13111308         case MEM64KRX:
1312            membank("bank1r")->set_base(memregion(Z80_TAG)->base());   membank("bank1w")->set_base(ram_region->base());
1313            membank("bank2r")->set_base(m_cart_rom->base());         membank("bank2w")->set_base(ram_region->base()+0x2000);
1314            membank("bank3r")->set_base(m_cart_rom->base()+0x2000);      membank("bank3w")->set_base(ram_region->base()+0x4000);
1315            membank("bank4r")->set_base(ram_region->base()+0x6000);      membank("bank4w")->set_base(ram_region->base()+0x6000);
1316           
1309            membank("bank1r")->set_base(memregion(Z80_TAG)->base());    membank("bank1w")->set_base(ram_region->base());
1310            membank("bank2r")->set_base(m_cart_rom->base());            membank("bank2w")->set_base(ram_region->base()+0x2000);
1311            membank("bank3r")->set_base(m_cart_rom->base()+0x2000);     membank("bank3w")->set_base(ram_region->base()+0x4000);
1312            membank("bank4r")->set_base(ram_region->base()+0x6000);     membank("bank4w")->set_base(ram_region->base()+0x6000);
1313
13171314            //page in BASIC or MSX
13181315            if ((m_DIPS->read() & 0x01))
13191316            {
r253707r253708
13221319            }
13231320            else
13241321            {
1325               membank("bank5r")->set_base(m_cart_rom->base()+0xe000);    membank("bank5w")->set_base(ram_region->base()+0x8000);
1322               membank("bank5r")->set_base(m_cart_rom->base()+0xe000); membank("bank5w")->set_base(ram_region->base()+0x8000);
13261323               membank("bank6r")->set_base(m_cart_rom->base()+0x12000); membank("bank6w")->set_base(ram_region->base()+0xc000);
13271324            }
13281325            break;
r253707r253708
13301327            program.unmap_readwrite(0x8000, 0xffff);
13311328      }
13321329      //I don't have idea what to do with savestates, please someone take care of it
1333      //m_cart_ram->save_ram();   
1330      //m_cart_ram->save_ram();
13341331   }
13351332   else
13361333      //ram cart wasn't found so if rom cart present install it
r253707r253708
13401337         program.unmap_write(0x0000, 0x1fff);
13411338         program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart));
13421339         program.unmap_write(0x2000, 0x6fff);
1343      }
1344   m_ram_mode=0;   
1340      }
1341   m_ram_mode=0;
13451342}
13461343
13471344
r253707r253708
13521349
13531350void brno_state::machine_reset()
13541351{
1355
13561352   /* enable ROM1+ROM2 */
13571353   address_space &program = m_maincpu->space(AS_PROGRAM);
1358   
1354
13591355   program.install_rom(0x0000, 0x3fff, memregion(Z80_TAG)->base());
13601356   program.unmap_write(0x0000, 0x3fff);
13611357
13621358
13631359   //is ram/rom cart plugged in?
1364   if (m_cart1->exists())
1360   if (m_cart1->exists())
13651361   {
1366      if (m_cart1->get_type() > 0)
1362      if (m_cart1->get_type() > 0)
13671363         m_cart_ram=m_cart1;
13681364      else
13691365         m_cart=m_cart1;
13701366   }
13711367   if (m_cart2->exists())
13721368   {
1373      if (m_cart2->get_type() > 0)
1369      if (m_cart2->get_type() > 0)
13741370         m_cart_ram=m_cart2;
13751371      else
13761372         m_cart=m_cart2;
r253707r253708
13801376      {
13811377         program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart));
13821378         program.unmap_write(0x2000, 0x6fff);
1383      }     
1379      }
13841380
13851381   m_romen=true;
13861382   m_ramen=false;
1387   
1383
13881384   floppy_image_device *floppy = NULL;
13891385   floppy = m_floppy0->get_device();
13901386   m_fdc->set_floppy(floppy);
r253707r253708
14911487
14921488
14931489static MACHINE_CONFIG_DERIVED_CLASS( brno, m5, brno_state )
1494   
1490
14951491   // basic machine hardware
14961492   MCFG_CPU_MODIFY(Z80_TAG)
14971493   MCFG_CPU_PROGRAM_MAP(m5_mem_brno)
14981494   MCFG_CPU_IO_MAP(brno_io)
1499//   MCFG_CPU_CONFIG(m5_daisy_chain)
1500   
1501   
1495//  MCFG_CPU_CONFIG(m5_daisy_chain)
1496
1497
15021498   //remove devices used for fd5 floppy
15031499   MCFG_DEVICE_REMOVE(Z80_FD5_TAG)
15041500   MCFG_DEVICE_REMOVE(I8255A_TAG)
r253707r253708
15201516   MCFG_FLOPPY_DRIVE_SOUND(true)
15211517   // only one floppy drive
15221518   //MCFG_DEVICE_REMOVE(WD2797_TAG":1")
1523   
1519
15241520   //MCFG_SNAPSHOT_ADD("snapshot", brno_state, brno, "rmd", 0)
15251521
15261522   // software list
r253707r253708
16011597
16021598DRIVER_INIT_MEMBER(brno_state,brno)
16031599{
1604//   logerror("Driver init entered\n" );   
1600//  logerror("Driver init entered\n" );
16051601}
16061602
16071603
trunk/src/mame/drivers/megasys1.cpp
r253707r253708
134134
135135MACHINE_RESET_MEMBER(megasys1_state,megasys1)
136136{
137
138   m_ignore_oki_status = 1;    /* ignore oki status due 'protection' */
137   m_ignore_oki_status = 1;    /* ignore oki status due 'protection' */
139138   m_ip_latched = 0x0006; /* reset protection - some games expect this initial read without sending anything */
140139   m_mcu_hs = 0;
141140}
r253707r253708
274273         case 2 :    m_ip_latched = m_io_p2->read(); break;
275274         case 3 :    m_ip_latched = m_io_dsw1->read(); break;
276275         case 4 :    m_ip_latched = m_io_dsw2->read(); break;
277         case 5 :   m_ip_latched = 0x0d; break; // startup check?
278         case 6 :   m_ip_latched = 0x06; break; // sent before each other command
276         case 5 :    m_ip_latched = 0x0d; break; // startup check?
277         case 6 :    m_ip_latched = 0x06; break; // sent before each other command
279278         default:  return; // get out if it wasn't a valid request
280279   }
281280
trunk/src/mame/drivers/merit.cpp
r253707r253708
15031503ROM_END
15041504
15051505ROM_START( misdraw )
1506   ROM_REGION( 0x10000, "maincpu", 0 )
1507   ROM_LOAD( "2131-16_u5-2.u5", 0x0000, 0x8000, CRC(fc756320) SHA1(6b810c57ed1be844a04a6081d727e182509604b4) ) /* 2131-16 U5-2 081889 */
1506   ROM_REGION( 0x10000, "maincpu", 0 )
1507   ROM_LOAD( "2131-16_u5-2.u5", 0x0000, 0x8000, CRC(fc756320) SHA1(6b810c57ed1be844a04a6081d727e182509604b4) ) /* 2131-16 U5-2 081889 */
15081508
1509   ROM_REGION( 0x6000, "gfx1", 0 )
1510   ROM_LOAD( "u39.u39", 0x0000, 0x2000, CRC(0f09d19b) SHA1(1f98559d5bad7c84d92ecea5a6df9429914a47f0) )
1511   ROM_LOAD( "u38.u38", 0x2000, 0x2000, CRC(8210a48d) SHA1(9af3e8ac8dcf1e548c4ba3ca8096e48dbb3b4700) )
1512   ROM_LOAD( "u37.u37", 0x4000, 0x2000, CRC(34ca07d5) SHA1(3656b3eb78dd6ea06cf323a08fc3f949a01b76a3) )
1509   ROM_REGION( 0x6000, "gfx1", 0 )
1510   ROM_LOAD( "u39.u39", 0x0000, 0x2000, CRC(0f09d19b) SHA1(1f98559d5bad7c84d92ecea5a6df9429914a47f0) )
1511   ROM_LOAD( "u38.u38", 0x2000, 0x2000, CRC(8210a48d) SHA1(9af3e8ac8dcf1e548c4ba3ca8096e48dbb3b4700) )
1512   ROM_LOAD( "u37.u37", 0x4000, 0x2000, CRC(34ca07d5) SHA1(3656b3eb78dd6ea06cf323a08fc3f949a01b76a3) )
15131513
1514   ROM_REGION( 0x2000, "gfx2", 0 )
1515   ROM_LOAD( "haip_u40.u40", 0x0000, 0x2000, CRC(ac4983b8) SHA1(a552a15f813c331de67eaae2ed42cc037b26c5bd) )
1514   ROM_REGION( 0x2000, "gfx2", 0 )
1515   ROM_LOAD( "haip_u40.u40", 0x0000, 0x2000, CRC(ac4983b8) SHA1(a552a15f813c331de67eaae2ed42cc037b26c5bd) )
15161516
1517   ROM_REGION( 0x0800, "cpunvram", ROMREGION_ERASEFF )
1518   // this contains CODE, the game jumps there on startup
1519   ROM_LOAD( "crt-209_2131-16", 0x0000, 0x0800, CRC(34729437) SHA1(f097a1a97d8078d7d6a6af85be416b1d1d09c7f2) ) /* 2816 EEPROM in Z80 epoxy CPU module */
1517   ROM_REGION( 0x0800, "cpunvram", ROMREGION_ERASEFF )
1518   // this contains CODE, the game jumps there on startup
1519   ROM_LOAD( "crt-209_2131-16", 0x0000, 0x0800, CRC(34729437) SHA1(f097a1a97d8078d7d6a6af85be416b1d1d09c7f2) ) /* 2816 EEPROM in Z80 epoxy CPU module */
15201520ROM_END
15211521
15221522ROM_START( dodgectya )
trunk/src/mame/drivers/namcops2.cpp
r253707r253708
14661466   SYSTEM246_BIOS
14671467
14681468   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
1469   ROM_LOAD( "wmr1vera.ic002", 0x000000, 0x800000, CRC(b431936b) SHA1(e2c543936cb5689a432662a69d0042c6179a3728) )
1470   ROM_LOAD( "wmr1vera_spr.ic002", 0x800000, 0x040000, CRC(b8b7539c) SHA1(f415bdc8e3ebf3b0c3d0d7607b894440e89b0fe7) )
1469   ROM_LOAD( "wmr1vera.ic002", 0x000000, 0x800000, CRC(b431936b) SHA1(e2c543936cb5689a432662a69d0042c6179a3728) )
1470   ROM_LOAD( "wmr1vera_spr.ic002", 0x800000, 0x040000, CRC(b8b7539c) SHA1(f415bdc8e3ebf3b0c3d0d7607b894440e89b0fe7) )
14711471
1472   DISK_REGION("dvd")   // actually single-track CD-ROM
1472   DISK_REGION("dvd")  // actually single-track CD-ROM
14731473   DISK_IMAGE_READONLY( "wmr1-a", 0, SHA1(02feab4380dcc2dd95c85b209192f858bafc721e) )
14741474ROM_END
14751475
trunk/src/mame/drivers/nibble.cpp
r253707r253708
1111
1212
1313**************************************************************************
14 
14
1515  Specs:
16 
16
1717  1x UM6845 (U67).
1818  1x AY38910A/p (U75).
1919
r253707r253708
148148*************************/
149149
150150static ADDRESS_MAP_START( nibble_map, AS_PROGRAM, 8, nibble_state )
151//   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
151//  ADDRESS_MAP_GLOBAL_MASK(0x3fff)
152152   AM_RANGE(0x0000, 0xbfff) AM_ROM
153   AM_RANGE(0xc000, 0xc3ff) AM_WRITE(nibble_videoram_w) AM_SHARE("videoram")   // placeholder
154//   AM_RANGE(0xff00, 0xff01) AM_DEVWRITE("crtc", mc6845_device, address_w)
155//   AM_RANGE(0xff02, 0xff03) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
153   AM_RANGE(0xc000, 0xc3ff) AM_WRITE(nibble_videoram_w) AM_SHARE("videoram")   // placeholder
154//  AM_RANGE(0xff00, 0xff01) AM_DEVWRITE("crtc", mc6845_device, address_w)
155//  AM_RANGE(0xff02, 0xff03) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
156156ADDRESS_MAP_END
157157
158158
trunk/src/mame/drivers/nightgal.cpp
r253707r253708
1414 - Fix Sweet Gal/Sexy Gal layer clearances;
1515 - NMI origin for Sexy Gal / Night Gal Summer
1616 - unemulated WAIT pin for Z80, MCU asserts it when accessing communication RAM
17
17
1818*******************************************************************************************/
1919
2020#include "emu.h"
r253707r253708
218218{
219219   if(offset == 2)
220220      m_subcpu->set_input_line(0, CLEAR_LINE );
221   
221
222222   return m_blit_raw_data[offset];
223223}
224224
r253707r253708
230230void nightgal_state::z80_wait_assert_cb()
231231{
232232   m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
233   
233
234234   // Note: cycles_to_attotime requires z80 context to work, calling for example m_subcpu as context gives a x4 cycle boost in z80 terms (reads execute_cycles_to_clocks() from NCS?) even if they runs at same speed basically.
235235   // TODO: needs a getter that tells a given CPU how many cycles requires an executing opcode for the r/w operation, which stacks with wait state penalty for accessing this specific area.
236   machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(nightgal_state::z80_wait_ack_cb),this));   
236   machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(nightgal_state::z80_wait_ack_cb),this));
237237}
238238
239239READ8_MEMBER(nightgal_state::royalqn_comm_r)
r253707r253708
344344   AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r)
345345   AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, alt_process_w)
346346   AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w)
347   AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
347   AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
348348
349349   AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r, royalqn_comm_w) AM_SHARE("comms_ram")
350350   AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM AM_REGION("subrom", 0)
r253707r253708
382382   AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r)
383383   AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, process_w)
384384   AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w)
385   AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
385   AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
386386
387387   AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r,royalqn_comm_w)
388388   AM_RANGE(0x4000, 0x4000) AM_NOP
r253707r253708
626626   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
627627   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
628628   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
629   
629
630630   PORT_START("BLIT_PORT")
631631   PORT_DIPNAME( 0x01, 0x01, "BLIT_PORT" )
632632   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
trunk/src/mame/drivers/notetaker.cpp
r253707r253708
2323 * The NoteTaker used the BitBlt graphical operation (from SmallTalk-76) to do most graphical functions, in order to fit the SmallTalk code and programs within 256K of RAM[2]. The actual BitBlt code lives in ROM[3].
2424
2525 * As far as I am aware, no media (world disks/boot disks) for the NoteTaker have survived (except maybe the two disks at Xerox Museum at PARC), but an incomplete dump of the Smalltalk-76 'world' which was used to bootstrap Smalltalk-78 originally did survive on the Alto disks at CHM
26
26
2727 * see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker for additional information
2828 * see http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/ for the smalltalk-76 dump
2929 * see http://xeroxalto.computerhistory.org/Indigo/BasicDisks/Smalltalk14.bfs!1_/ for more notetaker/smalltalk related files, including SmallTalk-80 files based on the notetaker smalltalk-78
r253707r253708
3535 * [4] http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/
3636 * [5] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790118_NoteTaker_System_Manual.pdf
3737 * MISSING DUMP for 8741? Keyboard MCU which does row-column scanning and mouse-related stuff
38
38
3939TODO: everything below.
4040* figure out the correct memory maps for the 256kB of shared ram, and what part of ram constitutes the framebuffer
4141* figure out how the emulation-cpu boots and where its 4k of local ram maps to
r253707r253708
5353  According to [3] and [5] the format is double density/MFM, 128 bytes per sector, 16 sectors per track, 1 or 2 sided, for 170K or 340K per disk. Drive spins at 300RPM.
5454  According to the schematics, we're missing an 82s147 DISKSEP.PROM used as a data separator
5555* we're missing a dump of the 82s126 SETMEMRQ PROM used to handle memory arbitration between the crtc and the rest of the system, but the equations are on the schematic and I'm planning to regenerate the prom contents from that, see ROM_LOAD section
56 
56
5757DONE:
5858* i/o cpu i/o area needs the memory map worked out per the schematics - done
5959*/
r253707r253708
8787   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8888   // basic io
8989   DECLARE_WRITE16_MEMBER(IPConReg_w);
90   
90
9191   // uarts
9292   DECLARE_READ16_MEMBER(ReadKeyData_r);
9393   DECLARE_READ16_MEMBER(ReadOPStatus_r);
r253707r253708
108108//variables
109109   UINT8 m_BootSeqDone;
110110   UINT8 m_DisableROM;
111   
111
112112// overrides
113113   virtual void machine_reset() override;
114114};
r253707r253708
346346ADDRESS_MAP_END
347347
348348/* iopic8259 interrupts:
349irq0   parity error (parity error syndrome data will be in fffdx/fffex) - currently ignored
350irq1   IPSysInt (interrupt triggered by the emulator cpu)
351irq2   DiskInt   (interrupt triggered by the IRQ or DRQ pins from the WD1791)
352irq3   EIAInt   (interrupt triggered by the datareceived pin from the eiauart)
353irq4   OddInt   (interrupt triggered by the O/E Odd/Even pin from the crt5027)
354irq5   ADCInt   (interrupt triggered at the ADCSpd rate interrupt from 74c161 counter on the disk/display module to indicate adc conversion finished)
355irq6   KbdInt   (interrupt triggered by the datareceived pin from the kbduart)
356irq7   VSync   (interrupt from the VSYN VSync pin from the crt5027)
349irq0    parity error (parity error syndrome data will be in fffdx/fffex) - currently ignored
350irq1    IPSysInt (interrupt triggered by the emulator cpu)
351irq2    DiskInt (interrupt triggered by the IRQ or DRQ pins from the WD1791)
352irq3    EIAInt  (interrupt triggered by the datareceived pin from the eiauart)
353irq4    OddInt  (interrupt triggered by the O/E Odd/Even pin from the crt5027)
354irq5    ADCInt  (interrupt triggered at the ADCSpd rate interrupt from 74c161 counter on the disk/display module to indicate adc conversion finished)
355irq6    KbdInt  (interrupt triggered by the datareceived pin from the kbduart)
356irq7    VSync   (interrupt from the VSYN VSync pin from the crt5027)
357357*/
358358
359359/* writes during boot of io roms v2.0:
r253707r253708
490490   ||\------ WCtr.2
491491   |\------- WCtr.1
492492   \-------- WCtr.0 (MSB)
493   
493
494494   Data:
495495   0123
496496   |\\\- N/C (zero?)
497497   \---- SetMemRq
498   
498
499499   Equation: SETMEMRQ == (
500500     ((Rctr == 0) && ((Wctr == 0)||(Wctr == 4)||(Wctr == 8)))
501501   ||((Rctr == 4) && ((Wctr == 4)||(Wctr == 8)||(Wctr == 12)))
trunk/src/mame/drivers/overdriv.cpp
r253707r253708
7272{
7373   const int timer_threshold = 168; // fwiw matches 0 on mask ROM check, so IF it's a timer irq then should be close ...
7474   int scanline = param;
75   
75
7676   m_fake_timer ++;
77   
77
7878   // TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?)
7979   //       this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow.
80    //      Update: gameplay is actually too fast compared to timer, first attract mode shouldn't even surpass first blue car on right.
80   //      Update: gameplay is actually too fast compared to timer, first attract mode shouldn't even surpass first blue car on right.
8181   if(scanline == 256) // vblank-out irq
8282   {
8383      // m_screen->frame_number() & 1
r253707r253708
245245static ADDRESS_MAP_START( overdriv_sound_map, AS_PROGRAM, 8, overdriv_state )
246246   AM_RANGE(0x0000, 0x0000) AM_WRITE(sound_ack_w)
247247   // 0x012 read during explosions
248   // 0x180
248   // 0x180
249249   AM_RANGE(0x0200, 0x0201) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write)
250250   AM_RANGE(0x0400, 0x042f) AM_DEVREADWRITE("k053260_1", k053260_device, read, write)
251251   AM_RANGE(0x0600, 0x062f) AM_DEVREADWRITE("k053260_2", k053260_device, read, write)
r253707r253708
320320
321321   MCFG_CPU_ADD("sub", M68000, XTAL_24MHz/2)  /* 12 MHz */
322322   MCFG_CPU_PROGRAM_MAP(overdriv_slave_map)
323   //MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state,  cpuB_interrupt)   
323   //MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state,  cpuB_interrupt)
324324   /* IRQ 5 and 6 are generated by the main CPU. */
325325   /* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */
326326
trunk/src/mame/drivers/slapfght.cpp
r253707r253708
18321832   ROM_LOAD( "sf_col19.bin", 0x0200,  0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) )
18331833ROM_END
18341834
1835/*
1835/*
18361836
18371837Guardian
183818381986 Taito Corporation
r253707r253708
19241924    A68_14 - Motorola MC68705P5 Micro-Controller (protected). Clock 3.000MHz [36/12]
19251925         X - Unpopulated socket
19261926
1927*/         
1927*/
19281928
19291929ROM_START( grdian )
19301930   ROM_REGION( 0x18000, "maincpu", 0 )     /* Region 0 - main cpu code */
trunk/src/mame/drivers/snk.cpp
r253707r253708
46484648   ROM_LOAD( "pal20l8a.6r", 0x0400, 0x0144, CRC(0f011673) SHA1(383e6f6e78daec9c874d5b48378111ca60f5ed64) )
46494649ROM_END
46504650
4651 
46524651
46534652
4653
46544654ROM_START( fitegolf2 )
46554655   ROM_REGION( 0x10000, "maincpu", 0 )
46564656   ROM_LOAD( "fg_ver2_6.4e", 0x0000, 0x4000, CRC(4cc9ef0c) SHA1(0ac6071725db3ec85659b170eecec91d22e76abd) )
trunk/src/mame/drivers/stv.cpp
r253707r253708
32593259   ROM_LOAD16_WORD_SWAP( "nclubv2.ic24",    0x0600000, 0x0200000, CRC(1b7637de) SHA1(43c3094f60a6582298a45bad923fef57e98c5b2b) ) // OK
32603260   ROM_LOAD16_WORD_SWAP( "nclubv2.ic26",    0x0a00000, 0x0200000, CRC(630be99d) SHA1(ac7fbaae98b126fad5228b0ebffa91a0f0a94516) ) // OK
32613261   ROM_LOAD16_WORD_SWAP( "nclubv2.ic28",    0x0e00000, 0x0200000, CRC(1a3ca5e2) SHA1(4d3aed51d29c54e71175d828f648c9feb813ac04) ) // OK
3262     
3262
32633263   ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
32643264   ROM_LOAD( "nclubv2.nv", 0x0000, 0x0080, CRC(96d55fa9) SHA1(b3c821d6cd4ed52d0e20565e12a06d8f81a08dbc) )
32653265ROM_END
trunk/src/mame/drivers/system16.cpp
r253707r253708
13561356
13571357WRITE16_MEMBER(segas1x_bootleg_state::ddcrewbl_spritebank_w)
13581358{
1359//   printf("banking write %08x: %04x (%04x %04x)\n", space.device().safe_pc(), offset*2, data&mem_mask, mem_mask);
1359//  printf("banking write %08x: %04x (%04x %04x)\n", space.device().safe_pc(), offset*2, data&mem_mask, mem_mask);
13601360
13611361   data &= mem_mask;
1362//   offset &= 0x7;
1362//  offset &= 0x7;
13631363   offset += 4;
13641364
13651365   int maxbanks = memregion("sprites")->bytes() / 0x40000;
r253707r253708
13841384   AM_RANGE(0xC00000, 0xC00001) AM_WRITENOP // vdp leftovers maybe?
13851385   AM_RANGE(0xC00004, 0xC00005) AM_WRITENOP
13861386   AM_RANGE(0xC00006, 0xC00007) AM_WRITENOP
1387   
13881387
1388
13891389   AM_RANGE(0xC40000, 0xC40001) AM_READ(ddcrew_c41006_r)
13901390   AM_RANGE(0xC40002, 0xC40003) AM_READ(ddcrew_c41006_r)
13911391   AM_RANGE(0xC41000, 0xC41001) AM_READ(ddcrew_c41006_r)
r253707r253708
13941394   AM_RANGE(0xC41006, 0xC41007) AM_READ(ddcrew_c41006_r)
13951395
13961396
1397   
1397
13981398   AM_RANGE(0xC44000, 0xC44001) AM_WRITENOP
13991399
14001400   AM_RANGE(0xc46600, 0xc46601) AM_WRITE(sys18_refreshenable_w)
r253707r253708
14131413   AM_RANGE(0xC46064, 0xC46065) AM_WRITENOP
14141414
14151415   AM_RANGE(0xC46070, 0xC46071) AM_WRITENOP
1416   
1416
14171417   AM_RANGE(0xffc000, 0xffffff) AM_RAM // ok
14181418ADDRESS_MAP_END
14191419
trunk/src/mame/drivers/ticalc1x.cpp
r253707r253708
716716   UINT16 r = (data & 7) | (data << 1 & 0x1f0);
717717   set_display_segmask(0x1ff, 0x7f);
718718   display_matrix(7, 9, seg, r, false);
719   
719
720720   // 3rd digit A/G(equals sign) is from O7
721721   m_display_state[3] = (r != 0 && m_o & 0x80) ? 0x41 : 0;
722722
trunk/src/mame/drivers/tispeak.cpp
r253707r253708
377377    - Expansion Module 4: VSM: 16KB CM62217
378378    - Expansion Module 5: VSM: 16KB CM62218*
379379    - Expansion Module 6: VSM: 16KB CM62219
380   
380
381381    note: these won't work on the 1981 version(s)
382382
383383----------------------------------------------------------------------------
r253707r253708
682682
683683   // R0: TMS5100 PDC pin
684684   m_tms5100->pdc_w(data & 1);
685   
685
686686   // R5: input mux high bit
687687   m_inp_mux = (m_inp_mux & 0xff) | (data << 3 & 0x100);
688688
trunk/src/mame/drivers/viper.cpp
r253707r253708
20232023
20242024         if (m_unk_serial_bit_w == 8)
20252025         {
2026            if ((m_unk_serial_cmd & 0x80) == 0)      // register read
2026            if ((m_unk_serial_cmd & 0x80) == 0)     // register read
20272027            {
20282028               int reg = m_unk_serial_cmd & 0x7f;
20292029               UINT8 data = m_unk_serial_regs[reg];
2030               
2030
20312031               m_unk_serial_data_r = ((data & 0x1) << 7) | ((data & 0x2) << 5) | ((data & 0x4) << 3) | ((data & 0x8) << 1) | ((data & 0x10) >> 1) | ((data & 0x20) >> 3) | ((data & 0x40) >> 5) | ((data & 0x80) >> 7);
20322032
20332033               printf("unk_serial read reg %02X: %04X\n", reg, data);
r253707r253708
20352035         }
20362036         if (m_unk_serial_bit_w == 16)
20372037         {
2038            if (m_unk_serial_cmd & 0x80)            // register write
2038            if (m_unk_serial_cmd & 0x80)                // register write
20392039            {
20402040               int reg = m_unk_serial_cmd & 0x7f;
20412041               m_unk_serial_regs[reg] = m_unk_serial_data;
r253707r253708
25382538   VIPER_BIOS
25392539
25402540   ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00)       /* DS2430 */
2541   
2541
25422542   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)     /* M48T58 Timekeeper NVRAM */
25432543
25442544   DISK_REGION( "ata:0:hdd:image" )
r253707r253708
25722572   DISK_IMAGE( "a41a02", 0, SHA1(bbb71e23bddfa07dfa30b6565a35befd82b055b8) )
25732573ROM_END
25742574
2575ROM_START(thrild2ab)
2575ROM_START(thrild2ab)
25762576   VIPER_BIOS
25772577
25782578   ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00)       /* DS2430 */
r253707r253708
25852585   DISK_IMAGE( "a41a02_alt", 0, SHA1(7a9cfdab7000765ffdd9198b209f7a74741248f2) )
25862586ROM_END
25872587
2588ROM_START(thrild2ac)
2588ROM_START(thrild2ac)
25892589   VIPER_BIOS
25902590
25912591   ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00)       /* DS2430 */
trunk/src/mame/includes/blmbycar.h
r253707r253708
6464   DECLARE_MACHINE_RESET(blmbycar);
6565   DECLARE_MACHINE_START(watrball);
6666   DECLARE_MACHINE_RESET(watrball);
67   
67
6868   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6969   void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
7070};
trunk/src/mame/includes/glass.h
r253707r253708
1818      m_vregs(*this, "vregs"),
1919      m_spriteram(*this, "spriteram"),
2020      m_mainram(*this, "mainram") { }
21     
2221
22
2323   /* devices */
2424   required_device<cpu_device> m_maincpu;
2525   required_device<gfxdecode_device> m_gfxdecode;
r253707r253708
5454   virtual void machine_start() override;
5555   virtual void machine_reset() override;
5656   virtual void video_start() override;
57   
57
5858   TILE_GET_INFO_MEMBER(get_tile_info_screen0);
5959   TILE_GET_INFO_MEMBER(get_tile_info_screen1);
6060   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
trunk/src/mame/includes/m5.h
r253707r253708
2020#define SCREEN_TAG      "screen"
2121//brno mod
2222#define WD2797_TAG      "5f"
23#define RAMDISK         "ramdisk"
23#define RAMDISK         "ramdisk"
2424
2525
2626class m5_state : public driver_device
r253707r253708
9696   UINT8 m_ram_mode;
9797   UINT8 m_ram_type;
9898   memory_region *m_cart_rom;
99   m5_cart_slot_device   *m_cart_ram, *m_cart;
99   m5_cart_slot_device *m_cart_ram, *m_cart;
100100
101101   // floppy state for fd5
102102   UINT8 m_fd5_data;
r253707r253708
110110
111111class brno_state : public m5_state
112112{
113public:       
113public:
114114   brno_state(const machine_config &mconfig, device_type type, const char *tag)
115115      : m5_state(mconfig, type, tag),
116     
116
117117      m_fdc(*this, WD2797_TAG),
118118      m_floppy0(*this, WD2797_TAG":0"),
119119      m_floppy1(*this, WD2797_TAG":1")
120      //   m_ramdisk(*this, RAMDISK)
120      //  m_ramdisk(*this, RAMDISK)
121121   { }
122122
123   
123
124124   required_device<wd2797_t> m_fdc;
125125   required_device<floppy_connector> m_floppy0;
126126   optional_device<floppy_connector> m_floppy1;
r253707r253708
140140   DECLARE_FLOPPY_FORMATS( floppy_formats );
141141
142142
143//   DECLARE_WRITE_LINE_MEMBER( wd2797_intrq_w );
144//   DECLARE_WRITE_LINE_MEMBER( wd2797_drq_w );
145//   DECLARE_WRITE_LINE_MEMBER( wd2797_index_callback);
143//  DECLARE_WRITE_LINE_MEMBER( wd2797_intrq_w );
144//  DECLARE_WRITE_LINE_MEMBER( wd2797_drq_w );
145//  DECLARE_WRITE_LINE_MEMBER( wd2797_index_callback);
146146
147147   //required_device<ram_device> m_ramdisk;
148148   DECLARE_DRIVER_INIT(brno);
149149   DECLARE_SNAPSHOT_LOAD_MEMBER( brno );
150//   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(m5_cart);
150//  DECLARE_DEVICE_IMAGE_LOAD_MEMBER(m5_cart);
151151
152152
153153   virtual void machine_start() override;
r253707r253708
157157   UINT8 m_ramcpu; //where Ramdisk bank is mapped
158158   bool m_romen;
159159   bool m_ramen;
160   
161160
162   UINT8 m_rammap[16]; // memory map         
161
162   UINT8 m_rammap[16]; // memory map
163163};
164164
165165#endif
trunk/src/mame/includes/overdriv.h
r253707r253708
6262   //INTERRUPT_GEN_MEMBER(cpuB_interrupt);
6363   TIMER_DEVICE_CALLBACK_MEMBER(overdriv_cpuA_scanline);
6464   int m_fake_timer;
65   
65
6666   K051316_CB_MEMBER(zoom_callback_1);
6767   K051316_CB_MEMBER(zoom_callback_2);
6868   K053246_CB_MEMBER(sprite_callback);
trunk/src/mame/layout/esq2by16.lay
r253707r253708
6060      <backdrop element="background">
6161         <bounds left="0" top="0" right="300" bottom="120" />
6262      </backdrop>
63      <bezel name="rLed_0"  element="rLeds">      <bounds x="200" y="0"  width="5" height="3" />      </bezel>
64      <bezel name="rLed_8"  element="rLeds">      <bounds x="200" y="20" width="5" height="3" />      </bezel>
65      <bezel name="rLed_9"  element="rLeds">      <bounds x="240" y="0"  width="5" height="3" />      </bezel>
66      <bezel name="rLed_1"  element="rLeds">      <bounds x="240" y="20" width="5" height="3" />      </bezel>
67      <bezel name="rLed_2"  element="rLeds">      <bounds x="260" y="00" width="5" height="3" />      </bezel>
68      <bezel name="rLed_3"  element="rLeds">      <bounds x="270" y="00" width="5" height="3" />      </bezel>
69      <bezel name="rLed_4"  element="rLeds">      <bounds x="280" y="00" width="5" height="3" />      </bezel>
70      <bezel name="rLed_5"  element="rLeds">      <bounds x="290" y="00" width="5" height="3" />      </bezel>
71      <bezel name="rLed_10" element="rLeds">      <bounds x="260" y="10" width="5" height="3" />      </bezel>
72      <bezel name="rLed_11" element="rLeds">      <bounds x="270" y="10" width="5" height="3" />      </bezel>
73      <bezel name="rLed_12" element="rLeds">      <bounds x="280" y="10" width="5" height="3" />      </bezel>
74      <bezel name="rLed_13" element="rLeds">      <bounds x="290" y="10" width="5" height="3" />      </bezel>
63      <bezel name="rLed_0"  element="rLeds">      <bounds x="200" y="0"  width="5" height="3" />      </bezel>
64      <bezel name="rLed_8"  element="rLeds">      <bounds x="200" y="20" width="5" height="3" />      </bezel>
65      <bezel name="rLed_9"  element="rLeds">      <bounds x="240" y="0"  width="5" height="3" />      </bezel>
66      <bezel name="rLed_1"  element="rLeds">      <bounds x="240" y="20" width="5" height="3" />      </bezel>
67      <bezel name="rLed_2"  element="rLeds">      <bounds x="260" y="00" width="5" height="3" />      </bezel>
68      <bezel name="rLed_3"  element="rLeds">      <bounds x="270" y="00" width="5" height="3" />      </bezel>
69      <bezel name="rLed_4"  element="rLeds">      <bounds x="280" y="00" width="5" height="3" />      </bezel>
70      <bezel name="rLed_5"  element="rLeds">      <bounds x="290" y="00" width="5" height="3" />      </bezel>
71      <bezel name="rLed_10" element="rLeds">      <bounds x="260" y="10" width="5" height="3" />      </bezel>
72      <bezel name="rLed_11" element="rLeds">      <bounds x="270" y="10" width="5" height="3" />      </bezel>
73      <bezel name="rLed_12" element="rLeds">      <bounds x="280" y="10" width="5" height="3" />      </bezel>
74      <bezel name="rLed_13" element="rLeds">      <bounds x="290" y="10" width="5" height="3" />      </bezel>
7575
76      <bezel name="rLed_6"  element="rLeds">      <bounds x="260" y="20" width="5" height="3" />      </bezel>
77      <bezel name="rLed_7"  element="rLeds">      <bounds x="270" y="20" width="5" height="3" />      </bezel>
78      <bezel name="rLed_14" element="rLeds">      <bounds x="280" y="20" width="5" height="3" />      </bezel>
79      <bezel name="rLed_15" element="rLeds">      <bounds x="290" y="20" width="5" height="3" />      </bezel>
80      <bezel name="pg_3000"    element="Page3" state="0">      <bounds x="  0" y="  0" width="5" height="1" />    </bezel>
81      <bezel name="pg_3001"    element="Page3" state="0">      <bounds x="  0" y="  1" width="5" height="1" />    </bezel>
82      <bezel name="pg_3002"    element="Page3" state="0">      <bounds x="  0" y="  2" width="5" height="1" />    </bezel>
83      <bezel name="pg_3003"    element="Page3" state="0">      <bounds x="  0" y="  3" width="5" height="1" />    </bezel>
84      <bezel name="pg_3004"    element="Page3" state="0">      <bounds x="  0" y="  4" width="5" height="1" />    </bezel>
85      <bezel name="pg_3005"    element="Page3" state="0">      <bounds x="  0" y="  5" width="5" height="1" />    </bezel>
86      <bezel name="pg_3006"    element="Page3" state="0">      <bounds x="  0" y="  6" width="5" height="1" />    </bezel>
87      <bezel name="pg_3007"    element="Page3" state="0">      <bounds x="  6" y="  0" width="5" height="1" />    </bezel>
88      <bezel name="pg_3008"    element="Page3" state="0">      <bounds x="  6" y="  1" width="5" height="1" />    </bezel>
89      <bezel name="pg_3009"    element="Page3" state="0">      <bounds x="  6" y="  2" width="5" height="1" />    </bezel>
90      <bezel name="pg_3010"    element="Page3" state="0">      <bounds x="  6" y="  3" width="5" height="1" />    </bezel>
91      <bezel name="pg_3011"    element="Page3" state="0">      <bounds x="  6" y="  4" width="5" height="1" />    </bezel>
92      <bezel name="pg_3012"    element="Page3" state="0">      <bounds x="  6" y="  5" width="5" height="1" />    </bezel>
93      <bezel name="pg_3013"    element="Page3" state="0">      <bounds x="  6" y="  6" width="5" height="1" />    </bezel>
94      <bezel name="pg_3014"    element="Page3" state="0">      <bounds x=" 12" y="  0" width="5" height="1" />    </bezel>
95      <bezel name="pg_3015"    element="Page3" state="0">      <bounds x=" 12" y="  1" width="5" height="1" />    </bezel>
96      <bezel name="pg_3016"    element="Page3" state="0">      <bounds x=" 12" y="  2" width="5" height="1" />    </bezel>
97      <bezel name="pg_3017"    element="Page3" state="0">      <bounds x=" 12" y="  3" width="5" height="1" />    </bezel>
98      <bezel name="pg_3018"    element="Page3" state="0">      <bounds x=" 12" y="  4" width="5" height="1" />    </bezel>
99      <bezel name="pg_3019"    element="Page3" state="0">      <bounds x=" 12" y="  5" width="5" height="1" />    </bezel>
100      <bezel name="pg_3020"    element="Page3" state="0">      <bounds x=" 12" y="  6" width="5" height="1" />    </bezel>
101      <bezel name="pg_3021"    element="Page3" state="0">      <bounds x=" 18" y="  0" width="5" height="1" />    </bezel>
102      <bezel name="pg_3022"    element="Page3" state="0">      <bounds x=" 18" y="  1" width="5" height="1" />    </bezel>
103      <bezel name="pg_3023"    element="Page3" state="0">      <bounds x=" 18" y="  2" width="5" height="1" />    </bezel>
104      <bezel name="pg_3024"    element="Page3" state="0">      <bounds x=" 18" y="  3" width="5" height="1" />    </bezel>
105      <bezel name="pg_3025"    element="Page3" state="0">      <bounds x=" 18" y="  4" width="5" height="1" />    </bezel>
106      <bezel name="pg_3026"    element="Page3" state="0">      <bounds x=" 18" y="  5" width="5" height="1" />    </bezel>
107      <bezel name="pg_3027"    element="Page3" state="0">      <bounds x=" 18" y="  6" width="5" height="1" />    </bezel>
108      <bezel name="pg_3028"    element="Page3" state="0">      <bounds x=" 24" y="  0" width="5" height="1" />    </bezel>
109      <bezel name="pg_3029"    element="Page3" state="0">      <bounds x=" 24" y="  1" width="5" height="1" />    </bezel>
110      <bezel name="pg_3030"    element="Page3" state="0">      <bounds x=" 24" y="  2" width="5" height="1" />    </bezel>
111      <bezel name="pg_3031"    element="Page3" state="0">      <bounds x=" 24" y="  3" width="5" height="1" />    </bezel>
112      <bezel name="pg_3032"    element="Page3" state="0">      <bounds x=" 24" y="  4" width="5" height="1" />    </bezel>
113      <bezel name="pg_3033"    element="Page3" state="0">      <bounds x=" 24" y="  5" width="5" height="1" />    </bezel>
114      <bezel name="pg_3034"    element="Page3" state="0">      <bounds x=" 24" y="  6" width="5" height="1" />    </bezel>
115      <bezel name="pg_3035"    element="Page3" state="0">      <bounds x=" 30" y="  0" width="5" height="1" />    </bezel>
116      <bezel name="pg_3036"    element="Page3" state="0">      <bounds x=" 30" y="  1" width="5" height="1" />    </bezel>
117      <bezel name="pg_3037"    element="Page3" state="0">      <bounds x=" 30" y="  2" width="5" height="1" />    </bezel>
118      <bezel name="pg_3038"    element="Page3" state="0">      <bounds x=" 30" y="  3" width="5" height="1" />    </bezel>
119      <bezel name="pg_3039"    element="Page3" state="0">      <bounds x=" 30" y="  4" width="5" height="1" />    </bezel>
120      <bezel name="pg_3040"    element="Page3" state="0">      <bounds x=" 30" y="  5" width="5" height="1" />    </bezel>
121      <bezel name="pg_3041"    element="Page3" state="0">      <bounds x=" 30" y="  6" width="5" height="1" />    </bezel>
122      <bezel name="pg_3042"    element="Page3" state="0">      <bounds x=" 36" y="  0" width="5" height="1" />    </bezel>
123      <bezel name="pg_3043"    element="Page3" state="0">      <bounds x=" 36" y="  1" width="5" height="1" />    </bezel>
124      <bezel name="pg_3044"    element="Page3" state="0">      <bounds x=" 36" y="  2" width="5" height="1" />    </bezel>
125      <bezel name="pg_3045"    element="Page3" state="0">      <bounds x=" 36" y="  3" width="5" height="1" />    </bezel>
126      <bezel name="pg_3046"    element="Page3" state="0">      <bounds x=" 36" y="  4" width="5" height="1" />    </bezel>
127      <bezel name="pg_3047"    element="Page3" state="0">      <bounds x=" 36" y="  5" width="5" height="1" />    </bezel>
128      <bezel name="pg_3048"    element="Page3" state="0">      <bounds x=" 36" y="  6" width="5" height="1" />    </bezel>
129      <bezel name="pg_3049"    element="Page3" state="0">      <bounds x=" 42" y="  0" width="5" height="1" />    </bezel>
130      <bezel name="pg_3050"    element="Page3" state="0">      <bounds x=" 42" y="  1" width="5" height="1" />    </bezel>
131      <bezel name="pg_3051"    element="Page3" state="0">      <bounds x=" 42" y="  2" width="5" height="1" />    </bezel>
132      <bezel name="pg_3052"    element="Page3" state="0">      <bounds x=" 42" y="  3" width="5" height="1" />    </bezel>
133      <bezel name="pg_3053"    element="Page3" state="0">      <bounds x=" 42" y="  4" width="5" height="1" />    </bezel>
134      <bezel name="pg_3054"    element="Page3" state="0">      <bounds x=" 42" y="  5" width="5" height="1" />    </bezel>
135      <bezel name="pg_3055"    element="Page3" state="0">      <bounds x=" 42" y="  6" width="5" height="1" />    </bezel>
136      <bezel name="pg_3056"    element="Page3" state="0">      <bounds x=" 48" y="  0" width="5" height="1" />    </bezel>
137      <bezel name="pg_3057"    element="Page3" state="0">      <bounds x=" 48" y="  1" width="5" height="1" />    </bezel>
138      <bezel name="pg_3058"    element="Page3" state="0">      <bounds x=" 48" y="  2" width="5" height="1" />    </bezel>
139      <bezel name="pg_3059"    element="Page3" state="0">      <bounds x=" 48" y="  3" width="5" height="1" />    </bezel>
140      <bezel name="pg_3060"    element="Page3" state="0">      <bounds x=" 48" y="  4" width="5" height="1" />    </bezel>
141      <bezel name="pg_3061"    element="Page3" state="0">      <bounds x=" 48" y="  5" width="5" height="1" />    </bezel>
142      <bezel name="pg_3062"    element="Page3" state="0">      <bounds x=" 48" y="  6" width="5" height="1" />    </bezel>
143      <bezel name="pg_3063"    element="Page3" state="0">      <bounds x=" 54" y="  0" width="5" height="1" />    </bezel>
144      <bezel name="pg_3064"    element="Page3" state="0">      <bounds x=" 54" y="  1" width="5" height="1" />    </bezel>
145      <bezel name="pg_3065"    element="Page3" state="0">      <bounds x=" 54" y="  2" width="5" height="1" />    </bezel>
146      <bezel name="pg_3066"    element="Page3" state="0">      <bounds x=" 54" y="  3" width="5" height="1" />    </bezel>
147      <bezel name="pg_3067"    element="Page3" state="0">      <bounds x=" 54" y="  4" width="5" height="1" />    </bezel>
148      <bezel name="pg_3068"    element="Page3" state="0">      <bounds x=" 54" y="  5" width="5" height="1" />    </bezel>
149      <bezel name="pg_3069"    element="Page3" state="0">      <bounds x=" 54" y="  6" width="5" height="1" />    </bezel>
150      <bezel name="pg_3070"    element="Page3" state="0">      <bounds x=" 60" y="  0" width="5" height="1" />    </bezel>
151      <bezel name="pg_3071"    element="Page3" state="0">      <bounds x=" 60" y="  1" width="5" height="1" />    </bezel>
152      <bezel name="pg_3072"    element="Page3" state="0">      <bounds x=" 60" y="  2" width="5" height="1" />    </bezel>
153      <bezel name="pg_3073"    element="Page3" state="0">      <bounds x=" 60" y="  3" width="5" height="1" />    </bezel>
154      <bezel name="pg_3074"    element="Page3" state="0">      <bounds x=" 60" y="  4" width="5" height="1" />    </bezel>
155      <bezel name="pg_3075"    element="Page3" state="0">      <bounds x=" 60" y="  5" width="5" height="1" />    </bezel>
156      <bezel name="pg_3076"    element="Page3" state="0">      <bounds x=" 60" y="  6" width="5" height="1" />    </bezel>
157      <bezel name="pg_3077"    element="Page3" state="0">      <bounds x=" 66" y="  0" width="5" height="1" />    </bezel>
158      <bezel name="pg_3078"    element="Page3" state="0">      <bounds x=" 66" y="  1" width="5" height="1" />    </bezel>
159      <bezel name="pg_3079"    element="Page3" state="0">      <bounds x=" 66" y="  2" width="5" height="1" />    </bezel>
160      <bezel name="pg_3080"    element="Page3" state="0">      <bounds x=" 66" y="  3" width="5" height="1" />    </bezel>
161      <bezel name="pg_3081"    element="Page3" state="0">      <bounds x=" 66" y="  4" width="5" height="1" />    </bezel>
162      <bezel name="pg_3082"    element="Page3" state="0">      <bounds x=" 66" y="  5" width="5" height="1" />    </bezel>
163      <bezel name="pg_3083"    element="Page3" state="0">      <bounds x=" 66" y="  6" width="5" height="1" />    </bezel>
164      <bezel name="pg_3084"    element="Page3" state="0">      <bounds x=" 72" y="  0" width="5" height="1" />    </bezel>
165      <bezel name="pg_3085"    element="Page3" state="0">      <bounds x=" 72" y="  1" width="5" height="1" />    </bezel>
166      <bezel name="pg_3086"    element="Page3" state="0">      <bounds x=" 72" y="  2" width="5" height="1" />    </bezel>
167      <bezel name="pg_3087"    element="Page3" state="0">      <bounds x=" 72" y="  3" width="5" height="1" />    </bezel>
168      <bezel name="pg_3088"    element="Page3" state="0">      <bounds x=" 72" y="  4" width="5" height="1" />    </bezel>
169      <bezel name="pg_3089"    element="Page3" state="0">      <bounds x=" 72" y="  5" width="5" height="1" />    </bezel>
170      <bezel name="pg_3090"    element="Page3" state="0">      <bounds x=" 72" y="  6" width="5" height="1" />    </bezel>
171      <bezel name="pg_3091"    element="Page3" state="0">      <bounds x=" 78" y="  0" width="5" height="1" />    </bezel>
172      <bezel name="pg_3092"    element="Page3" state="0">      <bounds x=" 78" y="  1" width="5" height="1" />    </bezel>
173      <bezel name="pg_3093"    element="Page3" state="0">      <bounds x=" 78" y="  2" width="5" height="1" />    </bezel>
174      <bezel name="pg_3094"    element="Page3" state="0">      <bounds x=" 78" y="  3" width="5" height="1" />    </bezel>
175      <bezel name="pg_3095"    element="Page3" state="0">      <bounds x=" 78" y="  4" width="5" height="1" />    </bezel>
176      <bezel name="pg_3096"    element="Page3" state="0">      <bounds x=" 78" y="  5" width="5" height="1" />    </bezel>
177      <bezel name="pg_3097"    element="Page3" state="0">      <bounds x=" 78" y="  6" width="5" height="1" />    </bezel>
178      <bezel name="pg_3098"    element="Page3" state="0">      <bounds x=" 84" y="  0" width="5" height="1" />    </bezel>
179      <bezel name="pg_3099"    element="Page3" state="0">      <bounds x=" 84" y="  1" width="5" height="1" />    </bezel>
180      <bezel name="pg_3100"    element="Page3" state="0">      <bounds x=" 84" y="  2" width="5" height="1" />    </bezel>
181      <bezel name="pg_3101"    element="Page3" state="0">      <bounds x=" 84" y="  3" width="5" height="1" />    </bezel>
182      <bezel name="pg_3102"    element="Page3" state="0">      <bounds x=" 84" y="  4" width="5" height="1" />    </bezel>
183      <bezel name="pg_3103"    element="Page3" state="0">      <bounds x=" 84" y="  5" width="5" height="1" />    </bezel>
184      <bezel name="pg_3104"    element="Page3" state="0">      <bounds x=" 84" y="  6" width="5" height="1" />    </bezel>
185      <bezel name="pg_3105"    element="Page3" state="0">      <bounds x=" 90" y="  0" width="5" height="1" />    </bezel>
186      <bezel name="pg_3106"    element="Page3" state="0">      <bounds x=" 90" y="  1" width="5" height="1" />    </bezel>
187      <bezel name="pg_3107"    element="Page3" state="0">      <bounds x=" 90" y="  2" width="5" height="1" />    </bezel>
188      <bezel name="pg_3108"    element="Page3" state="0">      <bounds x=" 90" y="  3" width="5" height="1" />    </bezel>
189      <bezel name="pg_3109"    element="Page3" state="0">      <bounds x=" 90" y="  4" width="5" height="1" />    </bezel>
190      <bezel name="pg_3110"    element="Page3" state="0">      <bounds x=" 90" y="  5" width="5" height="1" />    </bezel>
191      <bezel name="pg_3111"    element="Page3" state="0">      <bounds x=" 90" y="  6" width="5" height="1" />    </bezel>
192      <bezel name="pg_3112"    element="Page3" state="0">      <bounds x="  0" y=" 10" width="5" height="1" />    </bezel>
193      <bezel name="pg_3113"    element="Page3" state="0">      <bounds x="  0" y=" 11" width="5" height="1" />    </bezel>
194      <bezel name="pg_3114"    element="Page3" state="0">      <bounds x="  0" y=" 12" width="5" height="1" />    </bezel>
195      <bezel name="pg_3115"    element="Page3" state="0">      <bounds x="  0" y=" 13" width="5" height="1" />    </bezel>
196      <bezel name="pg_3116"    element="Page3" state="0">      <bounds x="  0" y=" 14" width="5" height="1" />    </bezel>
197      <bezel name="pg_3117"    element="Page3" state="0">      <bounds x="  0" y=" 15" width="5" height="1" />    </bezel>
198      <bezel name="pg_3118"    element="Page3" state="0">      <bounds x="  0" y=" 16" width="5" height="1" />    </bezel>
199      <bezel name="pg_3119"    element="Page3" state="0">      <bounds x="  6" y=" 10" width="5" height="1" />    </bezel>
200      <bezel name="pg_3120"    element="Page3" state="0">      <bounds x="  6" y=" 11" width="5" height="1" />    </bezel>
201      <bezel name="pg_3121"    element="Page3" state="0">      <bounds x="  6" y=" 12" width="5" height="1" />    </bezel>
202      <bezel name="pg_3122"    element="Page3" state="0">      <bounds x="  6" y=" 13" width="5" height="1" />    </bezel>
203      <bezel name="pg_3123"    element="Page3" state="0">      <bounds x="  6" y=" 14" width="5" height="1" />    </bezel>
204      <bezel name="pg_3124"    element="Page3" state="0">      <bounds x="  6" y=" 15" width="5" height="1" />    </bezel>
205      <bezel name="pg_3125"    element="Page3" state="0">      <bounds x="  6" y=" 16" width="5" height="1" />    </bezel>
206      <bezel name="pg_3126"    element="Page3" state="0">      <bounds x=" 12" y=" 10" width="5" height="1" />    </bezel>
207      <bezel name="pg_3127"    element="Page3" state="0">      <bounds x=" 12" y=" 11" width="5" height="1" />    </bezel>
208      <bezel name="pg_3128"    element="Page3" state="0">      <bounds x=" 12" y=" 12" width="5" height="1" />    </bezel>
209      <bezel name="pg_3129"    element="Page3" state="0">      <bounds x=" 12" y=" 13" width="5" height="1" />    </bezel>
210      <bezel name="pg_3130"    element="Page3" state="0">      <bounds x=" 12" y=" 14" width="5" height="1" />    </bezel>
211      <bezel name="pg_3131"    element="Page3" state="0">      <bounds x=" 12" y=" 15" width="5" height="1" />    </bezel>
212      <bezel name="pg_3132"    element="Page3" state="0">      <bounds x=" 12" y=" 16" width="5" height="1" />    </bezel>
213      <bezel name="pg_3133"    element="Page3" state="0">      <bounds x=" 18" y=" 10" width="5" height="1" />    </bezel>
214      <bezel name="pg_3134"    element="Page3" state="0">      <bounds x=" 18" y=" 11" width="5" height="1" />    </bezel>
215      <bezel name="pg_3135"    element="Page3" state="0">      <bounds x=" 18" y=" 12" width="5" height="1" />    </bezel>
216      <bezel name="pg_3136"    element="Page3" state="0">      <bounds x=" 18" y=" 13" width="5" height="1" />    </bezel>
217      <bezel name="pg_3137"    element="Page3" state="0">      <bounds x=" 18" y=" 14" width="5" height="1" />    </bezel>
218      <bezel name="pg_3138"    element="Page3" state="0">      <bounds x=" 18" y=" 15" width="5" height="1" />    </bezel>
219      <bezel name="pg_3139"    element="Page3" state="0">      <bounds x=" 18" y=" 16" width="5" height="1" />    </bezel>
220      <bezel name="pg_3140"    element="Page3" state="0">      <bounds x=" 24" y=" 10" width="5" height="1" />    </bezel>
221      <bezel name="pg_3141"    element="Page3" state="0">      <bounds x=" 24" y=" 11" width="5" height="1" />    </bezel>
222      <bezel name="pg_3142"    element="Page3" state="0">      <bounds x=" 24" y=" 12" width="5" height="1" />    </bezel>
223      <bezel name="pg_3143"    element="Page3" state="0">      <bounds x=" 24" y=" 13" width="5" height="1" />    </bezel>
224      <bezel name="pg_3144"    element="Page3" state="0">      <bounds x=" 24" y=" 14" width="5" height="1" />    </bezel>
225      <bezel name="pg_3145"    element="Page3" state="0">      <bounds x=" 24" y=" 15" width="5" height="1" />    </bezel>
226      <bezel name="pg_3146"    element="Page3" state="0">      <bounds x=" 24" y=" 16" width="5" height="1" />    </bezel>
227      <bezel name="pg_3147"    element="Page3" state="0">      <bounds x=" 30" y=" 10" width="5" height="1" />    </bezel>
228      <bezel name="pg_3148"    element="Page3" state="0">      <bounds x=" 30" y=" 11" width="5" height="1" />    </bezel>
229      <bezel name="pg_3149"    element="Page3" state="0">      <bounds x=" 30" y=" 12" width="5" height="1" />    </bezel>
230      <bezel name="pg_3150"    element="Page3" state="0">      <bounds x=" 30" y=" 13" width="5" height="1" />    </bezel>
231      <bezel name="pg_3151"    element="Page3" state="0">      <bounds x=" 30" y=" 14" width="5" height="1" />    </bezel>
232      <bezel name="pg_3152"    element="Page3" state="0">      <bounds x=" 30" y=" 15" width="5" height="1" />    </bezel>
233      <bezel name="pg_3153"    element="Page3" state="0">      <bounds x=" 30" y=" 16" width="5" height="1" />    </bezel>
234      <bezel name="pg_3154"    element="Page3" state="0">      <bounds x=" 36" y=" 10" width="5" height="1" />    </bezel>
235      <bezel name="pg_3155"    element="Page3" state="0">      <bounds x=" 36" y=" 11" width="5" height="1" />    </bezel>
236      <bezel name="pg_3156"    element="Page3" state="0">      <bounds x=" 36" y=" 12" width="5" height="1" />    </bezel>
237      <bezel name="pg_3157"    element="Page3" state="0">      <bounds x=" 36" y=" 13" width="5" height="1" />    </bezel>
238      <bezel name="pg_3158"    element="Page3" state="0">      <bounds x=" 36" y=" 14" width="5" height="1" />    </bezel>
239      <bezel name="pg_3159"    element="Page3" state="0">      <bounds x=" 36" y=" 15" width="5" height="1" />    </bezel>
240      <bezel name="pg_3160"    element="Page3" state="0">      <bounds x=" 36" y=" 16" width="5" height="1" />    </bezel>
241      <bezel name="pg_3161"    element="Page3" state="0">      <bounds x=" 42" y=" 10" width="5" height="1" />    </bezel>
242      <bezel name="pg_3162"    element="Page3" state="0">      <bounds x=" 42" y=" 11" width="5" height="1" />    </bezel>
243      <bezel name="pg_3163"    element="Page3" state="0">      <bounds x=" 42" y=" 12" width="5" height="1" />    </bezel>
244      <bezel name="pg_3164"    element="Page3" state="0">      <bounds x=" 42" y=" 13" width="5" height="1" />    </bezel>
245      <bezel name="pg_3165"    element="Page3" state="0">      <bounds x=" 42" y=" 14" width="5" height="1" />    </bezel>
246      <bezel name="pg_3166"    element="Page3" state="0">      <bounds x=" 42" y=" 15" width="5" height="1" />    </bezel>
247      <bezel name="pg_3167"    element="Page3" state="0">      <bounds x=" 42" y=" 16" width="5" height="1" />    </bezel>
248      <bezel name="pg_3168"    element="Page3" state="0">      <bounds x=" 48" y=" 10" width="5" height="1" />    </bezel>
249      <bezel name="pg_3169"    element="Page3" state="0">      <bounds x=" 48" y=" 11" width="5" height="1" />    </bezel>
250      <bezel name="pg_3170"    element="Page3" state="0">      <bounds x=" 48" y=" 12" width="5" height="1" />    </bezel>
251      <bezel name="pg_3171"    element="Page3" state="0">      <bounds x=" 48" y=" 13" width="5" height="1" />    </bezel>
252      <bezel name="pg_3172"    element="Page3" state="0">      <bounds x=" 48" y=" 14" width="5" height="1" />    </bezel>
253      <bezel name="pg_3173"    element="Page3" state="0">      <bounds x=" 48" y=" 15" width="5" height="1" />    </bezel>
254      <bezel name="pg_3174"    element="Page3" state="0">      <bounds x=" 48" y=" 16" width="5" height="1" />    </bezel>
255      <bezel name="pg_3175"    element="Page3" state="0">      <bounds x=" 54" y=" 10" width="5" height="1" />    </bezel>
256      <bezel name="pg_3176"    element="Page3" state="0">      <bounds x=" 54" y=" 11" width="5" height="1" />    </bezel>
257      <bezel name="pg_3177"    element="Page3" state="0">      <bounds x=" 54" y=" 12" width="5" height="1" />    </bezel>
258      <bezel name="pg_3178"    element="Page3" state="0">      <bounds x=" 54" y=" 13" width="5" height="1" />    </bezel>
259      <bezel name="pg_3179"    element="Page3" state="0">      <bounds x=" 54" y=" 14" width="5" height="1" />    </bezel>
260      <bezel name="pg_3180"    element="Page3" state="0">      <bounds x=" 54" y=" 15" width="5" height="1" />    </bezel>
261      <bezel name="pg_3181"    element="Page3" state="0">      <bounds x=" 54" y=" 16" width="5" height="1" />    </bezel>
262      <bezel name="pg_3182"    element="Page3" state="0">      <bounds x=" 60" y=" 10" width="5" height="1" />    </bezel>
263      <bezel name="pg_3183"    element="Page3" state="0">      <bounds x=" 60" y=" 11" width="5" height="1" />    </bezel>
264      <bezel name="pg_3184"    element="Page3" state="0">      <bounds x=" 60" y=" 12" width="5" height="1" />    </bezel>
265      <bezel name="pg_3185"    element="Page3" state="0">      <bounds x=" 60" y=" 13" width="5" height="1" />    </bezel>
266      <bezel name="pg_3186"    element="Page3" state="0">      <bounds x=" 60" y=" 14" width="5" height="1" />    </bezel>
267      <bezel name="pg_3187"    element="Page3" state="0">      <bounds x=" 60" y=" 15" width="5" height="1" />    </bezel>
268      <bezel name="pg_3188"    element="Page3" state="0">      <bounds x=" 60" y=" 16" width="5" height="1" />    </bezel>
269      <bezel name="pg_3189"    element="Page3" state="0">      <bounds x=" 66" y=" 10" width="5" height="1" />    </bezel>
270      <bezel name="pg_3190"    element="Page3" state="0">      <bounds x=" 66" y=" 11" width="5" height="1" />    </bezel>
271      <bezel name="pg_3191"    element="Page3" state="0">      <bounds x=" 66" y=" 12" width="5" height="1" />    </bezel>
272      <bezel name="pg_3192"    element="Page3" state="0">      <bounds x=" 66" y=" 13" width="5" height="1" />    </bezel>
273      <bezel name="pg_3193"    element="Page3" state="0">      <bounds x=" 66" y=" 14" width="5" height="1" />    </bezel>
274      <bezel name="pg_3194"    element="Page3" state="0">      <bounds x=" 66" y=" 15" width="5" height="1" />    </bezel>
275      <bezel name="pg_3195"    element="Page3" state="0">      <bounds x=" 66" y=" 16" width="5" height="1" />    </bezel>
276      <bezel name="pg_3196"    element="Page3" state="0">      <bounds x=" 72" y=" 10" width="5" height="1" />    </bezel>
277      <bezel name="pg_3197"    element="Page3" state="0">      <bounds x=" 72" y=" 11" width="5" height="1" />    </bezel>
278      <bezel name="pg_3198"    element="Page3" state="0">      <bounds x=" 72" y=" 12" width="5" height="1" />    </bezel>
279      <bezel name="pg_3199"    element="Page3" state="0">      <bounds x=" 72" y=" 13" width="5" height="1" />    </bezel>
280      <bezel name="pg_3200"    element="Page3" state="0">      <bounds x=" 72" y=" 14" width="5" height="1" />    </bezel>
281      <bezel name="pg_3201"    element="Page3" state="0">      <bounds x=" 72" y=" 15" width="5" height="1" />    </bezel>
282      <bezel name="pg_3202"    element="Page3" state="0">      <bounds x=" 72" y=" 16" width="5" height="1" />    </bezel>
283      <bezel name="pg_3203"    element="Page3" state="0">      <bounds x=" 78" y=" 10" width="5" height="1" />    </bezel>
284      <bezel name="pg_3204"    element="Page3" state="0">      <bounds x=" 78" y=" 11" width="5" height="1" />    </bezel>
285      <bezel name="pg_3205"    element="Page3" state="0">      <bounds x=" 78" y=" 12" width="5" height="1" />    </bezel>
286      <bezel name="pg_3206"    element="Page3" state="0">      <bounds x=" 78" y=" 13" width="5" height="1" />    </bezel>
287      <bezel name="pg_3207"    element="Page3" state="0">      <bounds x=" 78" y=" 14" width="5" height="1" />    </bezel>
288      <bezel name="pg_3208"    element="Page3" state="0">      <bounds x=" 78" y=" 15" width="5" height="1" />    </bezel>
289      <bezel name="pg_3209"    element="Page3" state="0">      <bounds x=" 78" y=" 16" width="5" height="1" />    </bezel>
290      <bezel name="pg_3210"    element="Page3" state="0">      <bounds x=" 84" y=" 10" width="5" height="1" />    </bezel>
291      <bezel name="pg_3211"    element="Page3" state="0">      <bounds x=" 84" y=" 11" width="5" height="1" />    </bezel>
292      <bezel name="pg_3212"    element="Page3" state="0">      <bounds x=" 84" y=" 12" width="5" height="1" />    </bezel>
293      <bezel name="pg_3213"    element="Page3" state="0">      <bounds x=" 84" y=" 13" width="5" height="1" />    </bezel>
294      <bezel name="pg_3214"    element="Page3" state="0">      <bounds x=" 84" y=" 14" width="5" height="1" />    </bezel>
295      <bezel name="pg_3215"    element="Page3" state="0">      <bounds x=" 84" y=" 15" width="5" height="1" />    </bezel>
296      <bezel name="pg_3216"    element="Page3" state="0">      <bounds x=" 84" y=" 16" width="5" height="1" />    </bezel>
297      <bezel name="pg_3217"    element="Page3" state="0">      <bounds x=" 90" y=" 10" width="5" height="1" />    </bezel>
298      <bezel name="pg_3218"    element="Page3" state="0">      <bounds x=" 90" y=" 11" width="5" height="1" />    </bezel>
299      <bezel name="pg_3219"    element="Page3" state="0">      <bounds x=" 90" y=" 12" width="5" height="1" />    </bezel>
300      <bezel name="pg_3220"    element="Page3" state="0">      <bounds x=" 90" y=" 13" width="5" height="1" />    </bezel>
301      <bezel name="pg_3221"    element="Page3" state="0">      <bounds x=" 90" y=" 14" width="5" height="1" />    </bezel>
302      <bezel name="pg_3222"    element="Page3" state="0">      <bounds x=" 90" y=" 15" width="5" height="1" />    </bezel>
303      <bezel name="pg_3223"    element="Page3" state="0">      <bounds x=" 90" y=" 16" width="5" height="1" />    </bezel>
76      <bezel name="rLed_6"  element="rLeds">      <bounds x="260" y="20" width="5" height="3" />      </bezel>
77      <bezel name="rLed_7"  element="rLeds">      <bounds x="270" y="20" width="5" height="3" />      </bezel>
78      <bezel name="rLed_14" element="rLeds">      <bounds x="280" y="20" width="5" height="3" />      </bezel>
79      <bezel name="rLed_15" element="rLeds">      <bounds x="290" y="20" width="5" height="3" />      </bezel>
80      <bezel name="pg_3000"    element="Page3" state="0">     <bounds x="  0" y="  0" width="5" height="1" />     </bezel>
81      <bezel name="pg_3001"    element="Page3" state="0">     <bounds x="  0" y="  1" width="5" height="1" />     </bezel>
82      <bezel name="pg_3002"    element="Page3" state="0">     <bounds x="  0" y="  2" width="5" height="1" />     </bezel>
83      <bezel name="pg_3003"    element="Page3" state="0">     <bounds x="  0" y="  3" width="5" height="1" />     </bezel>
84      <bezel name="pg_3004"    element="Page3" state="0">     <bounds x="  0" y="  4" width="5" height="1" />     </bezel>
85      <bezel name="pg_3005"    element="Page3" state="0">     <bounds x="  0" y="  5" width="5" height="1" />     </bezel>
86      <bezel name="pg_3006"    element="Page3" state="0">     <bounds x="  0" y="  6" width="5" height="1" />     </bezel>
87      <bezel name="pg_3007"    element="Page3" state="0">     <bounds x="  6" y="  0" width="5" height="1" />     </bezel>
88      <bezel name="pg_3008"    element="Page3" state="0">     <bounds x="  6" y="  1" width="5" height="1" />     </bezel>
89      <bezel name="pg_3009"    element="Page3" state="0">     <bounds x="  6" y="  2" width="5" height="1" />     </bezel>
90      <bezel name="pg_3010"    element="Page3" state="0">     <bounds x="  6" y="  3" width="5" height="1" />     </bezel>
91      <bezel name="pg_3011"    element="Page3" state="0">     <bounds x="  6" y="  4" width="5" height="1" />     </bezel>
92      <bezel name="pg_3012"    element="Page3" state="0">     <bounds x="  6" y="  5" width="5" height="1" />     </bezel>
93      <bezel name="pg_3013"    element="Page3" state="0">     <bounds x="  6" y="  6" width="5" height="1" />     </bezel>
94      <bezel name="pg_3014"    element="Page3" state="0">     <bounds x=" 12" y="  0" width="5" height="1" />     </bezel>
95      <bezel name="pg_3015"    element="Page3" state="0">     <bounds x=" 12" y="  1" width="5" height="1" />     </bezel>
96      <bezel name="pg_3016"    element="Page3" state="0">     <bounds x=" 12" y="  2" width="5" height="1" />     </bezel>
97      <bezel name="pg_3017"    element="Page3" state="0">     <bounds x=" 12" y="  3" width="5" height="1" />     </bezel>
98      <bezel name="pg_3018"    element="Page3" state="0">     <bounds x=" 12" y="  4" width="5" height="1" />     </bezel>
99      <bezel name="pg_3019"    element="Page3" state="0">     <bounds x=" 12" y="  5" width="5" height="1" />     </bezel>
100      <bezel name="pg_3020"    element="Page3" state="0">     <bounds x=" 12" y="  6" width="5" height="1" />     </bezel>
101      <bezel name="pg_3021"    element="Page3" state="0">     <bounds x=" 18" y="  0" width="5" height="1" />     </bezel>
102      <bezel name="pg_3022"    element="Page3" state="0">     <bounds x=" 18" y="  1" width="5" height="1" />     </bezel>
103      <bezel name="pg_3023"    element="Page3" state="0">     <bounds x=" 18" y="  2" width="5" height="1" />     </bezel>
104      <bezel name="pg_3024"    element="Page3" state="0">     <bounds x=" 18" y="  3" width="5" height="1" />     </bezel>
105      <bezel name="pg_3025"    element="Page3" state="0">     <bounds x=" 18" y="  4" width="5" height="1" />     </bezel>
106      <bezel name="pg_3026"    element="Page3" state="0">     <bounds x=" 18" y="  5" width="5" height="1" />     </bezel>
107      <bezel name="pg_3027"    element="Page3" state="0">     <bounds x=" 18" y="  6" width="5" height="1" />     </bezel>
108      <bezel name="pg_3028"    element="Page3" state="0">     <bounds x=" 24" y="  0" width="5" height="1" />     </bezel>
109      <bezel name="pg_3029"    element="Page3" state="0">     <bounds x=" 24" y="  1" width="5" height="1" />     </bezel>
110      <bezel name="pg_3030"    element="Page3" state="0">     <bounds x=" 24" y="  2" width="5" height="1" />     </bezel>
111      <bezel name="pg_3031"    element="Page3" state="0">     <bounds x=" 24" y="  3" width="5" height="1" />     </bezel>
112      <bezel name="pg_3032"    element="Page3" state="0">     <bounds x=" 24" y="  4" width="5" height="1" />     </bezel>
113      <bezel name="pg_3033"    element="Page3" state="0">     <bounds x=" 24" y="  5" width="5" height="1" />     </bezel>
114      <bezel name="pg_3034"    element="Page3" state="0">     <bounds x=" 24" y="  6" width="5" height="1" />     </bezel>
115      <bezel name="pg_3035"    element="Page3" state="0">     <bounds x=" 30" y="  0" width="5" height="1" />     </bezel>
116      <bezel name="pg_3036"    element="Page3" state="0">     <bounds x=" 30" y="  1" width="5" height="1" />     </bezel>
117      <bezel name="pg_3037"    element="Page3" state="0">     <bounds x=" 30" y="  2" width="5" height="1" />     </bezel>
118      <bezel name="pg_3038"    element="Page3" state="0">     <bounds x=" 30" y="  3" width="5" height="1" />     </bezel>
119      <bezel name="pg_3039"    element="Page3" state="0">     <bounds x=" 30" y="  4" width="5" height="1" />     </bezel>
120      <bezel name="pg_3040"    element="Page3" state="0">     <bounds x=" 30" y="  5" width="5" height="1" />     </bezel>
121      <bezel name="pg_3041"    element="Page3" state="0">     <bounds x=" 30" y="  6" width="5" height="1" />     </bezel>
122      <bezel name="pg_3042"    element="Page3" state="0">     <bounds x=" 36" y="  0" width="5" height="1" />     </bezel>
123      <bezel name="pg_3043"    element="Page3" state="0">     <bounds x=" 36" y="  1" width="5" height="1" />     </bezel>
124      <bezel name="pg_3044"    element="Page3" state="0">     <bounds x=" 36" y="  2" width="5" height="1" />     </bezel>
125      <bezel name="pg_3045"    element="Page3" state="0">     <bounds x=" 36" y="  3" width="5" height="1" />     </bezel>
126      <bezel name="pg_3046"    element="Page3" state="0">     <bounds x=" 36" y="  4" width="5" height="1" />     </bezel>
127      <bezel name="pg_3047"    element="Page3" state="0">     <bounds x=" 36" y="  5" width="5" height="1" />     </bezel>
128      <bezel name="pg_3048"    element="Page3" state="0">     <bounds x=" 36" y="  6" width="5" height="1" />     </bezel>
129      <bezel name="pg_3049"    element="Page3" state="0">     <bounds x=" 42" y="  0" width="5" height="1" />     </bezel>
130      <bezel name="pg_3050"    element="Page3" state="0">     <bounds x=" 42" y="  1" width="5" height="1" />     </bezel>
131      <bezel name="pg_3051"    element="Page3" state="0">     <bounds x=" 42" y="  2" width="5" height="1" />     </bezel>
132      <bezel name="pg_3052"    element="Page3" state="0">     <bounds x=" 42" y="  3" width="5" height="1" />     </bezel>
133      <bezel name="pg_3053"    element="Page3" state="0">     <bounds x=" 42" y="  4" width="5" height="1" />     </bezel>
134      <bezel name="pg_3054"    element="Page3" state="0">     <bounds x=" 42" y="  5" width="5" height="1" />     </bezel>
135      <bezel name="pg_3055"    element="Page3" state="0">     <bounds x=" 42" y="  6" width="5" height="1" />     </bezel>
136      <bezel name="pg_3056"    element="Page3" state="0">     <bounds x=" 48" y="  0" width="5" height="1" />     </bezel>
137      <bezel name="pg_3057"    element="Page3" state="0">     <bounds x=" 48" y="  1" width="5" height="1" />     </bezel>
138      <bezel name="pg_3058"    element="Page3" state="0">     <bounds x=" 48" y="  2" width="5" height="1" />     </bezel>
139      <bezel name="pg_3059"    element="Page3" state="0">     <bounds x=" 48" y="  3" width="5" height="1" />     </bezel>
140      <bezel name="pg_3060"    element="Page3" state="0">     <bounds x=" 48" y="  4" width="5" height="1" />     </bezel>
141      <bezel name="pg_3061"    element="Page3" state="0">     <bounds x=" 48" y="  5" width="5" height="1" />     </bezel>
142      <bezel name="pg_3062"    element="Page3" state="0">     <bounds x=" 48" y="  6" width="5" height="1" />     </bezel>
143      <bezel name="pg_3063"    element="Page3" state="0">     <bounds x=" 54" y="  0" width="5" height="1" />     </bezel>
144      <bezel name="pg_3064"    element="Page3" state="0">     <bounds x=" 54" y="  1" width="5" height="1" />     </bezel>
145      <bezel name="pg_3065"    element="Page3" state="0">     <bounds x=" 54" y="  2" width="5" height="1" />     </bezel>
146      <bezel name="pg_3066"    element="Page3" state="0">     <bounds x=" 54" y="  3" width="5" height="1" />     </bezel>
147      <bezel name="pg_3067"    element="Page3" state="0">     <bounds x=" 54" y="  4" width="5" height="1" />     </bezel>
148      <bezel name="pg_3068"    element="Page3" state="0">     <bounds x=" 54" y="  5" width="5" height="1" />     </bezel>
149      <bezel name="pg_3069"    element="Page3" state="0">     <bounds x=" 54" y="  6" width="5" height="1" />     </bezel>
150      <bezel name="pg_3070"    element="Page3" state="0">     <bounds x=" 60" y="  0" width="5" height="1" />     </bezel>
151      <bezel name="pg_3071"    element="Page3" state="0">     <bounds x=" 60" y="  1" width="5" height="1" />     </bezel>
152      <bezel name="pg_3072"    element="Page3" state="0">     <bounds x=" 60" y="  2" width="5" height="1" />     </bezel>
153      <bezel name="pg_3073"    element="Page3" state="0">     <bounds x=" 60" y="  3" width="5" height="1" />     </bezel>
154      <bezel name="pg_3074"    element="Page3" state="0">     <bounds x=" 60" y="  4" width="5" height="1" />     </bezel>
155      <bezel name="pg_3075"    element="Page3" state="0">     <bounds x=" 60" y="  5" width="5" height="1" />     </bezel>
156      <bezel name="pg_3076"    element="Page3" state="0">     <bounds x=" 60" y="  6" width="5" height="1" />     </bezel>
157      <bezel name="pg_3077"    element="Page3" state="0">     <bounds x=" 66" y="  0" width="5" height="1" />     </bezel>
158      <bezel name="pg_3078"    element="Page3" state="0">     <bounds x=" 66" y="  1" width="5" height="1" />     </bezel>
159      <bezel name="pg_3079"    element="Page3" state="0">     <bounds x=" 66" y="  2" width="5" height="1" />     </bezel>
160      <bezel name="pg_3080"    element="Page3" state="0">     <bounds x=" 66" y="  3" width="5" height="1" />     </bezel>
161      <bezel name="pg_3081"    element="Page3" state="0">     <bounds x=" 66" y="  4" width="5" height="1" />     </bezel>
162      <bezel name="pg_3082"    element="Page3" state="0">     <bounds x=" 66" y="  5" width="5" height="1" />     </bezel>
163      <bezel name="pg_3083"    element="Page3" state="0">     <bounds x=" 66" y="  6" width="5" height="1" />     </bezel>
164      <bezel name="pg_3084"    element="Page3" state="0">     <bounds x=" 72" y="  0" width="5" height="1" />     </bezel>
165      <bezel name="pg_3085"    element="Page3" state="0">     <bounds x=" 72" y="  1" width="5" height="1" />     </bezel>
166      <bezel name="pg_3086"    element="Page3" state="0">     <bounds x=" 72" y="  2" width="5" height="1" />     </bezel>
167      <bezel name="pg_3087"    element="Page3" state="0">     <bounds x=" 72" y="  3" width="5" height="1" />     </bezel>
168      <bezel name="pg_3088"    element="Page3" state="0">     <bounds x=" 72" y="  4" width="5" height="1" />     </bezel>
169      <bezel name="pg_3089"    element="Page3" state="0">     <bounds x=" 72" y="  5" width="5" height="1" />     </bezel>
170      <bezel name="pg_3090"    element="Page3" state="0">     <bounds x=" 72" y="  6" width="5" height="1" />     </bezel>
171      <bezel name="pg_3091"    element="Page3" state="0">     <bounds x=" 78" y="  0" width="5" height="1" />     </bezel>
172      <bezel name="pg_3092"    element="Page3" state="0">     <bounds x=" 78" y="  1" width="5" height="1" />     </bezel>
173      <bezel name="pg_3093"    element="Page3" state="0">     <bounds x=" 78" y="  2" width="5" height="1" />     </bezel>
174      <bezel name="pg_3094"    element="Page3" state="0">     <bounds x=" 78" y="  3" width="5" height="1" />     </bezel>
175      <bezel name="pg_3095"    element="Page3" state="0">     <bounds x=" 78" y="  4" width="5" height="1" />     </bezel>
176      <bezel name="pg_3096"    element="Page3" state="0">     <bounds x=" 78" y="  5" width="5" height="1" />     </bezel>
177      <bezel name="pg_3097"    element="Page3" state="0">     <bounds x=" 78" y="  6" width="5" height="1" />     </bezel>
178      <bezel name="pg_3098"    element="Page3" state="0">     <bounds x=" 84" y="  0" width="5" height="1" />     </bezel>
179      <bezel name="pg_3099"    element="Page3" state="0">     <bounds x=" 84" y="  1" width="5" height="1" />     </bezel>
180      <bezel name="pg_3100"    element="Page3" state="0">     <bounds x=" 84" y="  2" width="5" height="1" />     </bezel>
181      <bezel name="pg_3101"    element="Page3" state="0">     <bounds x=" 84" y="  3" width="5" height="1" />     </bezel>
182      <bezel name="pg_3102"    element="Page3" state="0">     <bounds x=" 84" y="  4" width="5" height="1" />     </bezel>
183      <bezel name="pg_3103"    element="Page3" state="0">     <bounds x=" 84" y="  5" width="5" height="1" />     </bezel>
184      <bezel name="pg_3104"    element="Page3" state="0">     <bounds x=" 84" y="  6" width="5" height="1" />     </bezel>
185      <bezel name="pg_3105"    element="Page3" state="0">     <bounds x=" 90" y="  0" width="5" height="1" />     </bezel>
186      <bezel name="pg_3106"    element="Page3" state="0">     <bounds x=" 90" y="  1" width="5" height="1" />     </bezel>
187      <bezel name="pg_3107"    element="Page3" state="0">     <bounds x=" 90" y="  2" width="5" height="1" />     </bezel>
188      <bezel name="pg_3108"    element="Page3" state="0">     <bounds x=" 90" y="  3" width="5" height="1" />     </bezel>
189      <bezel name="pg_3109"    element="Page3" state="0">     <bounds x=" 90" y="  4" width="5" height="1" />     </bezel>
190      <bezel name="pg_3110"    element="Page3" state="0">     <bounds x=" 90" y="  5" width="5" height="1" />     </bezel>
191      <bezel name="pg_3111"    element="Page3" state="0">     <bounds x=" 90" y="  6" width="5" height="1" />     </bezel>
192      <bezel name="pg_3112"    element="Page3" state="0">     <bounds x="  0" y=" 10" width="5" height="1" />     </bezel>
193      <bezel name="pg_3113"    element="Page3" state="0">     <bounds x="  0" y=" 11" width="5" height="1" />     </bezel>
194      <bezel name="pg_3114"    element="Page3" state="0">     <bounds x="  0" y=" 12" width="5" height="1" />     </bezel>
195      <bezel name="pg_3115"    element="Page3" state="0">     <bounds x="  0" y=" 13" width="5" height="1" />     </bezel>
196      <bezel name="pg_3116"    element="Page3" state="0">     <bounds x="  0" y=" 14" width="5" height="1" />     </bezel>
197      <bezel name="pg_3117"    element="Page3" state="0">     <bounds x="  0" y=" 15" width="5" height="1" />     </bezel>
198      <bezel name="pg_3118"    element="Page3" state="0">     <bounds x="  0" y=" 16" width="5" height="1" />     </bezel>
199      <bezel name="pg_3119"    element="Page3" state="0">     <bounds x="  6" y=" 10" width="5" height="1" />     </bezel>
200      <bezel name="pg_3120"    element="Page3" state="0">     <bounds x="  6" y=" 11" width="5" height="1" />     </bezel>
201      <bezel name="pg_3121"    element="Page3" state="0">     <bounds x="  6" y=" 12" width="5" height="1" />     </bezel>
202      <bezel name="pg_3122"    element="Page3" state="0">     <bounds x="  6" y=" 13" width="5" height="1" />     </bezel>
203      <bezel name="pg_3123"    element="Page3" state="0">     <bounds x="  6" y=" 14" width="5" height="1" />     </bezel>
204      <bezel name="pg_3124"    element="Page3" state="0">     <bounds x="  6" y=" 15" width="5" height="1" />     </bezel>
205      <bezel name="pg_3125"    element="Page3" state="0">     <bounds x="  6" y=" 16" width="5" height="1" />     </bezel>
206      <bezel name="pg_3126"    element="Page3" state="0">     <bounds x=" 12" y=" 10" width="5" height="1" />     </bezel>
207      <bezel name="pg_3127"    element="Page3" state="0">     <bounds x=" 12" y=" 11" width="5" height="1" />     </bezel>
208      <bezel name="pg_3128"    element="Page3" state="0">     <bounds x=" 12" y=" 12" width="5" height="1" />     </bezel>
209      <bezel name="pg_3129"    element="Page3" state="0">     <bounds x=" 12" y=" 13" width="5" height="1" />     </bezel>
210      <bezel name="pg_3130"    element="Page3" state="0">     <bounds x=" 12" y=" 14" width="5" height="1" />     </bezel>
211      <bezel name="pg_3131"    element="Page3" state="0">     <bounds x=" 12" y=" 15" width="5" height="1" />     </bezel>
212      <bezel name="pg_3132"    element="Page3" state="0">     <bounds x=" 12" y=" 16" width="5" height="1" />     </bezel>
213      <bezel name="pg_3133"    element="Page3" state="0">     <bounds x=" 18" y=" 10" width="5" height="1" />     </bezel>
214      <bezel name="pg_3134"    element="Page3" state="0">     <bounds x=" 18" y=" 11" width="5" height="1" />     </bezel>
215      <bezel name="pg_3135"    element="Page3" state="0">     <bounds x=" 18" y=" 12" width="5" height="1" />     </bezel>
216      <bezel name="pg_3136"    element="Page3" state="0">     <bounds x=" 18" y=" 13" width="5" height="1" />     </bezel>
217      <bezel name="pg_3137"    element="Page3" state="0">     <bounds x=" 18" y=" 14" width="5" height="1" />     </bezel>
218      <bezel name="pg_3138"    element="Page3" state="0">     <bounds x=" 18" y=" 15" width="5" height="1" />     </bezel>
219      <bezel name="pg_3139"    element="Page3" state="0">     <bounds x=" 18" y=" 16" width="5" height="1" />     </bezel>
220      <bezel name="pg_3140"    element="Page3" state="0">     <bounds x=" 24" y=" 10" width="5" height="1" />     </bezel>
221      <bezel name="pg_3141"    element="Page3" state="0">     <bounds x=" 24" y=" 11" width="5" height="1" />     </bezel>
222      <bezel name="pg_3142"    element="Page3" state="0">     <bounds x=" 24" y=" 12" width="5" height="1" />     </bezel>
223      <bezel name="pg_3143"    element="Page3" state="0">     <bounds x=" 24" y=" 13" width="5" height="1" />     </bezel>
224      <bezel name="pg_3144"    element="Page3" state="0">     <bounds x=" 24" y=" 14" width="5" height="1" />     </bezel>
225      <bezel name="pg_3145"    element="Page3" state="0">     <bounds x=" 24" y=" 15" width="5" height="1" />     </bezel>
226      <bezel name="pg_3146"    element="Page3" state="0">     <bounds x=" 24" y=" 16" width="5" height="1" />     </bezel>
227      <bezel name="pg_3147"    element="Page3" state="0">     <bounds x=" 30" y=" 10" width="5" height="1" />     </bezel>
228      <bezel name="pg_3148"    element="Page3" state="0">     <bounds x=" 30" y=" 11" width="5" height="1" />     </bezel>
229      <bezel name="pg_3149"    element="Page3" state="0">     <bounds x=" 30" y=" 12" width="5" height="1" />     </bezel>
230      <bezel name="pg_3150"    element="Page3" state="0">     <bounds x=" 30" y=" 13" width="5" height="1" />     </bezel>
231      <bezel name="pg_3151"    element="Page3" state="0">     <bounds x=" 30" y=" 14" width="5" height="1" />     </bezel>
232      <bezel name="pg_3152"    element="Page3" state="0">     <bounds x=" 30" y=" 15" width="5" height="1" />     </bezel>
233      <bezel name="pg_3153"    element="Page3" state="0">     <bounds x=" 30" y=" 16" width="5" height="1" />     </bezel>
234      <bezel name="pg_3154"    element="Page3" state="0">     <bounds x=" 36" y=" 10" width="5" height="1" />     </bezel>
235      <bezel name="pg_3155"    element="Page3" state="0">     <bounds x=" 36" y=" 11" width="5" height="1" />     </bezel>
236      <bezel name="pg_3156"    element="Page3" state="0">     <bounds x=" 36" y=" 12" width="5" height="1" />     </bezel>
237      <bezel name="pg_3157"    element="Page3" state="0">     <bounds x=" 36" y=" 13" width="5" height="1" />     </bezel>
238      <bezel name="pg_3158"    element="Page3" state="0">     <bounds x=" 36" y=" 14" width="5" height="1" />     </bezel>
239      <bezel name="pg_3159"    element="Page3" state="0">     <bounds x=" 36" y=" 15" width="5" height="1" />     </bezel>
240      <bezel name="pg_3160"    element="Page3" state="0">     <bounds x=" 36" y=" 16" width="5" height="1" />     </bezel>
241      <bezel name="pg_3161"    element="Page3" state="0">     <bounds x=" 42" y=" 10" width="5" height="1" />     </bezel>
242      <bezel name="pg_3162"    element="Page3" state="0">     <bounds x=" 42" y=" 11" width="5" height="1" />     </bezel>
243      <bezel name="pg_3163"    element="Page3" state="0">     <bounds x=" 42" y=" 12" width="5" height="1" />     </bezel>
244      <bezel name="pg_3164"    element="Page3" state="0">     <bounds x=" 42" y=" 13" width="5" height="1" />     </bezel>
245      <bezel name="pg_3165"    element="Page3" state="0">     <bounds x=" 42" y=" 14" width="5" height="1" />     </bezel>
246      <bezel name="pg_3166"    element="Page3" state="0">     <bounds x=" 42" y=" 15" width="5" height="1" />     </bezel>
247      <bezel name="pg_3167"    element="Page3" state="0">     <bounds x=" 42" y=" 16" width="5" height="1" />     </bezel>
248      <bezel name="pg_3168"    element="Page3" state="0">     <bounds x=" 48" y=" 10" width="5" height="1" />     </bezel>
249      <bezel name="pg_3169"    element="Page3" state="0">     <bounds x=" 48" y=" 11" width="5" height="1" />     </bezel>
250      <bezel name="pg_3170"    element="Page3" state="0">     <bounds x=" 48" y=" 12" width="5" height="1" />     </bezel>
251      <bezel name="pg_3171"    element="Page3" state="0">     <bounds x=" 48" y=" 13" width="5" height="1" />     </bezel>
252      <bezel name="pg_3172"    element="Page3" state="0">     <bounds x=" 48" y=" 14" width="5" height="1" />     </bezel>
253      <bezel name="pg_3173"    element="Page3" state="0">     <bounds x=" 48" y=" 15" width="5" height="1" />     </bezel>
254      <bezel name="pg_3174"    element="Page3" state="0">     <bounds x=" 48" y=" 16" width="5" height="1" />     </bezel>
255      <bezel name="pg_3175"    element="Page3" state="0">     <bounds x=" 54" y=" 10" width="5" height="1" />     </bezel>
256      <bezel name="pg_3176"    element="Page3" state="0">     <bounds x=" 54" y=" 11" width="5" height="1" />     </bezel>
257      <bezel name="pg_3177"    element="Page3" state="0">     <bounds x=" 54" y=" 12" width="5" height="1" />     </bezel>
258      <bezel name="pg_3178"    element="Page3" state="0">     <bounds x=" 54" y=" 13" width="5" height="1" />     </bezel>
259      <bezel name="pg_3179"    element="Page3" state="0">     <bounds x=" 54" y=" 14" width="5" height="1" />     </bezel>
260      <bezel name="pg_3180"    element="Page3" state="0">     <bounds x=" 54" y=" 15" width="5" height="1" />     </bezel>
261      <bezel name="pg_3181"    element="Page3" state="0">     <bounds x=" 54" y=" 16" width="5" height="1" />     </bezel>
262      <bezel name="pg_3182"    element="Page3" state="0">     <bounds x=" 60" y=" 10" width="5" height="1" />     </bezel>
263      <bezel name="pg_3183"    element="Page3" state="0">     <bounds x=" 60" y=" 11" width="5" height="1" />     </bezel>
264      <bezel name="pg_3184"    element="Page3" state="0">     <bounds x=" 60" y=" 12" width="5" height="1" />     </bezel>
265      <bezel name="pg_3185"    element="Page3" state="0">     <bounds x=" 60" y=" 13" width="5" height="1" />     </bezel>
266      <bezel name="pg_3186"    element="Page3" state="0">     <bounds x=" 60" y=" 14" width="5" height="1" />     </bezel>
267      <bezel name="pg_3187"    element="Page3" state="0">     <bounds x=" 60" y=" 15" width="5" height="1" />     </bezel>
268      <bezel name="pg_3188"    element="Page3" state="0">     <bounds x=" 60" y=" 16" width="5" height="1" />     </bezel>
269      <bezel name="pg_3189"    element="Page3" state="0">     <bounds x=" 66" y=" 10" width="5" height="1" />     </bezel>
270      <bezel name="pg_3190"    element="Page3" state="0">     <bounds x=" 66" y=" 11" width="5" height="1" />     </bezel>
271      <bezel name="pg_3191"    element="Page3" state="0">     <bounds x=" 66" y=" 12" width="5" height="1" />     </bezel>
272      <bezel name="pg_3192"    element="Page3" state="0">     <bounds x=" 66" y=" 13" width="5" height="1" />     </bezel>
273      <bezel name="pg_3193"    element="Page3" state="0">     <bounds x=" 66" y=" 14" width="5" height="1" />     </bezel>
274      <bezel name="pg_3194"    element="Page3" state="0">     <bounds x=" 66" y=" 15" width="5" height="1" />     </bezel>
275      <bezel name="pg_3195"    element="Page3" state="0">     <bounds x=" 66" y=" 16" width="5" height="1" />     </bezel>
276      <bezel name="pg_3196"    element="Page3" state="0">     <bounds x=" 72" y=" 10" width="5" height="1" />     </bezel>
277      <bezel name="pg_3197"    element="Page3" state="0">     <bounds x=" 72" y=" 11" width="5" height="1" />     </bezel>
278      <bezel name="pg_3198"    element="Page3" state="0">     <bounds x=" 72" y=" 12" width="5" height="1" />     </bezel>
279      <bezel name="pg_3199"    element="Page3" state="0">     <bounds x=" 72" y=" 13" width="5" height="1" />     </bezel>
280      <bezel name="pg_3200"    element="Page3" state="0">     <bounds x=" 72" y=" 14" width="5" height="1" />     </bezel>
281      <bezel name="pg_3201"    element="Page3" state="0">     <bounds x=" 72" y=" 15" width="5" height="1" />     </bezel>
282      <bezel name="pg_3202"    element="Page3" state="0">     <bounds x=" 72" y=" 16" width="5" height="1" />     </bezel>
283      <bezel name="pg_3203"    element="Page3" state="0">     <bounds x=" 78" y=" 10" width="5" height="1" />     </bezel>
284      <bezel name="pg_3204"    element="Page3" state="0">     <bounds x=" 78" y=" 11" width="5" height="1" />     </bezel>
285      <bezel name="pg_3205"    element="Page3" state="0">     <bounds x=" 78" y=" 12" width="5" height="1" />     </bezel>
286      <bezel name="pg_3206"    element="Page3" state="0">     <bounds x=" 78" y=" 13" width="5" height="1" />     </bezel>
287      <bezel name="pg_3207"    element="Page3" state="0">     <bounds x=" 78" y=" 14" width="5" height="1" />     </bezel>
288      <bezel name="pg_3208"    element="Page3" state="0">     <bounds x=" 78" y=" 15" width="5" height="1" />     </bezel>
289      <bezel name="pg_3209"    element="Page3" state="0">     <bounds x=" 78" y=" 16" width="5" height="1" />     </bezel>
290      <bezel name="pg_3210"    element="Page3" state="0">     <bounds x=" 84" y=" 10" width="5" height="1" />     </bezel>
291      <bezel name="pg_3211"    element="Page3" state="0">     <bounds x=" 84" y=" 11" width="5" height="1" />     </bezel>
292      <bezel name="pg_3212"    element="Page3" state="0">     <bounds x=" 84" y=" 12" width="5" height="1" />     </bezel>
293      <bezel name="pg_3213"    element="Page3" state="0">     <bounds x=" 84" y=" 13" width="5" height="1" />     </bezel>
294      <bezel name="pg_3214"    element="Page3" state="0">     <bounds x=" 84" y=" 14" width="5" height="1" />     </bezel>
295      <bezel name="pg_3215"    element="Page3" state="0">     <bounds x=" 84" y=" 15" width="5" height="1" />     </bezel>
296      <bezel name="pg_3216"    element="Page3" state="0">     <bounds x=" 84" y=" 16" width="5" height="1" />     </bezel>
297      <bezel name="pg_3217"    element="Page3" state="0">     <bounds x=" 90" y=" 10" width="5" height="1" />     </bezel>
298      <bezel name="pg_3218"    element="Page3" state="0">     <bounds x=" 90" y=" 11" width="5" height="1" />     </bezel>
299      <bezel name="pg_3219"    element="Page3" state="0">     <bounds x=" 90" y=" 12" width="5" height="1" />     </bezel>
300      <bezel name="pg_3220"    element="Page3" state="0">     <bounds x=" 90" y=" 13" width="5" height="1" />     </bezel>
301      <bezel name="pg_3221"    element="Page3" state="0">     <bounds x=" 90" y=" 14" width="5" height="1" />     </bezel>
302      <bezel name="pg_3222"    element="Page3" state="0">     <bounds x=" 90" y=" 15" width="5" height="1" />     </bezel>
303      <bezel name="pg_3223"    element="Page3" state="0">     <bounds x=" 90" y=" 16" width="5" height="1" />     </bezel>
304304
305      <bezel name="pg_2000"    element="Page2" state="0">      <bounds x="  0" y=" 20" width="5" height="1" />    </bezel>
306      <bezel name="pg_2001"    element="Page2" state="0">      <bounds x="  0" y=" 21" width="5" height="1" />    </bezel>
307      <bezel name="pg_2002"    element="Page2" state="0">      <bounds x="  0" y=" 22" width="5" height="1" />    </bezel>
308      <bezel name="pg_2003"    element="Page2" state="0">      <bounds x="  0" y=" 23" width="5" height="1" />    </bezel>
309      <bezel name="pg_2004"    element="Page2" state="0">      <bounds x="  0" y=" 24" width="5" height="1" />    </bezel>
310      <bezel name="pg_2005"    element="Page2" state="0">      <bounds x="  0" y=" 25" width="5" height="1" />    </bezel>
311      <bezel name="pg_2006"    element="Page2" state="0">      <bounds x="  0" y=" 26" width="5" height="1" />    </bezel>
312      <bezel name="pg_2007"    element="Page2" state="0">      <bounds x="  6" y=" 20" width="5" height="1" />    </bezel>
313      <bezel name="pg_2008"    element="Page2" state="0">      <bounds x="  6" y=" 21" width="5" height="1" />    </bezel>
314      <bezel name="pg_2009"    element="Page2" state="0">      <bounds x="  6" y=" 22" width="5" height="1" />    </bezel>
315      <bezel name="pg_2010"    element="Page2" state="0">      <bounds x="  6" y=" 23" width="5" height="1" />    </bezel>
316      <bezel name="pg_2011"    element="Page2" state="0">      <bounds x="  6" y=" 24" width="5" height="1" />    </bezel>
317      <bezel name="pg_2012"    element="Page2" state="0">      <bounds x="  6" y=" 25" width="5" height="1" />    </bezel>
318      <bezel name="pg_2013"    element="Page2" state="0">      <bounds x="  6" y=" 26" width="5" height="1" />    </bezel>
319      <bezel name="pg_2014"    element="Page2" state="0">      <bounds x=" 12" y=" 20" width="5" height="1" />    </bezel>
320      <bezel name="pg_2015"    element="Page2" state="0">      <bounds x=" 12" y=" 21" width="5" height="1" />    </bezel>
321      <bezel name="pg_2016"    element="Page2" state="0">      <bounds x=" 12" y=" 22" width="5" height="1" />    </bezel>
322      <bezel name="pg_2017"    element="Page2" state="0">      <bounds x=" 12" y=" 23" width="5" height="1" />    </bezel>
323      <bezel name="pg_2018"    element="Page2" state="0">      <bounds x=" 12" y=" 24" width="5" height="1" />    </bezel>
324      <bezel name="pg_2019"    element="Page2" state="0">      <bounds x=" 12" y=" 25" width="5" height="1" />    </bezel>
325      <bezel name="pg_2020"    element="Page2" state="0">      <bounds x=" 12" y=" 26" width="5" height="1" />    </bezel>
326      <bezel name="pg_2021"    element="Page2" state="0">      <bounds x=" 18" y=" 20" width="5" height="1" />    </bezel>
327      <bezel name="pg_2022"    element="Page2" state="0">      <bounds x=" 18" y=" 21" width="5" height="1" />    </bezel>
328      <bezel name="pg_2023"    element="Page2" state="0">      <bounds x=" 18" y=" 22" width="5" height="1" />    </bezel>
329      <bezel name="pg_2024"    element="Page2" state="0">      <bounds x=" 18" y=" 23" width="5" height="1" />    </bezel>
330      <bezel name="pg_2025"    element="Page2" state="0">      <bounds x=" 18" y=" 24" width="5" height="1" />    </bezel>
331      <bezel name="pg_2026"    element="Page2" state="0">      <bounds x=" 18" y=" 25" width="5" height="1" />    </bezel>
332      <bezel name="pg_2027"    element="Page2" state="0">      <bounds x=" 18" y=" 26" width="5" height="1" />    </bezel>
333      <bezel name="pg_2028"    element="Page2" state="0">      <bounds x=" 24" y=" 20" width="5" height="1" />    </bezel>
334      <bezel name="pg_2029"    element="Page2" state="0">      <bounds x=" 24" y=" 21" width="5" height="1" />    </bezel>
335      <bezel name="pg_2030"    element="Page2" state="0">      <bounds x=" 24" y=" 22" width="5" height="1" />    </bezel>
336      <bezel name="pg_2031"    element="Page2" state="0">      <bounds x=" 24" y=" 23" width="5" height="1" />    </bezel>
337      <bezel name="pg_2032"    element="Page2" state="0">      <bounds x=" 24" y=" 24" width="5" height="1" />    </bezel>
338      <bezel name="pg_2033"    element="Page2" state="0">      <bounds x=" 24" y=" 25" width="5" height="1" />    </bezel>
339      <bezel name="pg_2034"    element="Page2" state="0">      <bounds x=" 24" y=" 26" width="5" height="1" />    </bezel>
340      <bezel name="pg_2035"    element="Page2" state="0">      <bounds x=" 30" y=" 20" width="5" height="1" />    </bezel>
341      <bezel name="pg_2036"    element="Page2" state="0">      <bounds x=" 30" y=" 21" width="5" height="1" />    </bezel>
342      <bezel name="pg_2037"    element="Page2" state="0">      <bounds x=" 30" y=" 22" width="5" height="1" />    </bezel>
343      <bezel name="pg_2038"    element="Page2" state="0">      <bounds x=" 30" y=" 23" width="5" height="1" />    </bezel>
344      <bezel name="pg_2039"    element="Page2" state="0">      <bounds x=" 30" y=" 24" width="5" height="1" />    </bezel>
345      <bezel name="pg_2040"    element="Page2" state="0">      <bounds x=" 30" y=" 25" width="5" height="1" />    </bezel>
346      <bezel name="pg_2041"    element="Page2" state="0">      <bounds x=" 30" y=" 26" width="5" height="1" />    </bezel>
347      <bezel name="pg_2042"    element="Page2" state="0">      <bounds x=" 36" y=" 20" width="5" height="1" />    </bezel>
348      <bezel name="pg_2043"    element="Page2" state="0">      <bounds x=" 36" y=" 21" width="5" height="1" />    </bezel>
349      <bezel name="pg_2044"    element="Page2" state="0">      <bounds x=" 36" y=" 22" width="5" height="1" />    </bezel>
350      <bezel name="pg_2045"    element="Page2" state="0">      <bounds x=" 36" y=" 23" width="5" height="1" />    </bezel>
351      <bezel name="pg_2046"    element="Page2" state="0">      <bounds x=" 36" y=" 24" width="5" height="1" />    </bezel>
352      <bezel name="pg_2047"    element="Page2" state="0">      <bounds x=" 36" y=" 25" width="5" height="1" />    </bezel>
353      <bezel name="pg_2048"    element="Page2" state="0">      <bounds x=" 36" y=" 26" width="5" height="1" />    </bezel>
354      <bezel name="pg_2049"    element="Page2" state="0">      <bounds x=" 42" y=" 20" width="5" height="1" />    </bezel>
355      <bezel name="pg_2050"    element="Page2" state="0">      <bounds x=" 42" y=" 21" width="5" height="1" />    </bezel>
356      <bezel name="pg_2051"    element="Page2" state="0">      <bounds x=" 42" y=" 22" width="5" height="1" />    </bezel>
357      <bezel name="pg_2052"    element="Page2" state="0">      <bounds x=" 42" y=" 23" width="5" height="1" />    </bezel>
358      <bezel name="pg_2053"    element="Page2" state="0">      <bounds x=" 42" y=" 24" width="5" height="1" />    </bezel>
359      <bezel name="pg_2054"    element="Page2" state="0">      <bounds x=" 42" y=" 25" width="5" height="1" />    </bezel>
360      <bezel name="pg_2055"    element="Page2" state="0">      <bounds x=" 42" y=" 26" width="5" height="1" />    </bezel>
361      <bezel name="pg_2056"    element="Page2" state="0">      <bounds x=" 48" y=" 20" width="5" height="1" />    </bezel>
362      <bezel name="pg_2057"    element="Page2" state="0">      <bounds x=" 48" y=" 21" width="5" height="1" />    </bezel>
363      <bezel name="pg_2058"    element="Page2" state="0">      <bounds x=" 48" y=" 22" width="5" height="1" />    </bezel>
364      <bezel name="pg_2059"    element="Page2" state="0">      <bounds x=" 48" y=" 23" width="5" height="1" />    </bezel>
365      <bezel name="pg_2060"    element="Page2" state="0">      <bounds x=" 48" y=" 24" width="5" height="1" />    </bezel>
366      <bezel name="pg_2061"    element="Page2" state="0">      <bounds x=" 48" y=" 25" width="5" height="1" />    </bezel>
367      <bezel name="pg_2062"    element="Page2" state="0">      <bounds x=" 48" y=" 26" width="5" height="1" />    </bezel>
368      <bezel name="pg_2063"    element="Page2" state="0">      <bounds x=" 54" y=" 20" width="5" height="1" />    </bezel>
369      <bezel name="pg_2064"    element="Page2" state="0">      <bounds x=" 54" y=" 21" width="5" height="1" />    </bezel>
370      <bezel name="pg_2065"    element="Page2" state="0">      <bounds x=" 54" y=" 22" width="5" height="1" />    </bezel>
371      <bezel name="pg_2066"    element="Page2" state="0">      <bounds x=" 54" y=" 23" width="5" height="1" />    </bezel>
372      <bezel name="pg_2067"    element="Page2" state="0">      <bounds x=" 54" y=" 24" width="5" height="1" />    </bezel>
373      <bezel name="pg_2068"    element="Page2" state="0">      <bounds x=" 54" y=" 25" width="5" height="1" />    </bezel>
374      <bezel name="pg_2069"    element="Page2" state="0">      <bounds x=" 54" y=" 26" width="5" height="1" />    </bezel>
375      <bezel name="pg_2070"    element="Page2" state="0">      <bounds x=" 60" y=" 20" width="5" height="1" />    </bezel>
376      <bezel name="pg_2071"    element="Page2" state="0">      <bounds x=" 60" y=" 21" width="5" height="1" />    </bezel>
377      <bezel name="pg_2072"    element="Page2" state="0">      <bounds x=" 60" y=" 22" width="5" height="1" />    </bezel>
378      <bezel name="pg_2073"    element="Page2" state="0">      <bounds x=" 60" y=" 23" width="5" height="1" />    </bezel>
379      <bezel name="pg_2074"    element="Page2" state="0">      <bounds x=" 60" y=" 24" width="5" height="1" />    </bezel>
380      <bezel name="pg_2075"    element="Page2" state="0">      <bounds x=" 60" y=" 25" width="5" height="1" />    </bezel>
381      <bezel name="pg_2076"    element="Page2" state="0">      <bounds x=" 60" y=" 26" width="5" height="1" />    </bezel>
382      <bezel name="pg_2077"    element="Page2" state="0">      <bounds x=" 66" y=" 20" width="5" height="1" />    </bezel>
383      <bezel name="pg_2078"    element="Page2" state="0">      <bounds x=" 66" y=" 21" width="5" height="1" />    </bezel>
384      <bezel name="pg_2079"    element="Page2" state="0">      <bounds x=" 66" y=" 22" width="5" height="1" />    </bezel>
385      <bezel name="pg_2080"    element="Page2" state="0">      <bounds x=" 66" y=" 23" width="5" height="1" />    </bezel>
386      <bezel name="pg_2081"    element="Page2" state="0">      <bounds x=" 66" y=" 24" width="5" height="1" />    </bezel>
387      <bezel name="pg_2082"    element="Page2" state="0">      <bounds x=" 66" y=" 25" width="5" height="1" />    </bezel>
388      <bezel name="pg_2083"    element="Page2" state="0">      <bounds x=" 66" y=" 26" width="5" height="1" />    </bezel>
389      <bezel name="pg_2084"    element="Page2" state="0">      <bounds x=" 72" y=" 20" width="5" height="1" />    </bezel>
390      <bezel name="pg_2085"    element="Page2" state="0">      <bounds x=" 72" y=" 21" width="5" height="1" />    </bezel>
391      <bezel name="pg_2086"    element="Page2" state="0">      <bounds x=" 72" y=" 22" width="5" height="1" />    </bezel>
392      <bezel name="pg_2087"    element="Page2" state="0">      <bounds x=" 72" y=" 23" width="5" height="1" />    </bezel>
393      <bezel name="pg_2088"    element="Page2" state="0">      <bounds x=" 72" y=" 24" width="5" height="1" />    </bezel>
394      <bezel name="pg_2089"    element="Page2" state="0">      <bounds x=" 72" y=" 25" width="5" height="1" />    </bezel>
395      <bezel name="pg_2090"    element="Page2" state="0">      <bounds x=" 72" y=" 26" width="5" height="1" />    </bezel>
396      <bezel name="pg_2091"    element="Page2" state="0">      <bounds x=" 78" y=" 20" width="5" height="1" />    </bezel>
397      <bezel name="pg_2092"    element="Page2" state="0">      <bounds x=" 78" y=" 21" width="5" height="1" />    </bezel>
398      <bezel name="pg_2093"    element="Page2" state="0">      <bounds x=" 78" y=" 22" width="5" height="1" />    </bezel>
399      <bezel name="pg_2094"    element="Page2" state="0">      <bounds x=" 78" y=" 23" width="5" height="1" />    </bezel>
400      <bezel name="pg_2095"    element="Page2" state="0">      <bounds x=" 78" y=" 24" width="5" height="1" />    </bezel>
401      <bezel name="pg_2096"    element="Page2" state="0">      <bounds x=" 78" y=" 25" width="5" height="1" />    </bezel>
402      <bezel name="pg_2097"    element="Page2" state="0">      <bounds x=" 78" y=" 26" width="5" height="1" />    </bezel>
403      <bezel name="pg_2098"    element="Page2" state="0">      <bounds x=" 84" y=" 20" width="5" height="1" />    </bezel>
404      <bezel name="pg_2099"    element="Page2" state="0">      <bounds x=" 84" y=" 21" width="5" height="1" />    </bezel>
405      <bezel name="pg_2100"    element="Page2" state="0">      <bounds x=" 84" y=" 22" width="5" height="1" />    </bezel>
406      <bezel name="pg_2101"    element="Page2" state="0">      <bounds x=" 84" y=" 23" width="5" height="1" />    </bezel>
407      <bezel name="pg_2102"    element="Page2" state="0">      <bounds x=" 84" y=" 24" width="5" height="1" />    </bezel>
408      <bezel name="pg_2103"    element="Page2" state="0">      <bounds x=" 84" y=" 25" width="5" height="1" />    </bezel>
409      <bezel name="pg_2104"    element="Page2" state="0">      <bounds x=" 84" y=" 26" width="5" height="1" />    </bezel>
410      <bezel name="pg_2105"    element="Page2" state="0">      <bounds x=" 90" y=" 20" width="5" height="1" />    </bezel>
411      <bezel name="pg_2106"    element="Page2" state="0">      <bounds x=" 90" y=" 21" width="5" height="1" />    </bezel>
412      <bezel name="pg_2107"    element="Page2" state="0">      <bounds x=" 90" y=" 22" width="5" height="1" />    </bezel>
413      <bezel name="pg_2108"    element="Page2" state="0">      <bounds x=" 90" y=" 23" width="5" height="1" />    </bezel>
414      <bezel name="pg_2109"    element="Page2" state="0">      <bounds x=" 90" y=" 24" width="5" height="1" />    </bezel>
415      <bezel name="pg_2110"    element="Page2" state="0">      <bounds x=" 90" y=" 25" width="5" height="1" />    </bezel>
416      <bezel name="pg_2111"    element="Page2" state="0">      <bounds x=" 90" y=" 26" width="5" height="1" />    </bezel>
417      <bezel name="pg_2112"    element="Page2" state="0">      <bounds x="  0" y=" 30" width="5" height="1" />    </bezel>
418      <bezel name="pg_2113"    element="Page2" state="0">      <bounds x="  0" y=" 31" width="5" height="1" />    </bezel>
419      <bezel name="pg_2114"    element="Page2" state="0">      <bounds x="  0" y=" 32" width="5" height="1" />    </bezel>
420      <bezel name="pg_2115"    element="Page2" state="0">      <bounds x="  0" y=" 33" width="5" height="1" />    </bezel>
421      <bezel name="pg_2116"    element="Page2" state="0">      <bounds x="  0" y=" 34" width="5" height="1" />    </bezel>
422      <bezel name="pg_2117"    element="Page2" state="0">      <bounds x="  0" y=" 35" width="5" height="1" />    </bezel>
423      <bezel name="pg_2118"    element="Page2" state="0">      <bounds x="  0" y=" 36" width="5" height="1" />    </bezel>
424      <bezel name="pg_2119"    element="Page2" state="0">      <bounds x="  6" y=" 30" width="5" height="1" />    </bezel>
425      <bezel name="pg_2120"    element="Page2" state="0">      <bounds x="  6" y=" 31" width="5" height="1" />    </bezel>
426      <bezel name="pg_2121"    element="Page2" state="0">      <bounds x="  6" y=" 32" width="5" height="1" />    </bezel>
427      <bezel name="pg_2122"    element="Page2" state="0">      <bounds x="  6" y=" 33" width="5" height="1" />    </bezel>
428      <bezel name="pg_2123"    element="Page2" state="0">      <bounds x="  6" y=" 34" width="5" height="1" />    </bezel>
429      <bezel name="pg_2124"    element="Page2" state="0">      <bounds x="  6" y=" 35" width="5" height="1" />    </bezel>
430      <bezel name="pg_2125"    element="Page2" state="0">      <bounds x="  6" y=" 36" width="5" height="1" />    </bezel>
431      <bezel name="pg_2126"    element="Page2" state="0">      <bounds x=" 12" y=" 30" width="5" height="1" />    </bezel>
432      <bezel name="pg_2127"    element="Page2" state="0">      <bounds x=" 12" y=" 31" width="5" height="1" />    </bezel>
433      <bezel name="pg_2128"    element="Page2" state="0">      <bounds x=" 12" y=" 32" width="5" height="1" />    </bezel>
434      <bezel name="pg_2129"    element="Page2" state="0">      <bounds x=" 12" y=" 33" width="5" height="1" />    </bezel>
435      <bezel name="pg_2130"    element="Page2" state="0">      <bounds x=" 12" y=" 34" width="5" height="1" />    </bezel>
436      <bezel name="pg_2131"    element="Page2" state="0">      <bounds x=" 12" y=" 35" width="5" height="1" />    </bezel>
437      <bezel name="pg_2132"    element="Page2" state="0">      <bounds x=" 12" y=" 36" width="5" height="1" />    </bezel>
438      <bezel name="pg_2133"    element="Page2" state="0">      <bounds x=" 18" y=" 30" width="5" height="1" />    </bezel>
439      <bezel name="pg_2134"    element="Page2" state="0">      <bounds x=" 18" y=" 31" width="5" height="1" />    </bezel>
440      <bezel name="pg_2135"    element="Page2" state="0">      <bounds x=" 18" y=" 32" width="5" height="1" />    </bezel>
441      <bezel name="pg_2136"    element="Page2" state="0">      <bounds x=" 18" y=" 33" width="5" height="1" />    </bezel>
442      <bezel name="pg_2137"    element="Page2" state="0">      <bounds x=" 18" y=" 34" width="5" height="1" />    </bezel>
443      <bezel name="pg_2138"    element="Page2" state="0">      <bounds x=" 18" y=" 35" width="5" height="1" />    </bezel>
444      <bezel name="pg_2139"    element="Page2" state="0">      <bounds x=" 18" y=" 36" width="5" height="1" />    </bezel>
445      <bezel name="pg_2140"    element="Page2" state="0">      <bounds x=" 24" y=" 30" width="5" height="1" />    </bezel>
446      <bezel name="pg_2141"    element="Page2" state="0">      <bounds x=" 24" y=" 31" width="5" height="1" />    </bezel>
447      <bezel name="pg_2142"    element="Page2" state="0">      <bounds x=" 24" y=" 32" width="5" height="1" />    </bezel>
448      <bezel name="pg_2143"    element="Page2" state="0">      <bounds x=" 24" y=" 33" width="5" height="1" />    </bezel>
449      <bezel name="pg_2144"    element="Page2" state="0">      <bounds x=" 24" y=" 34" width="5" height="1" />    </bezel>
450      <bezel name="pg_2145"    element="Page2" state="0">      <bounds x=" 24" y=" 35" width="5" height="1" />    </bezel>
451      <bezel name="pg_2146"    element="Page2" state="0">      <bounds x=" 24" y=" 36" width="5" height="1" />    </bezel>
452      <bezel name="pg_2147"    element="Page2" state="0">      <bounds x=" 30" y=" 30" width="5" height="1" />    </bezel>
453      <bezel name="pg_2148"    element="Page2" state="0">      <bounds x=" 30" y=" 31" width="5" height="1" />    </bezel>
454      <bezel name="pg_2149"    element="Page2" state="0">      <bounds x=" 30" y=" 32" width="5" height="1" />    </bezel>
455      <bezel name="pg_2150"    element="Page2" state="0">      <bounds x=" 30" y=" 33" width="5" height="1" />    </bezel>
456      <bezel name="pg_2151"    element="Page2" state="0">      <bounds x=" 30" y=" 34" width="5" height="1" />    </bezel>
457      <bezel name="pg_2152"    element="Page2" state="0">      <bounds x=" 30" y=" 35" width="5" height="1" />    </bezel>
458      <bezel name="pg_2153"    element="Page2" state="0">      <bounds x=" 30" y=" 36" width="5" height="1" />    </bezel>
459      <bezel name="pg_2154"    element="Page2" state="0">      <bounds x=" 36" y=" 30" width="5" height="1" />    </bezel>
460      <bezel name="pg_2155"    element="Page2" state="0">      <bounds x=" 36" y=" 31" width="5" height="1" />    </bezel>
461      <bezel name="pg_2156"    element="Page2" state="0">      <bounds x=" 36" y=" 32" width="5" height="1" />    </bezel>
462      <bezel name="pg_2157"    element="Page2" state="0">      <bounds x=" 36" y=" 33" width="5" height="1" />    </bezel>
463      <bezel name="pg_2158"    element="Page2" state="0">      <bounds x=" 36" y=" 34" width="5" height="1" />    </bezel>
464      <bezel name="pg_2159"    element="Page2" state="0">      <bounds x=" 36" y=" 35" width="5" height="1" />    </bezel>
465      <bezel name="pg_2160"    element="Page2" state="0">      <bounds x=" 36" y=" 36" width="5" height="1" />    </bezel>
466      <bezel name="pg_2161"    element="Page2" state="0">      <bounds x=" 42" y=" 30" width="5" height="1" />    </bezel>
467      <bezel name="pg_2162"    element="Page2" state="0">      <bounds x=" 42" y=" 31" width="5" height="1" />    </bezel>
468      <bezel name="pg_2163"    element="Page2" state="0">      <bounds x=" 42" y=" 32" width="5" height="1" />    </bezel>
469      <bezel name="pg_2164"    element="Page2" state="0">      <bounds x=" 42" y=" 33" width="5" height="1" />    </bezel>
470      <bezel name="pg_2165"    element="Page2" state="0">      <bounds x=" 42" y=" 34" width="5" height="1" />    </bezel>
471      <bezel name="pg_2166"    element="Page2" state="0">      <bounds x=" 42" y=" 35" width="5" height="1" />    </bezel>
472      <bezel name="pg_2167"    element="Page2" state="0">      <bounds x=" 42" y=" 36" width="5" height="1" />    </bezel>
473      <bezel name="pg_2168"    element="Page2" state="0">      <bounds x=" 48" y=" 30" width="5" height="1" />    </bezel>
474      <bezel name="pg_2169"    element="Page2" state="0">      <bounds x=" 48" y=" 31" width="5" height="1" />    </bezel>
475      <bezel name="pg_2170"    element="Page2" state="0">      <bounds x=" 48" y=" 32" width="5" height="1" />    </bezel>
476      <bezel name="pg_2171"    element="Page2" state="0">      <bounds x=" 48" y=" 33" width="5" height="1" />    </bezel>
477      <bezel name="pg_2172"    element="Page2" state="0">      <bounds x=" 48" y=" 34" width="5" height="1" />    </bezel>
478      <bezel name="pg_2173"    element="Page2" state="0">      <bounds x=" 48" y=" 35" width="5" height="1" />    </bezel>
479      <bezel name="pg_2174"    element="Page2" state="0">      <bounds x=" 48" y=" 36" width="5" height="1" />    </bezel>
480      <bezel name="pg_2175"    element="Page2" state="0">      <bounds x=" 54" y=" 30" width="5" height="1" />    </bezel>
481      <bezel name="pg_2176"    element="Page2" state="0">      <bounds x=" 54" y=" 31" width="5" height="1" />    </bezel>
482      <bezel name="pg_2177"    element="Page2" state="0">      <bounds x=" 54" y=" 32" width="5" height="1" />    </bezel>
483      <bezel name="pg_2178"    element="Page2" state="0">      <bounds x=" 54" y=" 33" width="5" height="1" />    </bezel>
484      <bezel name="pg_2179"    element="Page2" state="0">      <bounds x=" 54" y=" 34" width="5" height="1" />    </bezel>
485      <bezel name="pg_2180"    element="Page2" state="0">      <bounds x=" 54" y=" 35" width="5" height="1" />    </bezel>
486      <bezel name="pg_2181"    element="Page2" state="0">      <bounds x=" 54" y=" 36" width="5" height="1" />    </bezel>
487      <bezel name="pg_2182"    element="Page2" state="0">      <bounds x=" 60" y=" 30" width="5" height="1" />    </bezel>
488      <bezel name="pg_2183"    element="Page2" state="0">      <bounds x=" 60" y=" 31" width="5" height="1" />    </bezel>
489      <bezel name="pg_2184"    element="Page2" state="0">      <bounds x=" 60" y=" 32" width="5" height="1" />    </bezel>
490      <bezel name="pg_2185"    element="Page2" state="0">      <bounds x=" 60" y=" 33" width="5" height="1" />    </bezel>
491      <bezel name="pg_2186"    element="Page2" state="0">      <bounds x=" 60" y=" 34" width="5" height="1" />    </bezel>
492      <bezel name="pg_2187"    element="Page2" state="0">      <bounds x=" 60" y=" 35" width="5" height="1" />    </bezel>
493      <bezel name="pg_2188"    element="Page2" state="0">      <bounds x=" 60" y=" 36" width="5" height="1" />    </bezel>
494      <bezel name="pg_2189"    element="Page2" state="0">      <bounds x=" 66" y=" 30" width="5" height="1" />    </bezel>
495      <bezel name="pg_2190"    element="Page2" state="0">      <bounds x=" 66" y=" 31" width="5" height="1" />    </bezel>
496      <bezel name="pg_2191"    element="Page2" state="0">      <bounds x=" 66" y=" 32" width="5" height="1" />    </bezel>
497      <bezel name="pg_2192"    element="Page2" state="0">      <bounds x=" 66" y=" 33" width="5" height="1" />    </bezel>
498      <bezel name="pg_2193"    element="Page2" state="0">      <bounds x=" 66" y=" 34" width="5" height="1" />    </bezel>
499      <bezel name="pg_2194"    element="Page2" state="0">      <bounds x=" 66" y=" 35" width="5" height="1" />    </bezel>
500      <bezel name="pg_2195"    element="Page2" state="0">      <bounds x=" 66" y=" 36" width="5" height="1" />    </bezel>
501      <bezel name="pg_2196"    element="Page2" state="0">      <bounds x=" 72" y=" 30" width="5" height="1" />    </bezel>
502      <bezel name="pg_2197"    element="Page2" state="0">      <bounds x=" 72" y=" 31" width="5" height="1" />    </bezel>
503      <bezel name="pg_2198"    element="Page2" state="0">      <bounds x=" 72" y=" 32" width="5" height="1" />    </bezel>
504      <bezel name="pg_2199"    element="Page2" state="0">      <bounds x=" 72" y=" 33" width="5" height="1" />    </bezel>
505      <bezel name="pg_2200"    element="Page2" state="0">      <bounds x=" 72" y=" 34" width="5" height="1" />    </bezel>
506      <bezel name="pg_2201"    element="Page2" state="0">      <bounds x=" 72" y=" 35" width="5" height="1" />    </bezel>
507      <bezel name="pg_2202"    element="Page2" state="0">      <bounds x=" 72" y=" 36" width="5" height="1" />    </bezel>
508      <bezel name="pg_2203"    element="Page2" state="0">      <bounds x=" 78" y=" 30" width="5" height="1" />    </bezel>
509      <bezel name="pg_2204"    element="Page2" state="0">      <bounds x=" 78" y=" 31" width="5" height="1" />    </bezel>
510      <bezel name="pg_2205"    element="Page2" state="0">      <bounds x=" 78" y=" 32" width="5" height="1" />    </bezel>
511      <bezel name="pg_2206"    element="Page2" state="0">      <bounds x=" 78" y=" 33" width="5" height="1" />    </bezel>
512      <bezel name="pg_2207"    element="Page2" state="0">      <bounds x=" 78" y=" 34" width="5" height="1" />    </bezel>
513      <bezel name="pg_2208"    element="Page2" state="0">      <bounds x=" 78" y=" 35" width="5" height="1" />    </bezel>
514      <bezel name="pg_2209"    element="Page2" state="0">      <bounds x=" 78" y=" 36" width="5" height="1" />    </bezel>
515      <bezel name="pg_2210"    element="Page2" state="0">      <bounds x=" 84" y=" 30" width="5" height="1" />    </bezel>
516      <bezel name="pg_2211"    element="Page2" state="0">      <bounds x=" 84" y=" 31" width="5" height="1" />    </bezel>
517      <bezel name="pg_2212"    element="Page2" state="0">      <bounds x=" 84" y=" 32" width="5" height="1" />    </bezel>
518      <bezel name="pg_2213"    element="Page2" state="0">      <bounds x=" 84" y=" 33" width="5" height="1" />    </bezel>
519      <bezel name="pg_2214"    element="Page2" state="0">      <bounds x=" 84" y=" 34" width="5" height="1" />    </bezel>
520      <bezel name="pg_2215"    element="Page2" state="0">      <bounds x=" 84" y=" 35" width="5" height="1" />    </bezel>
521      <bezel name="pg_2216"    element="Page2" state="0">      <bounds x=" 84" y=" 36" width="5" height="1" />    </bezel>
522      <bezel name="pg_2217"    element="Page2" state="0">      <bounds x=" 90" y=" 30" width="5" height="1" />    </bezel>
523      <bezel name="pg_2218"    element="Page2" state="0">      <bounds x=" 90" y=" 31" width="5" height="1" />    </bezel>
524      <bezel name="pg_2219"    element="Page2" state="0">      <bounds x=" 90" y=" 32" width="5" height="1" />    </bezel>
525      <bezel name="pg_2220"    element="Page2" state="0">      <bounds x=" 90" y=" 33" width="5" height="1" />    </bezel>
526      <bezel name="pg_2221"    element="Page2" state="0">      <bounds x=" 90" y=" 34" width="5" height="1" />    </bezel>
527      <bezel name="pg_2222"    element="Page2" state="0">      <bounds x=" 90" y=" 35" width="5" height="1" />    </bezel>
528      <bezel name="pg_2223"    element="Page2" state="0">      <bounds x=" 90" y=" 36" width="5" height="1" />    </bezel>
305      <bezel name="pg_2000"    element="Page2" state="0">     <bounds x="  0" y=" 20" width="5" height="1" />     </bezel>
306      <bezel name="pg_2001"    element="Page2" state="0">     <bounds x="  0" y=" 21" width="5" height="1" />     </bezel>
307      <bezel name="pg_2002"    element="Page2" state="0">     <bounds x="  0" y=" 22" width="5" height="1" />     </bezel>
308      <bezel name="pg_2003"    element="Page2" state="0">     <bounds x="  0" y=" 23" width="5" height="1" />     </bezel>
309      <bezel name="pg_2004"    element="Page2" state="0">     <bounds x="  0" y=" 24" width="5" height="1" />     </bezel>
310      <bezel name="pg_2005"    element="Page2" state="0">     <bounds x="  0" y=" 25" width="5" height="1" />     </bezel>
311      <bezel name="pg_2006"    element="Page2" state="0">     <bounds x="  0" y=" 26" width="5" height="1" />     </bezel>
312      <bezel name="pg_2007"    element="Page2" state="0">     <bounds x="  6" y=" 20" width="5" height="1" />     </bezel>
313      <bezel name="pg_2008"    element="Page2" state="0">     <bounds x="  6" y=" 21" width="5" height="1" />     </bezel>
314      <bezel name="pg_2009"    element="Page2" state="0">     <bounds x="  6" y=" 22" width="5" height="1" />     </bezel>
315      <bezel name="pg_2010"    element="Page2" state="0">     <bounds x="  6" y=" 23" width="5" height="1" />     </bezel>
316      <bezel name="pg_2011"    element="Page2" state="0">     <bounds x="  6" y=" 24" width="5" height="1" />     </bezel>
317      <bezel name="pg_2012"    element="Page2" state="0">     <bounds x="  6" y=" 25" width="5" height="1" />     </bezel>
318      <bezel name="pg_2013"    element="Page2" state="0">     <bounds x="  6" y=" 26" width="5" height="1" />     </bezel>
319      <bezel name="pg_2014"    element="Page2" state="0">     <bounds x=" 12" y=" 20" width="5" height="1" />     </bezel>
320      <bezel name="pg_2015"    element="Page2" state="0">     <bounds x=" 12" y=" 21" width="5" height="1" />     </bezel>
321      <bezel name="pg_2016"    element="Page2" state="0">     <bounds x=" 12" y=" 22" width="5" height="1" />     </bezel>
322      <bezel name="pg_2017"    element="Page2" state="0">     <bounds x=" 12" y=" 23" width="5" height="1" />     </bezel>
323      <bezel name="pg_2018"    element="Page2" state="0">     <bounds x=" 12" y=" 24" width="5" height="1" />     </bezel>
324      <bezel name="pg_2019"    element="Page2" state="0">     <bounds x=" 12" y=" 25" width="5" height="1" />     </bezel>
325      <bezel name="pg_2020"    element="Page2" state="0">     <bounds x=" 12" y=" 26" width="5" height="1" />     </bezel>
326      <bezel name="pg_2021"    element="Page2" state="0">     <bounds x=" 18" y=" 20" width="5" height="1" />     </bezel>
327      <bezel name="pg_2022"    element="Page2" state="0">     <bounds x=" 18" y=" 21" width="5" height="1" />     </bezel>
328      <bezel name="pg_2023"    element="Page2" state="0">     <bounds x=" 18" y=" 22" width="5" height="1" />     </bezel>
329      <bezel name="pg_2024"    element="Page2" state="0">     <bounds x=" 18" y=" 23" width="5" height="1" />     </bezel>
330      <bezel name="pg_2025"    element="Page2" state="0">     <bounds x=" 18" y=" 24" width="5" height="1" />     </bezel>
331      <bezel name="pg_2026"    element="Page2" state="0">     <bounds x=" 18" y=" 25" width="5" height="1" />     </bezel>
332      <bezel name="pg_2027"    element="Page2" state="0">     <bounds x=" 18" y=" 26" width="5" height="1" />     </bezel>
333      <bezel name="pg_2028"    element="Page2" state="0">     <bounds x=" 24" y=" 20" width="5" height="1" />     </bezel>
334      <bezel name="pg_2029"    element="Page2" state="0">     <bounds x=" 24" y=" 21" width="5" height="1" />     </bezel>
335      <bezel name="pg_2030"    element="Page2" state="0">     <bounds x=" 24" y=" 22" width="5" height="1" />     </bezel>
336      <bezel name="pg_2031"    element="Page2" state="0">     <bounds x=" 24" y=" 23" width="5" height="1" />     </bezel>
337      <bezel name="pg_2032"    element="Page2" state="0">     <bounds x=" 24" y=" 24" width="5" height="1" />     </bezel>
338      <bezel name="pg_2033"    element="Page2" state="0">     <bounds x=" 24" y=" 25" width="5" height="1" />     </bezel>
339      <bezel name="pg_2034"    element="Page2" state="0">     <bounds x=" 24" y=" 26" width="5" height="1" />     </bezel>
340      <bezel name="pg_2035"    element="Page2" state="0">     <bounds x=" 30" y=" 20" width="5" height="1" />     </bezel>
341      <bezel name="pg_2036"    element="Page2" state="0">     <bounds x=" 30" y=" 21" width="5" height="1" />     </bezel>
342      <bezel name="pg_2037"    element="Page2" state="0">     <bounds x=" 30" y=" 22" width="5" height="1" />     </bezel>
343      <bezel name="pg_2038"    element="Page2" state="0">     <bounds x=" 30" y=" 23" width="5" height="1" />     </bezel>
344      <bezel name="pg_2039"    element="Page2" state="0">     <bounds x=" 30" y=" 24" width="5" height="1" />     </bezel>
345      <bezel name="pg_2040"    element="Page2" state="0">     <bounds x=" 30" y=" 25" width="5" height="1" />     </bezel>
346      <bezel name="pg_2041"    element="Page2" state="0">     <bounds x=" 30" y=" 26" width="5" height="1" />     </bezel>
347      <bezel name="pg_2042"    element="Page2" state="0">     <bounds x=" 36" y=" 20" width="5" height="1" />     </bezel>
348      <bezel name="pg_2043"    element="Page2" state="0">     <bounds x=" 36" y=" 21" width="5" height="1" />     </bezel>
349      <bezel name="pg_2044"    element="Page2" state="0">     <bounds x=" 36" y=" 22" width="5" height="1" />     </bezel>
350      <bezel name="pg_2045"    element="Page2" state="0">     <bounds x=" 36" y=" 23" width="5" height="1" />     </bezel>
351      <bezel name="pg_2046"    element="Page2" state="0">     <bounds x=" 36" y=" 24" width="5" height="1" />     </bezel>
352      <bezel name="pg_2047"    element="Page2" state="0">     <bounds x=" 36" y=" 25" width="5" height="1" />     </bezel>
353      <bezel name="pg_2048"    element="Page2" state="0">     <bounds x=" 36" y=" 26" width="5" height="1" />     </bezel>
354      <bezel name="pg_2049"    element="Page2" state="0">     <bounds x=" 42" y=" 20" width="5" height="1" />     </bezel>
355      <bezel name="pg_2050"    element="Page2" state="0">     <bounds x=" 42" y=" 21" width="5" height="1" />     </bezel>
356      <bezel name="pg_2051"    element="Page2" state="0">     <bounds x=" 42" y=" 22" width="5" height="1" />     </bezel>
357      <bezel name="pg_2052"    element="Page2" state="0">     <bounds x=" 42" y=" 23" width="5" height="1" />     </bezel>
358      <bezel name="pg_2053"    element="Page2" state="0">     <bounds x=" 42" y=" 24" width="5" height="1" />     </bezel>
359      <bezel name="pg_2054"    element="Page2" state="0">     <bounds x=" 42" y=" 25" width="5" height="1" />     </bezel>
360      <bezel name="pg_2055"    element="Page2" state="0">     <bounds x=" 42" y=" 26" width="5" height="1" />     </bezel>
361      <bezel name="pg_2056"    element="Page2" state="0">     <bounds x=" 48" y=" 20" width="5" height="1" />     </bezel>
362      <bezel name="pg_2057"    element="Page2" state="0">     <bounds x=" 48" y=" 21" width="5" height="1" />     </bezel>
363      <bezel name="pg_2058"    element="Page2" state="0">     <bounds x=" 48" y=" 22" width="5" height="1" />     </bezel>
364      <bezel name="pg_2059"    element="Page2" state="0">     <bounds x=" 48" y=" 23" width="5" height="1" />     </bezel>
365      <bezel name="pg_2060"    element="Page2" state="0">     <bounds x=" 48" y=" 24" width="5" height="1" />     </bezel>
366      <bezel name="pg_2061"    element="Page2" state="0">     <bounds x=" 48" y=" 25" width="5" height="1" />     </bezel>
367      <bezel name="pg_2062"    element="Page2" state="0">     <bounds x=" 48" y=" 26" width="5" height="1" />     </bezel>
368      <bezel name="pg_2063"    element="Page2" state="0">     <bounds x=" 54" y=" 20" width="5" height="1" />     </bezel>
369      <bezel name="pg_2064"    element="Page2" state="0">     <bounds x=" 54" y=" 21" width="5" height="1" />     </bezel>
370      <bezel name="pg_2065"    element="Page2" state="0">     <bounds x=" 54" y=" 22" width="5" height="1" />     </bezel>
371      <bezel name="pg_2066"    element="Page2" state="0">     <bounds x=" 54" y=" 23" width="5" height="1" />     </bezel>
372      <bezel name="pg_2067"    element="Page2" state="0">     <bounds x=" 54" y=" 24" width="5" height="1" />     </bezel>
373      <bezel name="pg_2068"    element="Page2" state="0">     <bounds x=" 54" y=" 25" width="5" height="1" />     </bezel>
374      <bezel name="pg_2069"    element="Page2" state="0">     <bounds x=" 54" y=" 26" width="5" height="1" />     </bezel>
375      <bezel name="pg_2070"    element="Page2" state="0">     <bounds x=" 60" y=" 20" width="5" height="1" />     </bezel>
376      <bezel name="pg_2071"    element="Page2" state="0">     <bounds x=" 60" y=" 21" width="5" height="1" />     </bezel>
377      <bezel name="pg_2072"    element="Page2" state="0">     <bounds x=" 60" y=" 22" width="5" height="1" />     </bezel>
378      <bezel name="pg_2073"    element="Page2" state="0">     <bounds x=" 60" y=" 23" width="5" height="1" />     </bezel>
379      <bezel name="pg_2074"    element="Page2" state="0">     <bounds x=" 60" y=" 24" width="5" height="1" />     </bezel>
380      <bezel name="pg_2075"    element="Page2" state="0">     <bounds x=" 60" y=" 25" width="5" height="1" />     </bezel>
381      <bezel name="pg_2076"    element="Page2" state="0">     <bounds x=" 60" y=" 26" width="5" height="1" />     </bezel>
382      <bezel name="pg_2077"    element="Page2" state="0">     <bounds x=" 66" y=" 20" width="5" height="1" />     </bezel>
383      <bezel name="pg_2078"    element="Page2" state="0">     <bounds x=" 66" y=" 21" width="5" height="1" />     </bezel>
384      <bezel name="pg_2079"    element="Page2" state="0">     <bounds x=" 66" y=" 22" width="5" height="1" />     </bezel>
385      <bezel name="pg_2080"    element="Page2" state="0">     <bounds x=" 66" y=" 23" width="5" height="1" />     </bezel>
386      <bezel name="pg_2081"    element="Page2" state="0">     <bounds x=" 66" y=" 24" width="5" height="1" />     </bezel>
387      <bezel name="pg_2082"    element="Page2" state="0">     <bounds x=" 66" y=" 25" width="5" height="1" />     </bezel>
388      <bezel name="pg_2083"    element="Page2" state="0">     <bounds x=" 66" y=" 26" width="5" height="1" />     </bezel>
389      <bezel name="pg_2084"    element="Page2" state="0">     <bounds x=" 72" y=" 20" width="5" height="1" />     </bezel>
390      <bezel name="pg_2085"    element="Page2" state="0">     <bounds x=" 72" y=" 21" width="5" height="1" />     </bezel>
391      <bezel name="pg_2086"    element="Page2" state="0">     <bounds x=" 72" y=" 22" width="5" height="1" />     </bezel>
392      <bezel name="pg_2087"    element="Page2" state="0">     <bounds x=" 72" y=" 23" width="5" height="1" />     </bezel>
393      <bezel name="pg_2088"    element="Page2" state="0">     <bounds x=" 72" y=" 24" width="5" height="1" />     </bezel>
394      <bezel name="pg_2089"    element="Page2" state="0">     <bounds x=" 72" y=" 25" width="5" height="1" />     </bezel>
395      <bezel name="pg_2090"    element="Page2" state="0">     <bounds x=" 72" y=" 26" width="5" height="1" />     </bezel>
396      <bezel name="pg_2091"    element="Page2" state="0">     <bounds x=" 78" y=" 20" width="5" height="1" />     </bezel>
397      <bezel name="pg_2092"    element="Page2" state="0">     <bounds x=" 78" y=" 21" width="5" height="1" />     </bezel>
398      <bezel name="pg_2093"    element="Page2" state="0">     <bounds x=" 78" y=" 22" width="5" height="1" />     </bezel>
399      <bezel name="pg_2094"    element="Page2" state="0">     <bounds x=" 78" y=" 23" width="5" height="1" />     </bezel>
400      <bezel name="pg_2095"    element="Page2" state="0">     <bounds x=" 78" y=" 24" width="5" height="1" />     </bezel>
401      <bezel name="pg_2096"    element="Page2" state="0">     <bounds x=" 78" y=" 25" width="5" height="1" />     </bezel>
402      <bezel name="pg_2097"    element="Page2" state="0">     <bounds x=" 78" y=" 26" width="5" height="1" />     </bezel>
403      <bezel name="pg_2098"    element="Page2" state="0">     <bounds x=" 84" y=" 20" width="5" height="1" />     </bezel>
404      <bezel name="pg_2099"    element="Page2" state="0">     <bounds x=" 84" y=" 21" width="5" height="1" />     </bezel>
405      <bezel name="pg_2100"    element="Page2" state="0">     <bounds x=" 84" y=" 22" width="5" height="1" />     </bezel>
406      <bezel name="pg_2101"    element="Page2" state="0">     <bounds x=" 84" y=" 23" width="5" height="1" />     </bezel>
407      <bezel name="pg_2102"    element="Page2" state="0">     <bounds x=" 84" y=" 24" width="5" height="1" />     </bezel>
408      <bezel name="pg_2103"    element="Page2" state="0">     <bounds x=" 84" y=" 25" width="5" height="1" />     </bezel>
409      <bezel name="pg_2104"    element="Page2" state="0">     <bounds x=" 84" y=" 26" width="5" height="1" />     </bezel>
410      <bezel name="pg_2105"    element="Page2" state="0">     <bounds x=" 90" y=" 20" width="5" height="1" />     </bezel>
411      <bezel name="pg_2106"    element="Page2" state="0">     <bounds x=" 90" y=" 21" width="5" height="1" />     </bezel>
412      <bezel name="pg_2107"    element="Page2" state="0">     <bounds x=" 90" y=" 22" width="5" height="1" />     </bezel>
413      <bezel name="pg_2108"    element="Page2" state="0">     <bounds x=" 90" y=" 23" width="5" height="1" />     </bezel>
414      <bezel name="pg_2109"    element="Page2" state="0">     <bounds x=" 90" y=" 24" width="5" height="1" />     </bezel>
415      <bezel name="pg_2110"    element="Page2" state="0">     <bounds x=" 90" y=" 25" width="5" height="1" />     </bezel>
416      <bezel name="pg_2111"    element="Page2" state="0">     <bounds x=" 90" y=" 26" width="5" height="1" />     </bezel>
417      <bezel name="pg_2112"    element="Page2" state="0">     <bounds x="  0" y=" 30" width="5" height="1" />     </bezel>
418      <bezel name="pg_2113"    element="Page2" state="0">     <bounds x="  0" y=" 31" width="5" height="1" />     </bezel>
419      <bezel name="pg_2114"    element="Page2" state="0">     <bounds x="  0" y=" 32" width="5" height="1" />     </bezel>
420      <bezel name="pg_2115"    element="Page2" state="0">     <bounds x="  0" y=" 33" width="5" height="1" />     </bezel>
421      <bezel name="pg_2116"    element="Page2" state="0">     <bounds x="  0" y=" 34" width="5" height="1" />     </bezel>
422      <bezel name="pg_2117"    element="Page2" state="0">     <bounds x="  0" y=" 35" width="5" height="1" />     </bezel>
423      <bezel name="pg_2118"    element="Page2" state="0">     <bounds x="  0" y=" 36" width="5" height="1" />     </bezel>
424      <bezel name="pg_2119"    element="Page2" state="0">     <bounds x="  6" y=" 30" width="5" height="1" />     </bezel>
425      <bezel name="pg_2120"    element="Page2" state="0">     <bounds x="  6" y=" 31" width="5" height="1" />     </bezel>
426      <bezel name="pg_2121"    element="Page2" state="0">     <bounds x="  6" y=" 32" width="5" height="1" />     </bezel>
427      <bezel name="pg_2122"    element="Page2" state="0">     <bounds x="  6" y=" 33" width="5" height="1" />     </bezel>
428      <bezel name="pg_2123"    element="Page2" state="0">     <bounds x="  6" y=" 34" width="5" height="1" />     </bezel>
429      <bezel name="pg_2124"    element="Page2" state="0">     <bounds x="  6" y=" 35" width="5" height="1" />     </bezel>
430      <bezel name="pg_2125"    element="Page2" state="0">     <bounds x="  6" y=" 36" width="5" height="1" />     </bezel>
431      <bezel name="pg_2126"    element="Page2" state="0">     <bounds x=" 12" y=" 30" width="5" height="1" />     </bezel>
432      <bezel name="pg_2127"    element="Page2" state="0">     <bounds x=" 12" y=" 31" width="5" height="1" />     </bezel>
433      <bezel name="pg_2128"    element="Page2" state="0">     <bounds x=" 12" y=" 32" width="5" height="1" />     </bezel>
434      <bezel name="pg_2129"    element="Page2" state="0">     <bounds x=" 12" y=" 33" width="5" height="1" />     </bezel>
435      <bezel name="pg_2130"    element="Page2" state="0">     <bounds x=" 12" y=" 34" width="5" height="1" />     </bezel>
436      <bezel name="pg_2131"    element="Page2" state="0">     <bounds x=" 12" y=" 35" width="5" height="1" />     </bezel>
437      <bezel name="pg_2132"    element="Page2" state="0">     <bounds x=" 12" y=" 36" width="5" height="1" />     </bezel>
438      <bezel name="pg_2133"    element="Page2" state="0">     <bounds x=" 18" y=" 30" width="5" height="1" />     </bezel>
439      <bezel name="pg_2134"    element="Page2" state="0">     <bounds x=" 18" y=" 31" width="5" height="1" />     </bezel>
440      <bezel name="pg_2135"    element="Page2" state="0">     <bounds x=" 18" y=" 32" width="5" height="1" />     </bezel>
441      <bezel name="pg_2136"    element="Page2" state="0">     <bounds x=" 18" y=" 33" width="5" height="1" />     </bezel>
442      <bezel name="pg_2137"    element="Page2" state="0">     <bounds x=" 18" y=" 34" width="5" height="1" />     </bezel>
443      <bezel name="pg_2138"    element="Page2" state="0">     <bounds x=" 18" y=" 35" width="5" height="1" />     </bezel>
444      <bezel name="pg_2139"    element="Page2" state="0">     <bounds x=" 18" y=" 36" width="5" height="1" />     </bezel>
445      <bezel name="pg_2140"    element="Page2" state="0">     <bounds x=" 24" y=" 30" width="5" height="1" />     </bezel>
446      <bezel name="pg_2141"    element="Page2" state="0">     <bounds x=" 24" y=" 31" width="5" height="1" />     </bezel>
447      <bezel name="pg_2142"    element="Page2" state="0">     <bounds x=" 24" y=" 32" width="5" height="1" />     </bezel>
448      <bezel name="pg_2143"    element="Page2" state="0">     <bounds x=" 24" y=" 33" width="5" height="1" />     </bezel>
449      <bezel name="pg_2144"    element="Page2" state="0">     <bounds x=" 24" y=" 34" width="5" height="1" />     </bezel>
450      <bezel name="pg_2145"    element="Page2" state="0">     <bounds x=" 24" y=" 35" width="5" height="1" />     </bezel>
451      <bezel name="pg_2146"    element="Page2" state="0">     <bounds x=" 24" y=" 36" width="5" height="1" />     </bezel>
452      <bezel name="pg_2147"    element="Page2" state="0">     <bounds x=" 30" y=" 30" width="5" height="1" />     </bezel>
453      <bezel name="pg_2148"    element="Page2" state="0">     <bounds x=" 30" y=" 31" width="5" height="1" />     </bezel>
454      <bezel name="pg_2149"    element="Page2" state="0">     <bounds x=" 30" y=" 32" width="5" height="1" />     </bezel>
455      <bezel name="pg_2150"    element="Page2" state="0">     <bounds x=" 30" y=" 33" width="5" height="1" />     </bezel>
456      <bezel name="pg_2151"    element="Page2" state="0">     <bounds x=" 30" y=" 34" width="5" height="1" />     </bezel>
457      <bezel name="pg_2152"    element="Page2" state="0">     <bounds x=" 30" y=" 35" width="5" height="1" />     </bezel>
458      <bezel name="pg_2153"    element="Page2" state="0">     <bounds x=" 30" y=" 36" width="5" height="1" />     </bezel>
459      <bezel name="pg_2154"    element="Page2" state="0">     <bounds x=" 36" y=" 30" width="5" height="1" />     </bezel>
460      <bezel name="pg_2155"    element="Page2" state="0">     <bounds x=" 36" y=" 31" width="5" height="1" />     </bezel>
461      <bezel name="pg_2156"    element="Page2" state="0">     <bounds x=" 36" y=" 32" width="5" height="1" />     </bezel>
462      <bezel name="pg_2157"    element="Page2" state="0">     <bounds x=" 36" y=" 33" width="5" height="1" />     </bezel>
463      <bezel name="pg_2158"    element="Page2" state="0">     <bounds x=" 36" y=" 34" width="5" height="1" />     </bezel>
464      <bezel name="pg_2159"    element="Page2" state="0">     <bounds x=" 36" y=" 35" width="5" height="1" />     </bezel>
465      <bezel name="pg_2160"    element="Page2" state="0">     <bounds x=" 36" y=" 36" width="5" height="1" />     </bezel>
466      <bezel name="pg_2161"    element="Page2" state="0">     <bounds x=" 42" y=" 30" width="5" height="1" />     </bezel>
467      <bezel name="pg_2162"    element="Page2" state="0">     <bounds x=" 42" y=" 31" width="5" height="1" />     </bezel>
468      <bezel name="pg_2163"    element="Page2" state="0">     <bounds x=" 42" y=" 32" width="5" height="1" />     </bezel>
469      <bezel name="pg_2164"    element="Page2" state="0">     <bounds x=" 42" y=" 33" width="5" height="1" />     </bezel>
470      <bezel name="pg_2165"    element="Page2" state="0">     <bounds x=" 42" y=" 34" width="5" height="1" />     </bezel>
471      <bezel name="pg_2166"    element="Page2" state="0">     <bounds x=" 42" y=" 35" width="5" height="1" />     </bezel>
472      <bezel name="pg_2167"    element="Page2" state="0">     <bounds x=" 42" y=" 36" width="5" height="1" />     </bezel>
473      <bezel name="pg_2168"    element="Page2" state="0">     <bounds x=" 48" y=" 30" width="5" height="1" />     </bezel>
474      <bezel name="pg_2169"    element="Page2" state="0">     <bounds x=" 48" y=" 31" width="5" height="1" />     </bezel>
475      <bezel name="pg_2170"    element="Page2" state="0">     <bounds x=" 48" y=" 32" width="5" height="1" />     </bezel>
476      <bezel name="pg_2171"    element="Page2" state="0">     <bounds x=" 48" y=" 33" width="5" height="1" />     </bezel>
477      <bezel name="pg_2172"    element="Page2" state="0">     <bounds x=" 48" y=" 34" width="5" height="1" />     </bezel>
478      <bezel name="pg_2173"    element="Page2" state="0">     <bounds x=" 48" y=" 35" width="5" height="1" />     </bezel>
479      <bezel name="pg_2174"    element="Page2" state="0">     <bounds x=" 48" y=" 36" width="5" height="1" />     </bezel>
480      <bezel name="pg_2175"    element="Page2" state="0">     <bounds x=" 54" y=" 30" width="5" height="1" />     </bezel>
481      <bezel name="pg_2176"    element="Page2" state="0">     <bounds x=" 54" y=" 31" width="5" height="1" />     </bezel>
482      <bezel name="pg_2177"    element="Page2" state="0">     <bounds x=" 54" y=" 32" width="5" height="1" />     </bezel>
483      <bezel name="pg_2178"    element="Page2" state="0">     <bounds x=" 54" y=" 33" width="5" height="1" />     </bezel>
484      <bezel name="pg_2179"    element="Page2" state="0">     <bounds x=" 54" y=" 34" width="5" height="1" />     </bezel>
485      <bezel name="pg_2180"    element="Page2" state="0">     <bounds x=" 54" y=" 35" width="5" height="1" />     </bezel>
486      <bezel name="pg_2181"    element="Page2" state="0">     <bounds x=" 54" y=" 36" width="5" height="1" />     </bezel>
487      <bezel name="pg_2182"    element="Page2" state="0">     <bounds x=" 60" y=" 30" width="5" height="1" />     </bezel>
488      <bezel name="pg_2183"    element="Page2" state="0">     <bounds x=" 60" y=" 31" width="5" height="1" />     </bezel>
489      <bezel name="pg_2184"    element="Page2" state="0">     <bounds x=" 60" y=" 32" width="5" height="1" />     </bezel>
490      <bezel name="pg_2185"    element="Page2" state="0">     <bounds x=" 60" y=" 33" width="5" height="1" />     </bezel>
491      <bezel name="pg_2186"    element="Page2" state="0">     <bounds x=" 60" y=" 34" width="5" height="1" />     </bezel>
492      <bezel name="pg_2187"    element="Page2" state="0">     <bounds x=" 60" y=" 35" width="5" height="1" />     </bezel>
493      <bezel name="pg_2188"    element="Page2" state="0">     <bounds x=" 60" y=" 36" width="5" height="1" />     </bezel>
494      <bezel name="pg_2189"    element="Page2" state="0">     <bounds x=" 66" y=" 30" width="5" height="1" />     </bezel>
495      <bezel name="pg_2190"    element="Page2" state="0">     <bounds x=" 66" y=" 31" width="5" height="1" />     </bezel>
496      <bezel name="pg_2191"    element="Page2" state="0">     <bounds x=" 66" y=" 32" width="5" height="1" />     </bezel>
497      <bezel name="pg_2192"    element="Page2" state="0">     <bounds x=" 66" y=" 33" width="5" height="1" />     </bezel>
498      <bezel name="pg_2193"    element="Page2" state="0">     <bounds x=" 66" y=" 34" width="5" height="1" />     </bezel>
499      <bezel name="pg_2194"    element="Page2" state="0">     <bounds x=" 66" y=" 35" width="5" height="1" />     </bezel>
500      <bezel name="pg_2195"    element="Page2" state="0">     <bounds x=" 66" y=" 36" width="5" height="1" />     </bezel>
501      <bezel name="pg_2196"    element="Page2" state="0">     <bounds x=" 72" y=" 30" width="5" height="1" />     </bezel>
502      <bezel name="pg_2197"    element="Page2" state="0">     <bounds x=" 72" y=" 31" width="5" height="1" />     </bezel>
503      <bezel name="pg_2198"    element="Page2" state="0">     <bounds x=" 72" y=" 32" width="5" height="1" />     </bezel>
504      <bezel name="pg_2199"    element="Page2" state="0">     <bounds x=" 72" y=" 33" width="5" height="1" />     </bezel>
505      <bezel name="pg_2200"    element="Page2" state="0">     <bounds x=" 72" y=" 34" width="5" height="1" />     </bezel>
506      <bezel name="pg_2201"    element="Page2" state="0">     <bounds x=" 72" y=" 35" width="5" height="1" />     </bezel>
507      <bezel name="pg_2202"    element="Page2" state="0">     <bounds x=" 72" y=" 36" width="5" height="1" />     </bezel>
508      <bezel name="pg_2203"    element="Page2" state="0">     <bounds x=" 78" y=" 30" width="5" height="1" />     </bezel>
509      <bezel name="pg_2204"    element="Page2" state="0">     <bounds x=" 78" y=" 31" width="5" height="1" />     </bezel>
510      <bezel name="pg_2205"    element="Page2" state="0">     <bounds x=" 78" y=" 32" width="5" height="1" />     </bezel>
511      <bezel name="pg_2206"    element="Page2" state="0">     <bounds x=" 78" y=" 33" width="5" height="1" />     </bezel>
512      <bezel name="pg_2207"    element="Page2" state="0">     <bounds x=" 78" y=" 34" width="5" height="1" />     </bezel>
513      <bezel name="pg_2208"    element="Page2" state="0">     <bounds x=" 78" y=" 35" width="5" height="1" />     </bezel>
514      <bezel name="pg_2209"    element="Page2" state="0">     <bounds x=" 78" y=" 36" width="5" height="1" />     </bezel>
515      <bezel name="pg_2210"    element="Page2" state="0">     <bounds x=" 84" y=" 30" width="5" height="1" />     </bezel>
516      <bezel name="pg_2211"    element="Page2" state="0">     <bounds x=" 84" y=" 31" width="5" height="1" />     </bezel>
517      <bezel name="pg_2212"    element="Page2" state="0">     <bounds x=" 84" y=" 32" width="5" height="1" />     </bezel>
518      <bezel name="pg_2213"    element="Page2" state="0">     <bounds x=" 84" y=" 33" width="5" height="1" />     </bezel>
519      <bezel name="pg_2214"    element="Page2" state="0">     <bounds x=" 84" y=" 34" width="5" height="1" />     </bezel>
520      <bezel name="pg_2215"    element="Page2" state="0">     <bounds x=" 84" y=" 35" width="5" height="1" />     </bezel>
521      <bezel name="pg_2216"    element="Page2" state="0">     <bounds x=" 84" y=" 36" width="5" height="1" />     </bezel>
522      <bezel name="pg_2217"    element="Page2" state="0">     <bounds x=" 90" y=" 30" width="5" height="1" />     </bezel>
523      <bezel name="pg_2218"    element="Page2" state="0">     <bounds x=" 90" y=" 31" width="5" height="1" />     </bezel>
524      <bezel name="pg_2219"    element="Page2" state="0">     <bounds x=" 90" y=" 32" width="5" height="1" />     </bezel>
525      <bezel name="pg_2220"    element="Page2" state="0">     <bounds x=" 90" y=" 33" width="5" height="1" />     </bezel>
526      <bezel name="pg_2221"    element="Page2" state="0">     <bounds x=" 90" y=" 34" width="5" height="1" />     </bezel>
527      <bezel name="pg_2222"    element="Page2" state="0">     <bounds x=" 90" y=" 35" width="5" height="1" />     </bezel>
528      <bezel name="pg_2223"    element="Page2" state="0">     <bounds x=" 90" y=" 36" width="5" height="1" />     </bezel>
529529
530      <bezel name="pg_1000"    element="Page1" state="0">      <bounds x="  0" y=" 40" width="5" height="1" />    </bezel>
531      <bezel name="pg_1001"    element="Page1" state="0">      <bounds x="  0" y=" 41" width="5" height="1" />    </bezel>
532      <bezel name="pg_1002"    element="Page1" state="0">      <bounds x="  0" y=" 42" width="5" height="1" />    </bezel>
533      <bezel name="pg_1003"    element="Page1" state="0">      <bounds x="  0" y=" 43" width="5" height="1" />    </bezel>
534      <bezel name="pg_1004"    element="Page1" state="0">      <bounds x="  0" y=" 44" width="5" height="1" />    </bezel>
535      <bezel name="pg_1005"    element="Page1" state="0">      <bounds x="  0" y=" 45" width="5" height="1" />    </bezel>
536      <bezel name="pg_1006"    element="Page1" state="0">      <bounds x="  0" y=" 46" width="5" height="1" />    </bezel>
537      <bezel name="pg_1007"    element="Page1" state="0">      <bounds x="  6" y=" 40" width="5" height="1" />    </bezel>
538      <bezel name="pg_1008"    element="Page1" state="0">      <bounds x="  6" y=" 41" width="5" height="1" />    </bezel>
539      <bezel name="pg_1009"    element="Page1" state="0">      <bounds x="  6" y=" 42" width="5" height="1" />    </bezel>
540      <bezel name="pg_1010"    element="Page1" state="0">      <bounds x="  6" y=" 43" width="5" height="1" />    </bezel>
541      <bezel name="pg_1011"    element="Page1" state="0">      <bounds x="  6" y=" 44" width="5" height="1" />    </bezel>
542      <bezel name="pg_1012"    element="Page1" state="0">      <bounds x="  6" y=" 45" width="5" height="1" />    </bezel>
543      <bezel name="pg_1013"    element="Page1" state="0">      <bounds x="  6" y=" 46" width="5" height="1" />    </bezel>
544      <bezel name="pg_1014"    element="Page1" state="0">      <bounds x=" 12" y=" 40" width="5" height="1" />    </bezel>
545      <bezel name="pg_1015"    element="Page1" state="0">      <bounds x=" 12" y=" 41" width="5" height="1" />    </bezel>
546      <bezel name="pg_1016"    element="Page1" state="0">      <bounds x=" 12" y=" 42" width="5" height="1" />    </bezel>
547      <bezel name="pg_1017"    element="Page1" state="0">      <bounds x=" 12" y=" 43" width="5" height="1" />    </bezel>
548      <bezel name="pg_1018"    element="Page1" state="0">      <bounds x=" 12" y=" 44" width="5" height="1" />    </bezel>
549      <bezel name="pg_1019"    element="Page1" state="0">      <bounds x=" 12" y=" 45" width="5" height="1" />    </bezel>
550      <bezel name="pg_1020"    element="Page1" state="0">      <bounds x=" 12" y=" 46" width="5" height="1" />    </bezel>
551      <bezel name="pg_1021"    element="Page1" state="0">      <bounds x=" 18" y=" 40" width="5" height="1" />    </bezel>
552      <bezel name="pg_1022"    element="Page1" state="0">      <bounds x=" 18" y=" 41" width="5" height="1" />    </bezel>
553      <bezel name="pg_1023"    element="Page1" state="0">      <bounds x=" 18" y=" 42" width="5" height="1" />    </bezel>
554      <bezel name="pg_1024"    element="Page1" state="0">      <bounds x=" 18" y=" 43" width="5" height="1" />    </bezel>
555      <bezel name="pg_1025"    element="Page1" state="0">      <bounds x=" 18" y=" 44" width="5" height="1" />    </bezel>
556      <bezel name="pg_1026"    element="Page1" state="0">      <bounds x=" 18" y=" 45" width="5" height="1" />    </bezel>
557      <bezel name="pg_1027"    element="Page1" state="0">      <bounds x=" 18" y=" 46" width="5" height="1" />    </bezel>
558      <bezel name="pg_1028"    element="Page1" state="0">      <bounds x=" 24" y=" 40" width="5" height="1" />    </bezel>
559      <bezel name="pg_1029"    element="Page1" state="0">      <bounds x=" 24" y=" 41" width="5" height="1" />    </bezel>
560      <bezel name="pg_1030"    element="Page1" state="0">      <bounds x=" 24" y=" 42" width="5" height="1" />    </bezel>
561      <bezel name="pg_1031"    element="Page1" state="0">      <bounds x=" 24" y=" 43" width="5" height="1" />    </bezel>
562      <bezel name="pg_1032"    element="Page1" state="0">      <bounds x=" 24" y=" 44" width="5" height="1" />    </bezel>
563      <bezel name="pg_1033"    element="Page1" state="0">      <bounds x=" 24" y=" 45" width="5" height="1" />    </bezel>
564      <bezel name="pg_1034"    element="Page1" state="0">      <bounds x=" 24" y=" 46" width="5" height="1" />    </bezel>
565      <bezel name="pg_1035"    element="Page1" state="0">      <bounds x=" 30" y=" 40" width="5" height="1" />    </bezel>
566      <bezel name="pg_1036"    element="Page1" state="0">      <bounds x=" 30" y=" 41" width="5" height="1" />    </bezel>
567      <bezel name="pg_1037"    element="Page1" state="0">      <bounds x=" 30" y=" 42" width="5" height="1" />    </bezel>
568      <bezel name="pg_1038"    element="Page1" state="0">      <bounds x=" 30" y=" 43" width="5" height="1" />    </bezel>
569      <bezel name="pg_1039"    element="Page1" state="0">      <bounds x=" 30" y=" 44" width="5" height="1" />    </bezel>
570      <bezel name="pg_1040"    element="Page1" state="0">      <bounds x=" 30" y=" 45" width="5" height="1" />    </bezel>
571      <bezel name="pg_1041"    element="Page1" state="0">      <bounds x=" 30" y=" 46" width="5" height="1" />    </bezel>
572      <bezel name="pg_1042"    element="Page1" state="0">      <bounds x=" 36" y=" 40" width="5" height="1" />    </bezel>
573      <bezel name="pg_1043"    element="Page1" state="0">      <bounds x=" 36" y=" 41" width="5" height="1" />    </bezel>
574      <bezel name="pg_1044"    element="Page1" state="0">      <bounds x=" 36" y=" 42" width="5" height="1" />    </bezel>
575      <bezel name="pg_1045"    element="Page1" state="0">      <bounds x=" 36" y=" 43" width="5" height="1" />    </bezel>
576      <bezel name="pg_1046"    element="Page1" state="0">      <bounds x=" 36" y=" 44" width="5" height="1" />    </bezel>
577      <bezel name="pg_1047"    element="Page1" state="0">      <bounds x=" 36" y=" 45" width="5" height="1" />    </bezel>
578      <bezel name="pg_1048"    element="Page1" state="0">      <bounds x=" 36" y=" 46" width="5" height="1" />    </bezel>
579      <bezel name="pg_1049"    element="Page1" state="0">      <bounds x=" 42" y=" 40" width="5" height="1" />    </bezel>
580      <bezel name="pg_1050"    element="Page1" state="0">      <bounds x=" 42" y=" 41" width="5" height="1" />    </bezel>
581      <bezel name="pg_1051"    element="Page1" state="0">      <bounds x=" 42" y=" 42" width="5" height="1" />    </bezel>
582      <bezel name="pg_1052"    element="Page1" state="0">      <bounds x=" 42" y=" 43" width="5" height="1" />    </bezel>
583      <bezel name="pg_1053"    element="Page1" state="0">      <bounds x=" 42" y=" 44" width="5" height="1" />    </bezel>
584      <bezel name="pg_1054"    element="Page1" state="0">      <bounds x=" 42" y=" 45" width="5" height="1" />    </bezel>
585      <bezel name="pg_1055"    element="Page1" state="0">      <bounds x=" 42" y=" 46" width="5" height="1" />    </bezel>
586      <bezel name="pg_1056"    element="Page1" state="0">      <bounds x=" 48" y=" 40" width="5" height="1" />    </bezel>
587      <bezel name="pg_1057"    element="Page1" state="0">      <bounds x=" 48" y=" 41" width="5" height="1" />    </bezel>
588      <bezel name="pg_1058"    element="Page1" state="0">      <bounds x=" 48" y=" 42" width="5" height="1" />    </bezel>
589      <bezel name="pg_1059"    element="Page1" state="0">      <bounds x=" 48" y=" 43" width="5" height="1" />    </bezel>
590      <bezel name="pg_1060"    element="Page1" state="0">      <bounds x=" 48" y=" 44" width="5" height="1" />    </bezel>
591      <bezel name="pg_1061"    element="Page1" state="0">      <bounds x=" 48" y=" 45" width="5" height="1" />    </bezel>
592      <bezel name="pg_1062"    element="Page1" state="0">      <bounds x=" 48" y=" 46" width="5" height="1" />    </bezel>
593      <bezel name="pg_1063"    element="Page1" state="0">      <bounds x=" 54" y=" 40" width="5" height="1" />    </bezel>
594      <bezel name="pg_1064"    element="Page1" state="0">      <bounds x=" 54" y=" 41" width="5" height="1" />    </bezel>
595      <bezel name="pg_1065"    element="Page1" state="0">      <bounds x=" 54" y=" 42" width="5" height="1" />    </bezel>
596      <bezel name="pg_1066"    element="Page1" state="0">      <bounds x=" 54" y=" 43" width="5" height="1" />    </bezel>
597      <bezel name="pg_1067"    element="Page1" state="0">      <bounds x=" 54" y=" 44" width="5" height="1" />    </bezel>
598      <bezel name="pg_1068"    element="Page1" state="0">      <bounds x=" 54" y=" 45" width="5" height="1" />    </bezel>
599      <bezel name="pg_1069"    element="Page1" state="0">      <bounds x=" 54" y=" 46" width="5" height="1" />    </bezel>
600      <bezel name="pg_1070"    element="Page1" state="0">      <bounds x=" 60" y=" 40" width="5" height="1" />    </bezel>
601      <bezel name="pg_1071"    element="Page1" state="0">      <bounds x=" 60" y=" 41" width="5" height="1" />    </bezel>
602      <bezel name="pg_1072"    element="Page1" state="0">      <bounds x=" 60" y=" 42" width="5" height="1" />    </bezel>
603      <bezel name="pg_1073"    element="Page1" state="0">      <bounds x=" 60" y=" 43" width="5" height="1" />    </bezel>
604      <bezel name="pg_1074"    element="Page1" state="0">      <bounds x=" 60" y=" 44" width="5" height="1" />    </bezel>
605      <bezel name="pg_1075"    element="Page1" state="0">      <bounds x=" 60" y=" 45" width="5" height="1" />    </bezel>
606      <bezel name="pg_1076"    element="Page1" state="0">      <bounds x=" 60" y=" 46" width="5" height="1" />    </bezel>
607      <bezel name="pg_1077"    element="Page1" state="0">      <bounds x=" 66" y=" 40" width="5" height="1" />    </bezel>
608      <bezel name="pg_1078"    element="Page1" state="0">      <bounds x=" 66" y=" 41" width="5" height="1" />    </bezel>
609      <bezel name="pg_1079"    element="Page1" state="0">      <bounds x=" 66" y=" 42" width="5" height="1" />    </bezel>
610      <bezel name="pg_1080"    element="Page1" state="0">      <bounds x=" 66" y=" 43" width="5" height="1" />    </bezel>
611      <bezel name="pg_1081"    element="Page1" state="0">      <bounds x=" 66" y=" 44" width="5" height="1" />    </bezel>
612      <bezel name="pg_1082"    element="Page1" state="0">      <bounds x=" 66" y=" 45" width="5" height="1" />    </bezel>
613      <bezel name="pg_1083"    element="Page1" state="0">      <bounds x=" 66" y=" 46" width="5" height="1" />    </bezel>
614      <bezel name="pg_1084"    element="Page1" state="0">      <bounds x=" 72" y=" 40" width="5" height="1" />    </bezel>
615      <bezel name="pg_1085"    element="Page1" state="0">      <bounds x=" 72" y=" 41" width="5" height="1" />    </bezel>
616      <bezel name="pg_1086"    element="Page1" state="0">      <bounds x=" 72" y=" 42" width="5" height="1" />    </bezel>
617      <bezel name="pg_1087"    element="Page1" state="0">      <bounds x=" 72" y=" 43" width="5" height="1" />    </bezel>
618      <bezel name="pg_1088"    element="Page1" state="0">      <bounds x=" 72" y=" 44" width="5" height="1" />    </bezel>
619      <bezel name="pg_1089"    element="Page1" state="0">      <bounds x=" 72" y=" 45" width="5" height="1" />    </bezel>
620      <bezel name="pg_1090"    element="Page1" state="0">      <bounds x=" 72" y=" 46" width="5" height="1" />    </bezel>
621      <bezel name="pg_1091"    element="Page1" state="0">      <bounds x=" 78" y=" 40" width="5" height="1" />    </bezel>
622      <bezel name="pg_1092"    element="Page1" state="0">      <bounds x=" 78" y=" 41" width="5" height="1" />    </bezel>
623      <bezel name="pg_1093"    element="Page1" state="0">      <bounds x=" 78" y=" 42" width="5" height="1" />    </bezel>
624      <bezel name="pg_1094"    element="Page1" state="0">      <bounds x=" 78" y=" 43" width="5" height="1" />    </bezel>
625      <bezel name="pg_1095"    element="Page1" state="0">      <bounds x=" 78" y=" 44" width="5" height="1" />    </bezel>
626      <bezel name="pg_1096"    element="Page1" state="0">      <bounds x=" 78" y=" 45" width="5" height="1" />    </bezel>
627      <bezel name="pg_1097"    element="Page1" state="0">      <bounds x=" 78" y=" 46" width="5" height="1" />    </bezel>
628      <bezel name="pg_1098"    element="Page1" state="0">      <bounds x=" 84" y=" 40" width="5" height="1" />    </bezel>
629      <bezel name="pg_1099"    element="Page1" state="0">      <bounds x=" 84" y=" 41" width="5" height="1" />    </bezel>
630      <bezel name="pg_1100"    element="Page1" state="0">      <bounds x=" 84" y=" 42" width="5" height="1" />    </bezel>
631      <bezel name="pg_1101"    element="Page1" state="0">      <bounds x=" 84" y=" 43" width="5" height="1" />    </bezel>
632      <bezel name="pg_1102"    element="Page1" state="0">      <bounds x=" 84" y=" 44" width="5" height="1" />    </bezel>
633      <bezel name="pg_1103"    element="Page1" state="0">      <bounds x=" 84" y=" 45" width="5" height="1" />    </bezel>
634      <bezel name="pg_1104"    element="Page1" state="0">      <bounds x=" 84" y=" 46" width="5" height="1" />    </bezel>
635      <bezel name="pg_1105"    element="Page1" state="0">      <bounds x=" 90" y=" 40" width="5" height="1" />    </bezel>
636      <bezel name="pg_1106"    element="Page1" state="0">      <bounds x=" 90" y=" 41" width="5" height="1" />    </bezel>
637      <bezel name="pg_1107"    element="Page1" state="0">      <bounds x=" 90" y=" 42" width="5" height="1" />    </bezel>
638      <bezel name="pg_1108"    element="Page1" state="0">      <bounds x=" 90" y=" 43" width="5" height="1" />    </bezel>
639      <bezel name="pg_1109"    element="Page1" state="0">      <bounds x=" 90" y=" 44" width="5" height="1" />    </bezel>
640      <bezel name="pg_1110"    element="Page1" state="0">      <bounds x=" 90" y=" 45" width="5" height="1" />    </bezel>
641      <bezel name="pg_1111"    element="Page1" state="0">      <bounds x=" 90" y=" 46" width="5" height="1" />    </bezel>
642      <bezel name="pg_1112"    element="Page1" state="0">      <bounds x="  0" y=" 50" width="5" height="1" />    </bezel>
643      <bezel name="pg_1113"    element="Page1" state="0">      <bounds x="  0" y=" 51" width="5" height="1" />    </bezel>
644      <bezel name="pg_1114"    element="Page1" state="0">      <bounds x="  0" y=" 52" width="5" height="1" />    </bezel>
645      <bezel name="pg_1115"    element="Page1" state="0">      <bounds x="  0" y=" 53" width="5" height="1" />    </bezel>
646      <bezel name="pg_1116"    element="Page1" state="0">      <bounds x="  0" y=" 54" width="5" height="1" />    </bezel>
647      <bezel name="pg_1117"    element="Page1" state="0">      <bounds x="  0" y=" 55" width="5" height="1" />    </bezel>
648      <bezel name="pg_1118"    element="Page1" state="0">      <bounds x="  0" y=" 56" width="5" height="1" />    </bezel>
649      <bezel name="pg_1119"    element="Page1" state="0">      <bounds x="  6" y=" 50" width="5" height="1" />    </bezel>
650      <bezel name="pg_1120"    element="Page1" state="0">      <bounds x="  6" y=" 51" width="5" height="1" />    </bezel>
651      <bezel name="pg_1121"    element="Page1" state="0">      <bounds x="  6" y=" 52" width="5" height="1" />    </bezel>
652      <bezel name="pg_1122"    element="Page1" state="0">      <bounds x="  6" y=" 53" width="5" height="1" />    </bezel>
653      <bezel name="pg_1123"    element="Page1" state="0">      <bounds x="  6" y=" 54" width="5" height="1" />    </bezel>
654      <bezel name="pg_1124"    element="Page1" state="0">      <bounds x="  6" y=" 55" width="5" height="1" />    </bezel>
655      <bezel name="pg_1125"    element="Page1" state="0">      <bounds x="  6" y=" 56" width="5" height="1" />    </bezel>
656      <bezel name="pg_1126"    element="Page1" state="0">      <bounds x=" 12" y=" 50" width="5" height="1" />    </bezel>
657      <bezel name="pg_1127"    element="Page1" state="0">      <bounds x=" 12" y=" 51" width="5" height="1" />    </bezel>
658      <bezel name="pg_1128"    element="Page1" state="0">      <bounds x=" 12" y=" 52" width="5" height="1" />    </bezel>
659      <bezel name="pg_1129"    element="Page1" state="0">      <bounds x=" 12" y=" 53" width="5" height="1" />    </bezel>
660      <bezel name="pg_1130"    element="Page1" state="0">      <bounds x=" 12" y=" 54" width="5" height="1" />    </bezel>
661      <bezel name="pg_1131"    element="Page1" state="0">      <bounds x=" 12" y=" 55" width="5" height="1" />    </bezel>
662      <bezel name="pg_1132"    element="Page1" state="0">      <bounds x=" 12" y=" 56" width="5" height="1" />    </bezel>
663      <bezel name="pg_1133"    element="Page1" state="0">      <bounds x=" 18" y=" 50" width="5" height="1" />    </bezel>
664      <bezel name="pg_1134"    element="Page1" state="0">      <bounds x=" 18" y=" 51" width="5" height="1" />    </bezel>
665      <bezel name="pg_1135"    element="Page1" state="0">      <bounds x=" 18" y=" 52" width="5" height="1" />    </bezel>
666      <bezel name="pg_1136"    element="Page1" state="0">      <bounds x=" 18" y=" 53" width="5" height="1" />    </bezel>
667      <bezel name="pg_1137"    element="Page1" state="0">      <bounds x=" 18" y=" 54" width="5" height="1" />    </bezel>
668      <bezel name="pg_1138"    element="Page1" state="0">      <bounds x=" 18" y=" 55" width="5" height="1" />    </bezel>
669      <bezel name="pg_1139"    element="Page1" state="0">      <bounds x=" 18" y=" 56" width="5" height="1" />    </bezel>
670      <bezel name="pg_1140"    element="Page1" state="0">      <bounds x=" 24" y=" 50" width="5" height="1" />    </bezel>
671      <bezel name="pg_1141"    element="Page1" state="0">      <bounds x=" 24" y=" 51" width="5" height="1" />    </bezel>
672      <bezel name="pg_1142"    element="Page1" state="0">      <bounds x=" 24" y=" 52" width="5" height="1" />    </bezel>
673      <bezel name="pg_1143"    element="Page1" state="0">      <bounds x=" 24" y=" 53" width="5" height="1" />    </bezel>
674      <bezel name="pg_1144"    element="Page1" state="0">      <bounds x=" 24" y=" 54" width="5" height="1" />    </bezel>
675      <bezel name="pg_1145"    element="Page1" state="0">      <bounds x=" 24" y=" 55" width="5" height="1" />    </bezel>
676      <bezel name="pg_1146"    element="Page1" state="0">      <bounds x=" 24" y=" 56" width="5" height="1" />    </bezel>
677      <bezel name="pg_1147"    element="Page1" state="0">      <bounds x=" 30" y=" 50" width="5" height="1" />    </bezel>
678      <bezel name="pg_1148"    element="Page1" state="0">      <bounds x=" 30" y=" 51" width="5" height="1" />    </bezel>
679      <bezel name="pg_1149"    element="Page1" state="0">      <bounds x=" 30" y=" 52" width="5" height="1" />    </bezel>
680      <bezel name="pg_1150"    element="Page1" state="0">      <bounds x=" 30" y=" 53" width="5" height="1" />    </bezel>
681      <bezel name="pg_1151"    element="Page1" state="0">      <bounds x=" 30" y=" 54" width="5" height="1" />    </bezel>
682      <bezel name="pg_1152"    element="Page1" state="0">      <bounds x=" 30" y=" 55" width="5" height="1" />    </bezel>
683      <bezel name="pg_1153"    element="Page1" state="0">      <bounds x=" 30" y=" 56" width="5" height="1" />    </bezel>
684      <bezel name="pg_1154"    element="Page1" state="0">      <bounds x=" 36" y=" 50" width="5" height="1" />    </bezel>
685      <bezel name="pg_1155"    element="Page1" state="0">      <bounds x=" 36" y=" 51" width="5" height="1" />    </bezel>
686      <bezel name="pg_1156"    element="Page1" state="0">      <bounds x=" 36" y=" 52" width="5" height="1" />    </bezel>
687      <bezel name="pg_1157"    element="Page1" state="0">      <bounds x=" 36" y=" 53" width="5" height="1" />    </bezel>
688      <bezel name="pg_1158"    element="Page1" state="0">      <bounds x=" 36" y=" 54" width="5" height="1" />    </bezel>
689      <bezel name="pg_1159"    element="Page1" state="0">      <bounds x=" 36" y=" 55" width="5" height="1" />    </bezel>
690      <bezel name="pg_1160"    element="Page1" state="0">      <bounds x=" 36" y=" 56" width="5" height="1" />    </bezel>
691      <bezel name="pg_1161"    element="Page1" state="0">      <bounds x=" 42" y=" 50" width="5" height="1" />    </bezel>
692      <bezel name="pg_1162"    element="Page1" state="0">      <bounds x=" 42" y=" 51" width="5" height="1" />    </bezel>
693      <bezel name="pg_1163"    element="Page1" state="0">      <bounds x=" 42" y=" 52" width="5" height="1" />    </bezel>
694      <bezel name="pg_1164"    element="Page1" state="0">      <bounds x=" 42" y=" 53" width="5" height="1" />    </bezel>
695      <bezel name="pg_1165"    element="Page1" state="0">      <bounds x=" 42" y=" 54" width="5" height="1" />    </bezel>
696      <bezel name="pg_1166"    element="Page1" state="0">      <bounds x=" 42" y=" 55" width="5" height="1" />    </bezel>
697      <bezel name="pg_1167"    element="Page1" state="0">      <bounds x=" 42" y=" 56" width="5" height="1" />    </bezel>
698      <bezel name="pg_1168"    element="Page1" state="0">      <bounds x=" 48" y=" 50" width="5" height="1" />    </bezel>
699      <bezel name="pg_1169"    element="Page1" state="0">      <bounds x=" 48" y=" 51" width="5" height="1" />    </bezel>
700      <bezel name="pg_1170"    element="Page1" state="0">      <bounds x=" 48" y=" 52" width="5" height="1" />    </bezel>
701      <bezel name="pg_1171"    element="Page1" state="0">      <bounds x=" 48" y=" 53" width="5" height="1" />    </bezel>
702      <bezel name="pg_1172"    element="Page1" state="0">      <bounds x=" 48" y=" 54" width="5" height="1" />    </bezel>
703      <bezel name="pg_1173"    element="Page1" state="0">      <bounds x=" 48" y=" 55" width="5" height="1" />    </bezel>
704      <bezel name="pg_1174"    element="Page1" state="0">      <bounds x=" 48" y=" 56" width="5" height="1" />    </bezel>
705      <bezel name="pg_1175"    element="Page1" state="0">      <bounds x=" 54" y=" 50" width="5" height="1" />    </bezel>
706      <bezel name="pg_1176"    element="Page1" state="0">      <bounds x=" 54" y=" 51" width="5" height="1" />    </bezel>
707      <bezel name="pg_1177"    element="Page1" state="0">      <bounds x=" 54" y=" 52" width="5" height="1" />    </bezel>
708      <bezel name="pg_1178"    element="Page1" state="0">      <bounds x=" 54" y=" 53" width="5" height="1" />    </bezel>
709      <bezel name="pg_1179"    element="Page1" state="0">      <bounds x=" 54" y=" 54" width="5" height="1" />    </bezel>
710      <bezel name="pg_1180"    element="Page1" state="0">      <bounds x=" 54" y=" 55" width="5" height="1" />    </bezel>
711      <bezel name="pg_1181"    element="Page1" state="0">      <bounds x=" 54" y=" 56" width="5" height="1" />    </bezel>
712      <bezel name="pg_1182"    element="Page1" state="0">      <bounds x=" 60" y=" 50" width="5" height="1" />    </bezel>
713      <bezel name="pg_1183"    element="Page1" state="0">      <bounds x=" 60" y=" 51" width="5" height="1" />    </bezel>
714      <bezel name="pg_1184"    element="Page1" state="0">      <bounds x=" 60" y=" 52" width="5" height="1" />    </bezel>
715      <bezel name="pg_1185"    element="Page1" state="0">      <bounds x=" 60" y=" 53" width="5" height="1" />    </bezel>
716      <bezel name="pg_1186"    element="Page1" state="0">      <bounds x=" 60" y=" 54" width="5" height="1" />    </bezel>
717      <bezel name="pg_1187"    element="Page1" state="0">      <bounds x=" 60" y=" 55" width="5" height="1" />    </bezel>
718      <bezel name="pg_1188"    element="Page1" state="0">      <bounds x=" 60" y=" 56" width="5" height="1" />    </bezel>
719      <bezel name="pg_1189"    element="Page1" state="0">      <bounds x=" 66" y=" 50" width="5" height="1" />    </bezel>
720      <bezel name="pg_1190"    element="Page1" state="0">      <bounds x=" 66" y=" 51" width="5" height="1" />    </bezel>
721      <bezel name="pg_1191"    element="Page1" state="0">      <bounds x=" 66" y=" 52" width="5" height="1" />    </bezel>
722      <bezel name="pg_1192"    element="Page1" state="0">      <bounds x=" 66" y=" 53" width="5" height="1" />    </bezel>
723      <bezel name="pg_1193"    element="Page1" state="0">      <bounds x=" 66" y=" 54" width="5" height="1" />    </bezel>
724      <bezel name="pg_1194"    element="Page1" state="0">      <bounds x=" 66" y=" 55" width="5" height="1" />    </bezel>
725      <bezel name="pg_1195"    element="Page1" state="0">      <bounds x=" 66" y=" 56" width="5" height="1" />    </bezel>
726      <bezel name="pg_1196"    element="Page1" state="0">      <bounds x=" 72" y=" 50" width="5" height="1" />    </bezel>
727      <bezel name="pg_1197"    element="Page1" state="0">      <bounds x=" 72" y=" 51" width="5" height="1" />    </bezel>
728      <bezel name="pg_1198"    element="Page1" state="0">      <bounds x=" 72" y=" 52" width="5" height="1" />    </bezel>
729      <bezel name="pg_1199"    element="Page1" state="0">      <bounds x=" 72" y=" 53" width="5" height="1" />    </bezel>
730      <bezel name="pg_1200"    element="Page1" state="0">      <bounds x=" 72" y=" 54" width="5" height="1" />    </bezel>
731      <bezel name="pg_1201"    element="Page1" state="0">      <bounds x=" 72" y=" 55" width="5" height="1" />    </bezel>
732      <bezel name="pg_1202"    element="Page1" state="0">      <bounds x=" 72" y=" 56" width="5" height="1" />    </bezel>
733      <bezel name="pg_1203"    element="Page1" state="0">      <bounds x=" 78" y=" 50" width="5" height="1" />    </bezel>
734      <bezel name="pg_1204"    element="Page1" state="0">      <bounds x=" 78" y=" 51" width="5" height="1" />    </bezel>
735      <bezel name="pg_1205"    element="Page1" state="0">      <bounds x=" 78" y=" 52" width="5" height="1" />    </bezel>
736      <bezel name="pg_1206"    element="Page1" state="0">      <bounds x=" 78" y=" 53" width="5" height="1" />    </bezel>
737      <bezel name="pg_1207"    element="Page1" state="0">      <bounds x=" 78" y=" 54" width="5" height="1" />    </bezel>
738      <bezel name="pg_1208"    element="Page1" state="0">      <bounds x=" 78" y=" 55" width="5" height="1" />    </bezel>
739      <bezel name="pg_1209"    element="Page1" state="0">      <bounds x=" 78" y=" 56" width="5" height="1" />    </bezel>
740      <bezel name="pg_1210"    element="Page1" state="0">      <bounds x=" 84" y=" 50" width="5" height="1" />    </bezel>
741      <bezel name="pg_1211"    element="Page1" state="0">      <bounds x=" 84" y=" 51" width="5" height="1" />    </bezel>
742      <bezel name="pg_1212"    element="Page1" state="0">      <bounds x=" 84" y=" 52" width="5" height="1" />    </bezel>
743      <bezel name="pg_1213"    element="Page1" state="0">      <bounds x=" 84" y=" 53" width="5" height="1" />    </bezel>
744      <bezel name="pg_1214"    element="Page1" state="0">      <bounds x=" 84" y=" 54" width="5" height="1" />    </bezel>
745      <bezel name="pg_1215"    element="Page1" state="0">      <bounds x=" 84" y=" 55" width="5" height="1" />    </bezel>
746      <bezel name="pg_1216"    element="Page1" state="0">      <bounds x=" 84" y=" 56" width="5" height="1" />    </bezel>
747      <bezel name="pg_1217"    element="Page1" state="0">      <bounds x=" 90" y=" 50" width="5" height="1" />    </bezel>
748      <bezel name="pg_1218"    element="Page1" state="0">      <bounds x=" 90" y=" 51" width="5" height="1" />    </bezel>
749      <bezel name="pg_1219"    element="Page1" state="0">      <bounds x=" 90" y=" 52" width="5" height="1" />    </bezel>
750      <bezel name="pg_1220"    element="Page1" state="0">      <bounds x=" 90" y=" 53" width="5" height="1" />    </bezel>
751      <bezel name="pg_1221"    element="Page1" state="0">      <bounds x=" 90" y=" 54" width="5" height="1" />    </bezel>
752      <bezel name="pg_1222"    element="Page1" state="0">      <bounds x=" 90" y=" 55" width="5" height="1" />    </bezel>
753      <bezel name="pg_1223"    element="Page1" state="0">      <bounds x=" 90" y=" 56" width="5" height="1" />    </bezel>
530      <bezel name="pg_1000"    element="Page1" state="0">     <bounds x="  0" y=" 40" width="5" height="1" />     </bezel>
531      <bezel name="pg_1001"    element="Page1" state="0">     <bounds x="  0" y=" 41" width="5" height="1" />     </bezel>
532      <bezel name="pg_1002"    element="Page1" state="0">     <bounds x="  0" y=" 42" width="5" height="1" />     </bezel>
533      <bezel name="pg_1003"    element="Page1" state="0">     <bounds x="  0" y=" 43" width="5" height="1" />     </bezel>
534      <bezel name="pg_1004"    element="Page1" state="0">     <bounds x="  0" y=" 44" width="5" height="1" />     </bezel>
535      <bezel name="pg_1005"    element="Page1" state="0">     <bounds x="  0" y=" 45" width="5" height="1" />     </bezel>
536      <bezel name="pg_1006"    element="Page1" state="0">     <bounds x="  0" y=" 46" width="5" height="1" />     </bezel>
537      <bezel name="pg_1007"    element="Page1" state="0">     <bounds x="  6" y=" 40" width="5" height="1" />     </bezel>
538      <bezel name="pg_1008"    element="Page1" state="0">     <bounds x="  6" y=" 41" width="5" height="1" />     </bezel>
539      <bezel name="pg_1009"    element="Page1" state="0">     <bounds x="  6" y=" 42" width="5" height="1" />     </bezel>
540      <bezel name="pg_1010"    element="Page1" state="0">     <bounds x="  6" y=" 43" width="5" height="1" />     </bezel>
541      <bezel name="pg_1011"    element="Page1" state="0">     <bounds x="  6" y=" 44" width="5" height="1" />     </bezel>
542      <bezel name="pg_1012"    element="Page1" state="0">     <bounds x="  6" y=" 45" width="5" height="1" />     </bezel>
543      <bezel name="pg_1013"    element="Page1" state="0">     <bounds x="  6" y=" 46" width="5" height="1" />     </bezel>
544      <bezel name="pg_1014"    element="Page1" state="0">     <bounds x=" 12" y=" 40" width="5" height="1" />     </bezel>
545      <bezel name="pg_1015"    element="Page1" state="0">     <bounds x=" 12" y=" 41" width="5" height="1" />     </bezel>
546      <bezel name="pg_1016"    element="Page1" state="0">     <bounds x=" 12" y=" 42" width="5" height="1" />     </bezel>
547      <bezel name="pg_1017"    element="Page1" state="0">     <bounds x=" 12" y=" 43" width="5" height="1" />     </bezel>
548      <bezel name="pg_1018"    element="Page1" state="0">     <bounds x=" 12" y=" 44" width="5" height="1" />     </bezel>
549      <bezel name="pg_1019"    element="Page1" state="0">     <bounds x=" 12" y=" 45" width="5" height="1" />     </bezel>
550      <bezel name="pg_1020"    element="Page1" state="0">     <bounds x=" 12" y=" 46" width="5" height="1" />     </bezel>
551      <bezel name="pg_1021"    element="Page1" state="0">     <bounds x=" 18" y=" 40" width="5" height="1" />     </bezel>
552      <bezel name="pg_1022"    element="Page1" state="0">     <bounds x=" 18" y=" 41" width="5" height="1" />     </bezel>
553      <bezel name="pg_1023"    element="Page1" state="0">     <bounds x=" 18" y=" 42" width="5" height="1" />     </bezel>
554      <bezel name="pg_1024"    element="Page1" state="0">     <bounds x=" 18" y=" 43" width="5" height="1" />     </bezel>
555      <bezel name="pg_1025"    element="Page1" state="0">     <bounds x=" 18" y=" 44" width="5" height="1" />     </bezel>
556      <bezel name="pg_1026"    element="Page1" state="0">     <bounds x=" 18" y=" 45" width="5" height="1" />     </bezel>
557      <bezel name="pg_1027"    element="Page1" state="0">     <bounds x=" 18" y=" 46" width="5" height="1" />     </bezel>
558      <bezel name="pg_1028"    element="Page1" state="0">     <bounds x=" 24" y=" 40" width="5" height="1" />     </bezel>
559      <bezel name="pg_1029"    element="Page1" state="0">     <bounds x=" 24" y=" 41" width="5" height="1" />     </bezel>
560      <bezel name="pg_1030"    element="Page1" state="0">     <bounds x=" 24" y=" 42" width="5" height="1" />     </bezel>
561      <bezel name="pg_1031"    element="Page1" state="0">     <bounds x=" 24" y=" 43" width="5" height="1" />     </bezel>
562      <bezel name="pg_1032"    element="Page1" state="0">     <bounds x=" 24" y=" 44" width="5" height="1" />     </bezel>
563      <bezel name="pg_1033"    element="Page1" state="0">     <bounds x=" 24" y=" 45" width="5" height="1" />     </bezel>
564      <bezel name="pg_1034"    element="Page1" state="0">     <bounds x=" 24" y=" 46" width="5" height="1" />     </bezel>
565      <bezel name="pg_1035"    element="Page1" state="0">     <bounds x=" 30" y=" 40" width="5" height="1" />     </bezel>
566      <bezel name="pg_1036"    element="Page1" state="0">     <bounds x=" 30" y=" 41" width="5" height="1" />     </bezel>
567      <bezel name="pg_1037"    element="Page1" state="0">     <bounds x=" 30" y=" 42" width="5" height="1" />     </bezel>
568      <bezel name="pg_1038"    element="Page1" state="0">     <bounds x=" 30" y=" 43" width="5" height="1" />     </bezel>
569      <bezel name="pg_1039"    element="Page1" state="0">     <bounds x=" 30" y=" 44" width="5" height="1" />     </bezel>
570      <bezel name="pg_1040"    element="Page1" state="0">     <bounds x=" 30" y=" 45" width="5" height="1" />     </bezel>
571      <bezel name="pg_1041"    element="Page1" state="0">     <bounds x=" 30" y=" 46" width="5" height="1" />     </bezel>
572      <bezel name="pg_1042"    element="Page1" state="0">     <bounds x=" 36" y=" 40" width="5" height="1" />     </bezel>
573      <bezel name="pg_1043"    element="Page1" state="0">     <bounds x=" 36" y=" 41" width="5" height="1" />     </bezel>
574      <bezel name="pg_1044"    element="Page1" state="0">     <bounds x=" 36" y=" 42" width="5" height="1" />     </bezel>
575      <bezel name="pg_1045"    element="Page1" state="0">     <bounds x=" 36" y=" 43" width="5" height="1" />     </bezel>
576      <bezel name="pg_1046"    element="Page1" state="0">     <bounds x=" 36" y=" 44" width="5" height="1" />     </bezel>
577      <bezel name="pg_1047"    element="Page1" state="0">     <bounds x=" 36" y=" 45" width="5" height="1" />     </bezel>
578      <bezel name="pg_1048"    element="Page1" state="0">     <bounds x=" 36" y=" 46" width="5" height="1" />     </bezel>
579      <bezel name="pg_1049"    element="Page1" state="0">     <bounds x=" 42" y=" 40" width="5" height="1" />     </bezel>
580      <bezel name="pg_1050"    element="Page1" state="0">     <bounds x=" 42" y=" 41" width="5" height="1" />     </bezel>
581      <bezel name="pg_1051"    element="Page1" state="0">     <bounds x=" 42" y=" 42" width="5" height="1" />     </bezel>
582      <bezel name="pg_1052"    element="Page1" state="0">     <bounds x=" 42" y=" 43" width="5" height="1" />     </bezel>
583      <bezel name="pg_1053"    element="Page1" state="0">     <bounds x=" 42" y=" 44" width="5" height="1" />     </bezel>
584      <bezel name="pg_1054"    element="Page1" state="0">     <bounds x=" 42" y=" 45" width="5" height="1" />     </bezel>
585      <bezel name="pg_1055"    element="Page1" state="0">     <bounds x=" 42" y=" 46" width="5" height="1" />     </bezel>
586      <bezel name="pg_1056"    element="Page1" state="0">     <bounds x=" 48" y=" 40" width="5" height="1" />     </bezel>
587      <bezel name="pg_1057"    element="Page1" state="0">     <bounds x=" 48" y=" 41" width="5" height="1" />     </bezel>
588      <bezel name="pg_1058"    element="Page1" state="0">     <bounds x=" 48" y=" 42" width="5" height="1" />     </bezel>
589      <bezel name="pg_1059"    element="Page1" state="0">     <bounds x=" 48" y=" 43" width="5" height="1" />     </bezel>
590      <bezel name="pg_1060"    element="Page1" state="0">     <bounds x=" 48" y=" 44" width="5" height="1" />     </bezel>
591      <bezel name="pg_1061"    element="Page1" state="0">     <bounds x=" 48" y=" 45" width="5" height="1" />     </bezel>
592      <bezel name="pg_1062"    element="Page1" state="0">     <bounds x=" 48" y=" 46" width="5" height="1" />     </bezel>
593      <bezel name="pg_1063"    element="Page1" state="0">     <bounds x=" 54" y=" 40" width="5" height="1" />     </bezel>
594      <bezel name="pg_1064"    element="Page1" state="0">     <bounds x=" 54" y=" 41" width="5" height="1" />     </bezel>
595      <bezel name="pg_1065"    element="Page1" state="0">     <bounds x=" 54" y=" 42" width="5" height="1" />     </bezel>
596      <bezel name="pg_1066"    element="Page1" state="0">     <bounds x=" 54" y=" 43" width="5" height="1" />     </bezel>
597      <bezel name="pg_1067"    element="Page1" state="0">     <bounds x=" 54" y=" 44" width="5" height="1" />     </bezel>
598      <bezel name="pg_1068"    element="Page1" state="0">     <bounds x=" 54" y=" 45" width="5" height="1" />     </bezel>
599      <bezel name="pg_1069"    element="Page1" state="0">     <bounds x=" 54" y=" 46" width="5" height="1" />     </bezel>
600      <bezel name="pg_1070"    element="Page1" state="0">     <bounds x=" 60" y=" 40" width="5" height="1" />     </bezel>
601      <bezel name="pg_1071"    element="Page1" state="0">     <bounds x=" 60" y=" 41" width="5" height="1" />     </bezel>
602      <bezel name="pg_1072"    element="Page1" state="0">     <bounds x=" 60" y=" 42" width="5" height="1" />     </bezel>
603      <bezel name="pg_1073"    element="Page1" state="0">     <bounds x=" 60" y=" 43" width="5" height="1" />     </bezel>
604      <bezel name="pg_1074"    element="Page1" state="0">     <bounds x=" 60" y=" 44" width="5" height="1" />     </bezel>
605      <bezel name="pg_1075"    element="Page1" state="0">     <bounds x=" 60" y=" 45" width="5" height="1" />     </bezel>
606      <bezel name="pg_1076"    element="Page1" state="0">     <bounds x=" 60" y=" 46" width="5" height="1" />     </bezel>
607      <bezel name="pg_1077"    element="Page1" state="0">     <bounds x=" 66" y=" 40" width="5" height="1" />     </bezel>
608      <bezel name="pg_1078"    element="Page1" state="0">     <bounds x=" 66" y=" 41" width="5" height="1" />     </bezel>
609      <bezel name="pg_1079"    element="Page1" state="0">     <bounds x=" 66" y=" 42" width="5" height="1" />     </bezel>
610      <bezel name="pg_1080"    element="Page1" state="0">     <bounds x=" 66" y=" 43" width="5" height="1" />     </bezel>
611      <bezel name="pg_1081"    element="Page1" state="0">     <bounds x=" 66" y=" 44" width="5" height="1" />     </bezel>
612      <bezel name="pg_1082"    element="Page1" state="0">     <bounds x=" 66" y=" 45" width="5" height="1" />     </bezel>
613      <bezel name="pg_1083"    element="Page1" state="0">     <bounds x=" 66" y=" 46" width="5" height="1" />     </bezel>
614      <bezel name="pg_1084"    element="Page1" state="0">     <bounds x=" 72" y=" 40" width="5" height="1" />     </bezel>
615      <bezel name="pg_1085"    element="Page1" state="0">     <bounds x=" 72" y=" 41" width="5" height="1" />     </bezel>
616      <bezel name="pg_1086"    element="Page1" state="0">     <bounds x=" 72" y=" 42" width="5" height="1" />     </bezel>
617      <bezel name="pg_1087"    element="Page1" state="0">     <bounds x=" 72" y=" 43" width="5" height="1" />     </bezel>
618      <bezel name="pg_1088"    element="Page1" state="0">     <bounds x=" 72" y=" 44" width="5" height="1" />     </bezel>
619      <bezel name="pg_1089"    element="Page1" state="0">     <bounds x=" 72" y=" 45" width="5" height="1" />     </bezel>
620      <bezel name="pg_1090"    element="Page1" state="0">     <bounds x=" 72" y=" 46" width="5" height="1" />     </bezel>
621      <bezel name="pg_1091"    element="Page1" state="0">     <bounds x=" 78" y=" 40" width="5" height="1" />     </bezel>
622      <bezel name="pg_1092"    element="Page1" state="0">     <bounds x=" 78" y=" 41" width="5" height="1" />     </bezel>
623      <bezel name="pg_1093"    element="Page1" state="0">     <bounds x=" 78" y=" 42" width="5" height="1" />     </bezel>
624      <bezel name="pg_1094"    element="Page1" state="0">     <bounds x=" 78" y=" 43" width="5" height="1" />     </bezel>
625      <bezel name="pg_1095"    element="Page1" state="0">     <bounds x=" 78" y=" 44" width="5" height="1" />     </bezel>
626      <bezel name="pg_1096"    element="Page1" state="0">     <bounds x=" 78" y=" 45" width="5" height="1" />     </bezel>
627      <bezel name="pg_1097"    element="Page1" state="0">     <bounds x=" 78" y=" 46" width="5" height="1" />     </bezel>
628      <bezel name="pg_1098"    element="Page1" state="0">     <bounds x=" 84" y=" 40" width="5" height="1" />     </bezel>
629      <bezel name="pg_1099"    element="Page1" state="0">     <bounds x=" 84" y=" 41" width="5" height="1" />     </bezel>
630      <bezel name="pg_1100"    element="Page1" state="0">     <bounds x=" 84" y=" 42" width="5" height="1" />     </bezel>
631      <bezel name="pg_1101"    element="Page1" state="0">     <bounds x=" 84" y=" 43" width="5" height="1" />     </bezel>
632      <bezel name="pg_1102"    element="Page1" state="0">     <bounds x=" 84" y=" 44" width="5" height="1" />     </bezel>
633      <bezel name="pg_1103"    element="Page1" state="0">     <bounds x=" 84" y=" 45" width="5" height="1" />     </bezel>
634      <bezel name="pg_1104"    element="Page1" state="0">     <bounds x=" 84" y=" 46" width="5" height="1" />     </bezel>
635      <bezel name="pg_1105"    element="Page1" state="0">     <bounds x=" 90" y=" 40" width="5" height="1" />     </bezel>
636      <bezel name="pg_1106"    element="Page1" state="0">     <bounds x=" 90" y=" 41" width="5" height="1" />     </bezel>
637      <bezel name="pg_1107"    element="Page1" state="0">     <bounds x=" 90" y=" 42" width="5" height="1" />     </bezel>
638      <bezel name="pg_1108"    element="Page1" state="0">     <bounds x=" 90" y=" 43" width="5" height="1" />     </bezel>
639      <bezel name="pg_1109"    element="Page1" state="0">     <bounds x=" 90" y=" 44" width="5" height="1" />     </bezel>
640      <bezel name="pg_1110"    element="Page1" state="0">     <bounds x=" 90" y=" 45" width="5" height="1" />     </bezel>
641      <bezel name="pg_1111"    element="Page1" state="0">     <bounds x=" 90" y=" 46" width="5" height="1" />     </bezel>
642      <bezel name="pg_1112"    element="Page1" state="0">     <bounds x="  0" y=" 50" width="5" height="1" />     </bezel>
643      <bezel name="pg_1113"    element="Page1" state="0">     <bounds x="  0" y=" 51" width="5" height="1" />     </bezel>
644      <bezel name="pg_1114"    element="Page1" state="0">     <bounds x="  0" y=" 52" width="5" height="1" />     </bezel>
645      <bezel name="pg_1115"    element="Page1" state="0">     <bounds x="  0" y=" 53" width="5" height="1" />     </bezel>
646      <bezel name="pg_1116"    element="Page1" state="0">     <bounds x="  0" y=" 54" width="5" height="1" />     </bezel>
647      <bezel name="pg_1117"    element="Page1" state="0">     <bounds x="  0" y=" 55" width="5" height="1" />     </bezel>
648      <bezel name="pg_1118"    element="Page1" state="0">     <bounds x="  0" y=" 56" width="5" height="1" />     </bezel>
649      <bezel name="pg_1119"    element="Page1" state="0">     <bounds x="  6" y=" 50" width="5" height="1" />     </bezel>
650      <bezel name="pg_1120"    element="Page1" state="0">     <bounds x="  6" y=" 51" width="5" height="1" />     </bezel>
651      <bezel name="pg_1121"    element="Page1" state="0">     <bounds x="  6" y=" 52" width="5" height="1" />     </bezel>
652      <bezel name="pg_1122"    element="Page1" state="0">     <bounds x="  6" y=" 53" width="5" height="1" />     </bezel>
653      <bezel name="pg_1123"    element="Page1" state="0">     <bounds x="  6" y=" 54" width="5" height="1" />     </bezel>
654      <bezel name="pg_1124"    element="Page1" state="0">     <bounds x="  6" y=" 55" width="5" height="1" />     </bezel>
655      <bezel name="pg_1125"    element="Page1" state="0">     <bounds x="  6" y=" 56" width="5" height="1" />     </bezel>
656      <bezel name="pg_1126"    element="Page1" state="0">     <bounds x=" 12" y=" 50" width="5" height="1" />     </bezel>
657      <bezel name="pg_1127"    element="Page1" state="0">     <bounds x=" 12" y=" 51" width="5" height="1" />     </bezel>
658      <bezel name="pg_1128"    element="Page1" state="0">     <bounds x=" 12" y=" 52" width="5" height="1" />     </bezel>
659      <bezel name="pg_1129"    element="Page1" state="0">     <bounds x=" 12" y=" 53" width="5" height="1" />     </bezel>
660      <bezel name="pg_1130"    element="Page1" state="0">     <bounds x=" 12" y=" 54" width="5" height="1" />     </bezel>
661      <bezel name="pg_1131"    element="Page1" state="0">     <bounds x=" 12" y=" 55" width="5" height="1" />     </bezel>
662      <bezel name="pg_1132"    element="Page1" state="0">     <bounds x=" 12" y=" 56" width="5" height="1" />     </bezel>
663      <bezel name="pg_1133"    element="Page1" state="0">     <bounds x=" 18" y=" 50" width="5" height="1" />     </bezel>
664      <bezel name="pg_1134"    element="Page1" state="0">     <bounds x=" 18" y=" 51" width="5" height="1" />     </bezel>
665      <bezel name="pg_1135"    element="Page1" state="0">     <bounds x=" 18" y=" 52" width="5" height="1" />     </bezel>
666      <bezel name="pg_1136"    element="Page1" state="0">     <bounds x=" 18" y=" 53" width="5" height="1" />     </bezel>
667      <bezel name="pg_1137"    element="Page1" state="0">     <bounds x=" 18" y=" 54" width="5" height="1" />     </bezel>
668      <bezel name="pg_1138"    element="Page1" state="0">     <bounds x=" 18" y=" 55" width="5" height="1" />     </bezel>
669      <bezel name="pg_1139"    element="Page1" state="0">     <bounds x=" 18" y=" 56" width="5" height="1" />     </bezel>
670      <bezel name="pg_1140"    element="Page1" state="0">     <bounds x=" 24" y=" 50" width="5" height="1" />     </bezel>
671      <bezel name="pg_1141"    element="Page1" state="0">     <bounds x=" 24" y=" 51" width="5" height="1" />     </bezel>
672      <bezel name="pg_1142"    element="Page1" state="0">     <bounds x=" 24" y=" 52" width="5" height="1" />     </bezel>
673      <bezel name="pg_1143"    element="Page1" state="0">     <bounds x=" 24" y=" 53" width="5" height="1" />     </bezel>
674      <bezel name="pg_1144"    element="Page1" state="0">     <bounds x=" 24" y=" 54" width="5" height="1" />     </bezel>
675      <bezel name="pg_1145"    element="Page1" state="0">     <bounds x=" 24" y=" 55" width="5" height="1" />     </bezel>
676      <bezel name="pg_1146"    element="Page1" state="0">     <bounds x=" 24" y=" 56" width="5" height="1" />     </bezel>
677      <bezel name="pg_1147"    element="Page1" state="0">     <bounds x=" 30" y=" 50" width="5" height="1" />     </bezel>
678      <bezel name="pg_1148"    element="Page1" state="0">     <bounds x=" 30" y=" 51" width="5" height="1" />     </bezel>
679      <bezel name="pg_1149"    element="Page1" state="0">     <bounds x=" 30" y=" 52" width="5" height="1" />     </bezel>
680      <bezel name="pg_1150"    element="Page1" state="0">     <bounds x=" 30" y=" 53" width="5" height="1" />     </bezel>
681      <bezel name="pg_1151"    element="Page1" state="0">     <bounds x=" 30" y=" 54" width="5" height="1" />     </bezel>
682      <bezel name="pg_1152"    element="Page1" state="0">     <bounds x=" 30" y=" 55" width="5" height="1" />     </bezel>
683      <bezel name="pg_1153"    element="Page1" state="0">     <bounds x=" 30" y=" 56" width="5" height="1" />     </bezel>
684      <bezel name="pg_1154"    element="Page1" state="0">     <bounds x=" 36" y=" 50" width="5" height="1" />     </bezel>
685      <bezel name="pg_1155"    element="Page1" state="0">     <bounds x=" 36" y=" 51" width="5" height="1" />     </bezel>
686      <bezel name="pg_1156"    element="Page1" state="0">     <bounds x=" 36" y=" 52" width="5" height="1" />     </bezel>
687      <bezel name="pg_1157"    element="Page1" state="0">     <bounds x=" 36" y=" 53" width="5" height="1" />     </bezel>
688      <bezel name="pg_1158"    element="Page1" state="0">     <bounds x=" 36" y=" 54" width="5" height="1" />     </bezel>
689      <bezel name="pg_1159"    element="Page1" state="0">     <bounds x=" 36" y=" 55" width="5" height="1" />     </bezel>
690      <bezel name="pg_1160"    element="Page1" state="0">     <bounds x=" 36" y=" 56" width="5" height="1" />     </bezel>
691      <bezel name="pg_1161"    element="Page1" state="0">     <bounds x=" 42" y=" 50" width="5" height="1" />     </bezel>
692      <bezel name="pg_1162"    element="Page1" state="0">     <bounds x=" 42" y=" 51" width="5" height="1" />     </bezel>
693      <bezel name="pg_1163"    element="Page1" state="0">     <bounds x=" 42" y=" 52" width="5" height="1" />     </bezel>
694      <bezel name="pg_1164"    element="Page1" state="0">     <bounds x=" 42" y=" 53" width="5" height="1" />     </bezel>
695      <bezel name="pg_1165"    element="Page1" state="0">     <bounds x=" 42" y=" 54" width="5" height="1" />     </bezel>
696      <bezel name="pg_1166"    element="Page1" state="0">     <bounds x=" 42" y=" 55" width="5" height="1" />     </bezel>
697      <bezel name="pg_1167"    element="Page1" state="0">     <bounds x=" 42" y=" 56" width="5" height="1" />     </bezel>
698      <bezel name="pg_1168"    element="Page1" state="0">     <bounds x=" 48" y=" 50" width="5" height="1" />     </bezel>
699      <bezel name="pg_1169"    element="Page1" state="0">     <bounds x=" 48" y=" 51" width="5" height="1" />     </bezel>
700      <bezel name="pg_1170"    element="Page1" state="0">     <bounds x=" 48" y=" 52" width="5" height="1" />     </bezel>
701      <bezel name="pg_1171"    element="Page1" state="0">     <bounds x=" 48" y=" 53" width="5" height="1" />     </bezel>
702      <bezel name="pg_1172"    element="Page1" state="0">     <bounds x=" 48" y=" 54" width="5" height="1" />     </bezel>
703      <bezel name="pg_1173"    element="Page1" state="0">     <bounds x=" 48" y=" 55" width="5" height="1" />     </bezel>
704      <bezel name="pg_1174"    element="Page1" state="0">     <bounds x=" 48" y=" 56" width="5" height="1" />     </bezel>
705      <bezel name="pg_1175"    element="Page1" state="0">     <bounds x=" 54" y=" 50" width="5" height="1" />     </bezel>
706      <bezel name="pg_1176"    element="Page1" state="0">     <bounds x=" 54" y=" 51" width="5" height="1" />     </bezel>
707      <bezel name="pg_1177"    element="Page1" state="0">     <bounds x=" 54" y=" 52" width="5" height="1" />     </bezel>
708      <bezel name="pg_1178"    element="Page1" state="0">     <bounds x=" 54" y=" 53" width="5" height="1" />     </bezel>
709      <bezel name="pg_1179"    element="Page1" state="0">     <bounds x=" 54" y=" 54" width="5" height="1" />     </bezel>
710      <bezel name="pg_1180"    element="Page1" state="0">     <bounds x=" 54" y=" 55" width="5" height="1" />     </bezel>
711      <bezel name="pg_1181"    element="Page1" state="0">     <bounds x=" 54" y=" 56" width="5" height="1" />     </bezel>
712      <bezel name="pg_1182"    element="Page1" state="0">     <bounds x=" 60" y=" 50" width="5" height="1" />     </bezel>
713      <bezel name="pg_1183"    element="Page1" state="0">     <bounds x=" 60" y=" 51" width="5" height="1" />     </bezel>
714      <bezel name="pg_1184"    element="Page1" state="0">     <bounds x=" 60" y=" 52" width="5" height="1" />     </bezel>
715      <bezel name="pg_1185"    element="Page1" state="0">     <bounds x=" 60" y=" 53" width="5" height="1" />     </bezel>
716      <bezel name="pg_1186"    element="Page1" state="0">     <bounds x=" 60" y=" 54" width="5" height="1" />     </bezel>
717      <bezel name="pg_1187"    element="Page1" state="0">     <bounds x=" 60" y=" 55" width="5" height="1" />     </bezel>
718      <bezel name="pg_1188"    element="Page1" state="0">     <bounds x=" 60" y=" 56" width="5" height="1" />     </bezel>
719      <bezel name="pg_1189"    element="Page1" state="0">     <bounds x=" 66" y=" 50" width="5" height="1" />     </bezel>
720      <bezel name="pg_1190"    element="Page1" state="0">     <bounds x=" 66" y=" 51" width="5" height="1" />     </bezel>
721      <bezel name="pg_1191"    element="Page1" state="0">     <bounds x=" 66" y=" 52" width="5" height="1" />     </bezel>
722      <bezel name="pg_1192"    element="Page1" state="0">     <bounds x=" 66" y=" 53" width="5" height="1" />     </bezel>
723      <bezel name="pg_1193"    element="Page1" state="0">     <bounds x=" 66" y=" 54" width="5" height="1" />     </bezel>
724      <bezel name="pg_1194"    element="Page1" state="0">     <bounds x=" 66" y=" 55" width="5" height="1" />     </bezel>
725      <bezel name="pg_1195"    element="Page1" state="0">     <bounds x=" 66" y=" 56" width="5" height="1" />     </bezel>
726      <bezel name="pg_1196"    element="Page1" state="0">     <bounds x=" 72" y=" 50" width="5" height="1" />     </bezel>
727      <bezel name="pg_1197"    element="Page1" state="0">     <bounds x=" 72" y=" 51" width="5" height="1" />     </bezel>
728      <bezel name="pg_1198"    element="Page1" state="0">     <bounds x=" 72" y=" 52" width="5" height="1" />     </bezel>
729      <bezel name="pg_1199"    element="Page1" state="0">     <bounds x=" 72" y=" 53" width="5" height="1" />     </bezel>
730      <bezel name="pg_1200"    element="Page1" state="0">     <bounds x=" 72" y=" 54" width="5" height="1" />     </bezel>
731      <bezel name="pg_1201"    element="Page1" state="0">     <bounds x=" 72" y=" 55" width="5" height="1" />     </bezel>
732      <bezel name="pg_1202"    element="Page1" state="0">     <bounds x=" 72" y=" 56" width="5" height="1" />     </bezel>
733      <bezel name="pg_1203"    element="Page1" state="0">     <bounds x=" 78" y=" 50" width="5" height="1" />     </bezel>
734      <bezel name="pg_1204"    element="Page1" state="0">     <bounds x=" 78" y=" 51" width="5" height="1" />     </bezel>
735      <bezel name="pg_1205"    element="Page1" state="0">     <bounds x=" 78" y=" 52" width="5" height="1" />     </bezel>
736      <bezel name="pg_1206"    element="Page1" state="0">     <bounds x=" 78" y=" 53" width="5" height="1" />     </bezel>
737      <bezel name="pg_1207"    element="Page1" state="0">     <bounds x=" 78" y=" 54" width="5" height="1" />     </bezel>
738      <bezel name="pg_1208"    element="Page1" state="0">     <bounds x=" 78" y=" 55" width="5" height="1" />     </bezel>
739      <bezel name="pg_1209"    element="Page1" state="0">     <bounds x=" 78" y=" 56" width="5" height="1" />     </bezel>
740      <bezel name="pg_1210"    element="Page1" state="0">     <bounds x=" 84" y=" 50" width="5" height="1" />     </bezel>
741      <bezel name="pg_1211"    element="Page1" state="0">     <bounds x=" 84" y=" 51" width="5" height="1" />     </bezel>
742      <bezel name="pg_1212"    element="Page1" state="0">     <bounds x=" 84" y=" 52" width="5" height="1" />     </bezel>
743      <bezel name="pg_1213"    element="Page1" state="0">     <bounds x=" 84" y=" 53" width="5" height="1" />     </bezel>
744      <bezel name="pg_1214"    element="Page1" state="0">     <bounds x=" 84" y=" 54" width="5" height="1" />     </bezel>
745      <bezel name="pg_1215"    element="Page1" state="0">     <bounds x=" 84" y=" 55" width="5" height="1" />     </bezel>
746      <bezel name="pg_1216"    element="Page1" state="0">     <bounds x=" 84" y=" 56" width="5" height="1" />     </bezel>
747      <bezel name="pg_1217"    element="Page1" state="0">     <bounds x=" 90" y=" 50" width="5" height="1" />     </bezel>
748      <bezel name="pg_1218"    element="Page1" state="0">     <bounds x=" 90" y=" 51" width="5" height="1" />     </bezel>
749      <bezel name="pg_1219"    element="Page1" state="0">     <bounds x=" 90" y=" 52" width="5" height="1" />     </bezel>
750      <bezel name="pg_1220"    element="Page1" state="0">     <bounds x=" 90" y=" 53" width="5" height="1" />     </bezel>
751      <bezel name="pg_1221"    element="Page1" state="0">     <bounds x=" 90" y=" 54" width="5" height="1" />     </bezel>
752      <bezel name="pg_1222"    element="Page1" state="0">     <bounds x=" 90" y=" 55" width="5" height="1" />     </bezel>
753      <bezel name="pg_1223"    element="Page1" state="0">     <bounds x=" 90" y=" 56" width="5" height="1" />     </bezel>
754754
755      <bezel name="pg_4000"    element="Page4" state="0">      <bounds x="  0" y=" 80" width="5" height="1" />    </bezel>
756      <bezel name="pg_4001"    element="Page4" state="0">      <bounds x="  0" y=" 81" width="5" height="1" />    </bezel>
757      <bezel name="pg_4002"    element="Page4" state="0">      <bounds x="  0" y=" 82" width="5" height="1" />    </bezel>
758      <bezel name="pg_4003"    element="Page4" state="0">      <bounds x="  0" y=" 83" width="5" height="1" />    </bezel>
759      <bezel name="pg_4004"    element="Page4" state="0">      <bounds x="  0" y=" 84" width="5" height="1" />    </bezel>
760      <bezel name="pg_4005"    element="Page4" state="0">      <bounds x="  0" y=" 85" width="5" height="1" />    </bezel>
761      <bezel name="pg_4006"    element="Page4" state="0">      <bounds x="  0" y=" 86" width="5" height="1" />    </bezel>
762      <bezel name="pg_4007"    element="Page4" state="0">      <bounds x="  6" y=" 80" width="5" height="1" />    </bezel>
763      <bezel name="pg_4008"    element="Page4" state="0">      <bounds x="  6" y=" 81" width="5" height="1" />    </bezel>
764      <bezel name="pg_4009"    element="Page4" state="0">      <bounds x="  6" y=" 82" width="5" height="1" />    </bezel>
765      <bezel name="pg_4010"    element="Page4" state="0">      <bounds x="  6" y=" 83" width="5" height="1" />    </bezel>
766      <bezel name="pg_4011"    element="Page4" state="0">      <bounds x="  6" y=" 84" width="5" height="1" />    </bezel>
767      <bezel name="pg_4012"    element="Page4" state="0">      <bounds x="  6" y=" 85" width="5" height="1" />    </bezel>
768      <bezel name="pg_4013"    element="Page4" state="0">      <bounds x="  6" y=" 86" width="5" height="1" />    </bezel>
769      <bezel name="pg_4014"    element="Page4" state="0">      <bounds x=" 12" y=" 80" width="5" height="1" />    </bezel>
770      <bezel name="pg_4015"    element="Page4" state="0">      <bounds x=" 12" y=" 81" width="5" height="1" />    </bezel>
771      <bezel name="pg_4016"    element="Page4" state="0">      <bounds x=" 12" y=" 82" width="5" height="1" />    </bezel>
772      <bezel name="pg_4017"    element="Page4" state="0">      <bounds x=" 12" y=" 83" width="5" height="1" />    </bezel>
773      <bezel name="pg_4018"    element="Page4" state="0">      <bounds x=" 12" y=" 84" width="5" height="1" />    </bezel>
774      <bezel name="pg_4019"    element="Page4" state="0">      <bounds x=" 12" y=" 85" width="5" height="1" />    </bezel>
775      <bezel name="pg_4020"    element="Page4" state="0">      <bounds x=" 12" y=" 86" width="5" height="1" />    </bezel>
776      <bezel name="pg_4021"    element="Page4" state="0">      <bounds x=" 18" y=" 80" width="5" height="1" />    </bezel>
777      <bezel name="pg_4022"    element="Page4" state="0">      <bounds x=" 18" y=" 81" width="5" height="1" />    </bezel>
778      <bezel name="pg_4023"    element="Page4" state="0">      <bounds x=" 18" y=" 82" width="5" height="1" />    </bezel>
779      <bezel name="pg_4024"    element="Page4" state="0">      <bounds x=" 18" y=" 83" width="5" height="1" />    </bezel>
780      <bezel name="pg_4025"    element="Page4" state="0">      <bounds x=" 18" y=" 84" width="5" height="1" />    </bezel>
781      <bezel name="pg_4026"    element="Page4" state="0">      <bounds x=" 18" y=" 85" width="5" height="1" />    </bezel>
782      <bezel name="pg_4027"    element="Page4" state="0">      <bounds x=" 18" y=" 86" width="5" height="1" />    </bezel>
783      <bezel name="pg_4028"    element="Page4" state="0">      <bounds x=" 24" y=" 80" width="5" height="1" />    </bezel>
784      <bezel name="pg_4029"    element="Page4" state="0">      <bounds x=" 24" y=" 81" width="5" height="1" />    </bezel>
785      <bezel name="pg_4030"    element="Page4" state="0">      <bounds x=" 24" y=" 82" width="5" height="1" />    </bezel>
786      <bezel name="pg_4031"    element="Page4" state="0">      <bounds x=" 24" y=" 83" width="5" height="1" />    </bezel>
787      <bezel name="pg_4032"    element="Page4" state="0">      <bounds x=" 24" y=" 84" width="5" height="1" />    </bezel>
788      <bezel name="pg_4033"    element="Page4" state="0">      <bounds x=" 24" y=" 85" width="5" height="1" />    </bezel>
789      <bezel name="pg_4034"    element="Page4" state="0">      <bounds x=" 24" y=" 86" width="5" height="1" />    </bezel>
790      <bezel name="pg_4035"    element="Page4" state="0">      <bounds x=" 30" y=" 80" width="5" height="1" />    </bezel>
791      <bezel name="pg_4036"    element="Page4" state="0">      <bounds x=" 30" y=" 81" width="5" height="1" />    </bezel>
792      <bezel name="pg_4037"    element="Page4" state="0">      <bounds x=" 30" y=" 82" width="5" height="1" />    </bezel>
793      <bezel name="pg_4038"    element="Page4" state="0">      <bounds x=" 30" y=" 83" width="5" height="1" />    </bezel>
794      <bezel name="pg_4039"    element="Page4" state="0">      <bounds x=" 30" y=" 84" width="5" height="1" />    </bezel>
795      <bezel name="pg_4040"    element="Page4" state="0">      <bounds x=" 30" y=" 85" width="5" height="1" />    </bezel>
796      <bezel name="pg_4041"    element="Page4" state="0">      <bounds x=" 30" y=" 86" width="5" height="1" />    </bezel>
797      <bezel name="pg_4042"    element="Page4" state="0">      <bounds x=" 36" y=" 80" width="5" height="1" />    </bezel>
798      <bezel name="pg_4043"    element="Page4" state="0">      <bounds x=" 36" y=" 81" width="5" height="1" />    </bezel>
799      <bezel name="pg_4044"    element="Page4" state="0">      <bounds x=" 36" y=" 82" width="5" height="1" />    </bezel>
800      <bezel name="pg_4045"    element="Page4" state="0">      <bounds x=" 36" y=" 83" width="5" height="1" />    </bezel>
801      <bezel name="pg_4046"    element="Page4" state="0">      <bounds x=" 36" y=" 84" width="5" height="1" />    </bezel>
802      <bezel name="pg_4047"    element="Page4" state="0">      <bounds x=" 36" y=" 85" width="5" height="1" />    </bezel>
803      <bezel name="pg_4048"    element="Page4" state="0">      <bounds x=" 36" y=" 86" width="5" height="1" />    </bezel>
804      <bezel name="pg_4049"    element="Page4" state="0">      <bounds x=" 42" y=" 80" width="5" height="1" />    </bezel>
805      <bezel name="pg_4050"    element="Page4" state="0">      <bounds x=" 42" y=" 81" width="5" height="1" />    </bezel>
806      <bezel name="pg_4051"    element="Page4" state="0">      <bounds x=" 42" y=" 82" width="5" height="1" />    </bezel>
807      <bezel name="pg_4052"    element="Page4" state="0">      <bounds x=" 42" y=" 83" width="5" height="1" />    </bezel>
808      <bezel name="pg_4053"    element="Page4" state="0">      <bounds x=" 42" y=" 84" width="5" height="1" />    </bezel>
809      <bezel name="pg_4054"    element="Page4" state="0">      <bounds x=" 42" y=" 85" width="5" height="1" />    </bezel>
810      <bezel name="pg_4055"    element="Page4" state="0">      <bounds x=" 42" y=" 86" width="5" height="1" />    </bezel>
811      <bezel name="pg_4056"    element="Page4" state="0">      <bounds x=" 48" y=" 80" width="5" height="1" />    </bezel>
812      <bezel name="pg_4057"    element="Page4" state="0">      <bounds x=" 48" y=" 81" width="5" height="1" />    </bezel>
813      <bezel name="pg_4058"    element="Page4" state="0">      <bounds x=" 48" y=" 82" width="5" height="1" />    </bezel>
814      <bezel name="pg_4059"    element="Page4" state="0">      <bounds x=" 48" y=" 83" width="5" height="1" />    </bezel>
815      <bezel name="pg_4060"    element="Page4" state="0">      <bounds x=" 48" y=" 84" width="5" height="1" />    </bezel>
816      <bezel name="pg_4061"    element="Page4" state="0">      <bounds x=" 48" y=" 85" width="5" height="1" />    </bezel>
817      <bezel name="pg_4062"    element="Page4" state="0">      <bounds x=" 48" y=" 86" width="5" height="1" />    </bezel>
818      <bezel name="pg_4063"    element="Page4" state="0">      <bounds x=" 54" y=" 80" width="5" height="1" />    </bezel>
819      <bezel name="pg_4064"    element="Page4" state="0">      <bounds x=" 54" y=" 81" width="5" height="1" />    </bezel>
820      <bezel name="pg_4065"    element="Page4" state="0">      <bounds x=" 54" y=" 82" width="5" height="1" />    </bezel>
821      <bezel name="pg_4066"    element="Page4" state="0">      <bounds x=" 54" y=" 83" width="5" height="1" />    </bezel>
822      <bezel name="pg_4067"    element="Page4" state="0">      <bounds x=" 54" y=" 84" width="5" height="1" />    </bezel>
823      <bezel name="pg_4068"    element="Page4" state="0">      <bounds x=" 54" y=" 85" width="5" height="1" />    </bezel>
824      <bezel name="pg_4069"    element="Page4" state="0">      <bounds x=" 54" y=" 86" width="5" height="1" />    </bezel>
825      <bezel name="pg_4070"    element="Page4" state="0">      <bounds x=" 60" y=" 80" width="5" height="1" />    </bezel>
826      <bezel name="pg_4071"    element="Page4" state="0">      <bounds x=" 60" y=" 81" width="5" height="1" />    </bezel>
827      <bezel name="pg_4072"    element="Page4" state="0">      <bounds x=" 60" y=" 82" width="5" height="1" />    </bezel>
828      <bezel name="pg_4073"    element="Page4" state="0">      <bounds x=" 60" y=" 83" width="5" height="1" />    </bezel>
829      <bezel name="pg_4074"    element="Page4" state="0">      <bounds x=" 60" y=" 84" width="5" height="1" />    </bezel>
830      <bezel name="pg_4075"    element="Page4" state="0">      <bounds x=" 60" y=" 85" width="5" height="1" />    </bezel>
831      <bezel name="pg_4076"    element="Page4" state="0">      <bounds x=" 60" y=" 86" width="5" height="1" />    </bezel>
832      <bezel name="pg_4077"    element="Page4" state="0">      <bounds x=" 66" y=" 80" width="5" height="1" />    </bezel>
833      <bezel name="pg_4078"    element="Page4" state="0">      <bounds x=" 66" y=" 81" width="5" height="1" />    </bezel>
834      <bezel name="pg_4079"    element="Page4" state="0">      <bounds x=" 66" y=" 82" width="5" height="1" />    </bezel>
835      <bezel name="pg_4080"    element="Page4" state="0">      <bounds x=" 66" y=" 83" width="5" height="1" />    </bezel>
836      <bezel name="pg_4081"    element="Page4" state="0">      <bounds x=" 66" y=" 84" width="5" height="1" />    </bezel>
837      <bezel name="pg_4082"    element="Page4" state="0">      <bounds x=" 66" y=" 85" width="5" height="1" />    </bezel>
838      <bezel name="pg_4083"    element="Page4" state="0">      <bounds x=" 66" y=" 86" width="5" height="1" />    </bezel>
839      <bezel name="pg_4084"    element="Page4" state="0">      <bounds x=" 72" y=" 80" width="5" height="1" />    </bezel>
840      <bezel name="pg_4085"    element="Page4" state="0">      <bounds x=" 72" y=" 81" width="5" height="1" />    </bezel>
841      <bezel name="pg_4086"    element="Page4" state="0">      <bounds x=" 72" y=" 82" width="5" height="1" />    </bezel>
842      <bezel name="pg_4087"    element="Page4" state="0">      <bounds x=" 72" y=" 83" width="5" height="1" />    </bezel>
843      <bezel name="pg_4088"    element="Page4" state="0">      <bounds x=" 72" y=" 84" width="5" height="1" />    </bezel>
844      <bezel name="pg_4089"    element="Page4" state="0">      <bounds x=" 72" y=" 85" width="5" height="1" />    </bezel>
845      <bezel name="pg_4090"    element="Page4" state="0">      <bounds x=" 72" y=" 86" width="5" height="1" />    </bezel>
846      <bezel name="pg_4091"    element="Page4" state="0">      <bounds x=" 78" y=" 80" width="5" height="1" />    </bezel>
847      <bezel name="pg_4092"    element="Page4" state="0">      <bounds x=" 78" y=" 81" width="5" height="1" />    </bezel>
848      <bezel name="pg_4093"    element="Page4" state="0">      <bounds x=" 78" y=" 82" width="5" height="1" />    </bezel>
849      <bezel name="pg_4094"    element="Page4" state="0">      <bounds x=" 78" y=" 83" width="5" height="1" />    </bezel>
850      <bezel name="pg_4095"    element="Page4" state="0">      <bounds x=" 78" y=" 84" width="5" height="1" />    </bezel>
851      <bezel name="pg_4096"    element="Page4" state="0">      <bounds x=" 78" y=" 85" width="5" height="1" />    </bezel>
852      <bezel name="pg_4097"    element="Page4" state="0">      <bounds x=" 78" y=" 86" width="5" height="1" />    </bezel>
853      <bezel name="pg_4098"    element="Page4" state="0">      <bounds x=" 84" y=" 80" width="5" height="1" />    </bezel>
854      <bezel name="pg_4099"    element="Page4" state="0">      <bounds x=" 84" y=" 81" width="5" height="1" />    </bezel>
855      <bezel name="pg_4100"    element="Page4" state="0">      <bounds x=" 84" y=" 82" width="5" height="1" />    </bezel>
856      <bezel name="pg_4101"    element="Page4" state="0">      <bounds x=" 84" y=" 83" width="5" height="1" />    </bezel>
857      <bezel name="pg_4102"    element="Page4" state="0">      <bounds x=" 84" y=" 84" width="5" height="1" />    </bezel>
858      <bezel name="pg_4103"    element="Page4" state="0">      <bounds x=" 84" y=" 85" width="5" height="1" />    </bezel>
859      <bezel name="pg_4104"    element="Page4" state="0">      <bounds x=" 84" y=" 86" width="5" height="1" />    </bezel>
860      <bezel name="pg_4105"    element="Page4" state="0">      <bounds x=" 90" y=" 80" width="5" height="1" />    </bezel>
861      <bezel name="pg_4106"    element="Page4" state="0">      <bounds x=" 90" y=" 81" width="5" height="1" />    </bezel>
862      <bezel name="pg_4107"    element="Page4" state="0">      <bounds x=" 90" y=" 82" width="5" height="1" />    </bezel>
863      <bezel name="pg_4108"    element="Page4" state="0">      <bounds x=" 90" y=" 83" width="5" height="1" />    </bezel>
864      <bezel name="pg_4109"    element="Page4" state="0">      <bounds x=" 90" y=" 84" width="5" height="1" />    </bezel>
865      <bezel name="pg_4110"    element="Page4" state="0">      <bounds x=" 90" y=" 85" width="5" height="1" />    </bezel>
866      <bezel name="pg_4111"    element="Page4" state="0">      <bounds x=" 90" y=" 86" width="5" height="1" />    </bezel>
867      <bezel name="pg_4112"    element="Page4" state="0">      <bounds x="  0" y=" 90" width="5" height="1" />    </bezel>
868      <bezel name="pg_4113"    element="Page4" state="0">      <bounds x="  0" y=" 91" width="5" height="1" />    </bezel>
869      <bezel name="pg_4114"    element="Page4" state="0">      <bounds x="  0" y=" 92" width="5" height="1" />    </bezel>
870      <bezel name="pg_4115"    element="Page4" state="0">      <bounds x="  0" y=" 93" width="5" height="1" />    </bezel>
871      <bezel name="pg_4116"    element="Page4" state="0">      <bounds x="  0" y=" 94" width="5" height="1" />    </bezel>
872      <bezel name="pg_4117"    element="Page4" state="0">      <bounds x="  0" y=" 95" width="5" height="1" />    </bezel>
873      <bezel name="pg_4118"    element="Page4" state="0">      <bounds x="  0" y=" 96" width="5" height="1" />    </bezel>
874      <bezel name="pg_4119"    element="Page4" state="0">      <bounds x="  6" y=" 90" width="5" height="1" />    </bezel>
875      <bezel name="pg_4120"    element="Page4" state="0">      <bounds x="  6" y=" 91" width="5" height="1" />    </bezel>
876      <bezel name="pg_4121"    element="Page4" state="0">      <bounds x="  6" y=" 92" width="5" height="1" />    </bezel>
877      <bezel name="pg_4122"    element="Page4" state="0">      <bounds x="  6" y=" 93" width="5" height="1" />    </bezel>
878      <bezel name="pg_4123"    element="Page4" state="0">      <bounds x="  6" y=" 94" width="5" height="1" />    </bezel>
879      <bezel name="pg_4124"    element="Page4" state="0">      <bounds x="  6" y=" 95" width="5" height="1" />    </bezel>
880      <bezel name="pg_4125"    element="Page4" state="0">      <bounds x="  6" y=" 96" width="5" height="1" />    </bezel>
881      <bezel name="pg_4126"    element="Page4" state="0">      <bounds x=" 12" y=" 90" width="5" height="1" />    </bezel>
882      <bezel name="pg_4127"    element="Page4" state="0">      <bounds x=" 12" y=" 91" width="5" height="1" />    </bezel>
883      <bezel name="pg_4128"    element="Page4" state="0">      <bounds x=" 12" y=" 92" width="5" height="1" />    </bezel>
884      <bezel name="pg_4129"    element="Page4" state="0">      <bounds x=" 12" y=" 93" width="5" height="1" />    </bezel>
885      <bezel name="pg_4130"    element="Page4" state="0">      <bounds x=" 12" y=" 94" width="5" height="1" />    </bezel>
886      <bezel name="pg_4131"    element="Page4" state="0">      <bounds x=" 12" y=" 95" width="5" height="1" />    </bezel>
887      <bezel name="pg_4132"    element="Page4" state="0">      <bounds x=" 12" y=" 96" width="5" height="1" />    </bezel>
888      <bezel name="pg_4133"    element="Page4" state="0">      <bounds x=" 18" y=" 90" width="5" height="1" />    </bezel>
889      <bezel name="pg_4134"    element="Page4" state="0">      <bounds x=" 18" y=" 91" width="5" height="1" />    </bezel>
890      <bezel name="pg_4135"    element="Page4" state="0">      <bounds x=" 18" y=" 92" width="5" height="1" />    </bezel>
891      <bezel name="pg_4136"    element="Page4" state="0">      <bounds x=" 18" y=" 93" width="5" height="1" />    </bezel>
892      <bezel name="pg_4137"    element="Page4" state="0">      <bounds x=" 18" y=" 94" width="5" height="1" />    </bezel>
893      <bezel name="pg_4138"    element="Page4" state="0">      <bounds x=" 18" y=" 95" width="5" height="1" />    </bezel>
894      <bezel name="pg_4139"    element="Page4" state="0">      <bounds x=" 18" y=" 96" width="5" height="1" />    </bezel>
895      <bezel name="pg_4140"    element="Page4" state="0">      <bounds x=" 24" y=" 90" width="5" height="1" />    </bezel>
896      <bezel name="pg_4141"    element="Page4" state="0">      <bounds x=" 24" y=" 91" width="5" height="1" />    </bezel>
897      <bezel name="pg_4142"    element="Page4" state="0">      <bounds x=" 24" y=" 92" width="5" height="1" />    </bezel>
898      <bezel name="pg_4143"    element="Page4" state="0">      <bounds x=" 24" y=" 93" width="5" height="1" />    </bezel>
899      <bezel name="pg_4144"    element="Page4" state="0">      <bounds x=" 24" y=" 94" width="5" height="1" />    </bezel>
900      <bezel name="pg_4145"    element="Page4" state="0">      <bounds x=" 24" y=" 95" width="5" height="1" />    </bezel>
901      <bezel name="pg_4146"    element="Page4" state="0">      <bounds x=" 24" y=" 96" width="5" height="1" />    </bezel>
902      <bezel name="pg_4147"    element="Page4" state="0">      <bounds x=" 30" y=" 90" width="5" height="1" />    </bezel>
903      <bezel name="pg_4148"    element="Page4" state="0">      <bounds x=" 30" y=" 91" width="5" height="1" />    </bezel>
904      <bezel name="pg_4149"    element="Page4" state="0">      <bounds x=" 30" y=" 92" width="5" height="1" />    </bezel>
905      <bezel name="pg_4150"    element="Page4" state="0">      <bounds x=" 30" y=" 93" width="5" height="1" />    </bezel>
906      <bezel name="pg_4151"    element="Page4" state="0">      <bounds x=" 30" y=" 94" width="5" height="1" />    </bezel>
907      <bezel name="pg_4152"    element="Page4" state="0">      <bounds x=" 30" y=" 95" width="5" height="1" />    </bezel>
908      <bezel name="pg_4153"    element="Page4" state="0">      <bounds x=" 30" y=" 96" width="5" height="1" />    </bezel>
909      <bezel name="pg_4154"    element="Page4" state="0">      <bounds x=" 36" y=" 90" width="5" height="1" />    </bezel>
910      <bezel name="pg_4155"    element="Page4" state="0">      <bounds x=" 36" y=" 91" width="5" height="1" />    </bezel>
911      <bezel name="pg_4156"    element="Page4" state="0">      <bounds x=" 36" y=" 92" width="5" height="1" />    </bezel>
912      <bezel name="pg_4157"    element="Page4" state="0">      <bounds x=" 36" y=" 93" width="5" height="1" />    </bezel>
913      <bezel name="pg_4158"    element="Page4" state="0">      <bounds x=" 36" y=" 94" width="5" height="1" />    </bezel>
914      <bezel name="pg_4159"    element="Page4" state="0">      <bounds x=" 36" y=" 95" width="5" height="1" />    </bezel>
915      <bezel name="pg_4160"    element="Page4" state="0">      <bounds x=" 36" y=" 96" width="5" height="1" />    </bezel>
916      <bezel name="pg_4161"    element="Page4" state="0">      <bounds x=" 42" y=" 90" width="5" height="1" />    </bezel>
917      <bezel name="pg_4162"    element="Page4" state="0">      <bounds x=" 42" y=" 91" width="5" height="1" />    </bezel>
918      <bezel name="pg_4163"    element="Page4" state="0">      <bounds x=" 42" y=" 92" width="5" height="1" />    </bezel>
919      <bezel name="pg_4164"    element="Page4" state="0">      <bounds x=" 42" y=" 93" width="5" height="1" />    </bezel>
920      <bezel name="pg_4165"    element="Page4" state="0">      <bounds x=" 42" y=" 94" width="5" height="1" />    </bezel>
921      <bezel name="pg_4166"    element="Page4" state="0">      <bounds x=" 42" y=" 95" width="5" height="1" />    </bezel>
922      <bezel name="pg_4167"    element="Page4" state="0">      <bounds x=" 42" y=" 96" width="5" height="1" />    </bezel>
923      <bezel name="pg_4168"    element="Page4" state="0">      <bounds x=" 48" y=" 90" width="5" height="1" />    </bezel>
924      <bezel name="pg_4169"    element="Page4" state="0">      <bounds x=" 48" y=" 91" width="5" height="1" />    </bezel>
925      <bezel name="pg_4170"    element="Page4" state="0">      <bounds x=" 48" y=" 92" width="5" height="1" />    </bezel>
926      <bezel name="pg_4171"    element="Page4" state="0">      <bounds x=" 48" y=" 93" width="5" height="1" />    </bezel>
927      <bezel name="pg_4172"    element="Page4" state="0">      <bounds x=" 48" y=" 94" width="5" height="1" />    </bezel>
928      <bezel name="pg_4173"    element="Page4" state="0">      <bounds x=" 48" y=" 95" width="5" height="1" />    </bezel>
929      <bezel name="pg_4174"    element="Page4" state="0">      <bounds x=" 48" y=" 96" width="5" height="1" />    </bezel>
930      <bezel name="pg_4175"    element="Page4" state="0">      <bounds x=" 54" y=" 90" width="5" height="1" />    </bezel>
931      <bezel name="pg_4176"    element="Page4" state="0">      <bounds x=" 54" y=" 91" width="5" height="1" />    </bezel>
932      <bezel name="pg_4177"    element="Page4" state="0">      <bounds x=" 54" y=" 92" width="5" height="1" />    </bezel>
933      <bezel name="pg_4178"    element="Page4" state="0">      <bounds x=" 54" y=" 93" width="5" height="1" />    </bezel>
934      <bezel name="pg_4179"    element="Page4" state="0">      <bounds x=" 54" y=" 94" width="5" height="1" />    </bezel>
935      <bezel name="pg_4180"    element="Page4" state="0">      <bounds x=" 54" y=" 95" width="5" height="1" />    </bezel>
936      <bezel name="pg_4181"    element="Page4" state="0">      <bounds x=" 54" y=" 96" width="5" height="1" />    </bezel>
937      <bezel name="pg_4182"    element="Page4" state="0">      <bounds x=" 60" y=" 90" width="5" height="1" />    </bezel>
938      <bezel name="pg_4183"    element="Page4" state="0">      <bounds x=" 60" y=" 91" width="5" height="1" />    </bezel>
939      <bezel name="pg_4184"    element="Page4" state="0">      <bounds x=" 60" y=" 92" width="5" height="1" />    </bezel>
940      <bezel name="pg_4185"    element="Page4" state="0">      <bounds x=" 60" y=" 93" width="5" height="1" />    </bezel>
941      <bezel name="pg_4186"    element="Page4" state="0">      <bounds x=" 60" y=" 94" width="5" height="1" />    </bezel>
942      <bezel name="pg_4187"    element="Page4" state="0">      <bounds x=" 60" y=" 95" width="5" height="1" />    </bezel>
943      <bezel name="pg_4188"    element="Page4" state="0">      <bounds x=" 60" y=" 96" width="5" height="1" />    </bezel>
944      <bezel name="pg_4189"    element="Page4" state="0">      <bounds x=" 66" y=" 90" width="5" height="1" />    </bezel>
945      <bezel name="pg_4190"    element="Page4" state="0">      <bounds x=" 66" y=" 91" width="5" height="1" />    </bezel>
946      <bezel name="pg_4191"    element="Page4" state="0">      <bounds x=" 66" y=" 92" width="5" height="1" />    </bezel>
947      <bezel name="pg_4192"    element="Page4" state="0">      <bounds x=" 66" y=" 93" width="5" height="1" />    </bezel>
948      <bezel name="pg_4193"    element="Page4" state="0">      <bounds x=" 66" y=" 94" width="5" height="1" />    </bezel>
949      <bezel name="pg_4194"    element="Page4" state="0">      <bounds x=" 66" y=" 95" width="5" height="1" />    </bezel>
950      <bezel name="pg_4195"    element="Page4" state="0">      <bounds x=" 66" y=" 96" width="5" height="1" />    </bezel>
951      <bezel name="pg_4196"    element="Page4" state="0">      <bounds x=" 72" y=" 90" width="5" height="1" />    </bezel>
952      <bezel name="pg_4197"    element="Page4" state="0">      <bounds x=" 72" y=" 91" width="5" height="1" />    </bezel>
953      <bezel name="pg_4198"    element="Page4" state="0">      <bounds x=" 72" y=" 92" width="5" height="1" />    </bezel>
954      <bezel name="pg_4199"    element="Page4" state="0">      <bounds x=" 72" y=" 93" width="5" height="1" />    </bezel>
955      <bezel name="pg_4200"    element="Page4" state="0">      <bounds x=" 72" y=" 94" width="5" height="1" />    </bezel>
956      <bezel name="pg_4201"    element="Page4" state="0">      <bounds x=" 72" y=" 95" width="5" height="1" />    </bezel>
957      <bezel name="pg_4202"    element="Page4" state="0">      <bounds x=" 72" y=" 96" width="5" height="1" />    </bezel>
958      <bezel name="pg_4203"    element="Page4" state="0">      <bounds x=" 78" y=" 90" width="5" height="1" />    </bezel>
959      <bezel name="pg_4204"    element="Page4" state="0">      <bounds x=" 78" y=" 91" width="5" height="1" />    </bezel>
960      <bezel name="pg_4205"    element="Page4" state="0">      <bounds x=" 78" y=" 92" width="5" height="1" />    </bezel>
961      <bezel name="pg_4206"    element="Page4" state="0">      <bounds x=" 78" y=" 93" width="5" height="1" />    </bezel>
962      <bezel name="pg_4207"    element="Page4" state="0">      <bounds x=" 78" y=" 94" width="5" height="1" />    </bezel>
963      <bezel name="pg_4208"    element="Page4" state="0">      <bounds x=" 78" y=" 95" width="5" height="1" />    </bezel>
964      <bezel name="pg_4209"    element="Page4" state="0">      <bounds x=" 78" y=" 96" width="5" height="1" />    </bezel>
965      <bezel name="pg_4210"    element="Page4" state="0">      <bounds x=" 84" y=" 90" width="5" height="1" />    </bezel>
966      <bezel name="pg_4211"    element="Page4" state="0">      <bounds x=" 84" y=" 91" width="5" height="1" />    </bezel>
967      <bezel name="pg_4212"    element="Page4" state="0">      <bounds x=" 84" y=" 92" width="5" height="1" />    </bezel>
968      <bezel name="pg_4213"    element="Page4" state="0">      <bounds x=" 84" y=" 93" width="5" height="1" />    </bezel>
969      <bezel name="pg_4214"    element="Page4" state="0">      <bounds x=" 84" y=" 94" width="5" height="1" />    </bezel>
970      <bezel name="pg_4215"    element="Page4" state="0">      <bounds x=" 84" y=" 95" width="5" height="1" />    </bezel>
971      <bezel name="pg_4216"    element="Page4" state="0">      <bounds x=" 84" y=" 96" width="5" height="1" />    </bezel>
972      <bezel name="pg_4217"    element="Page4" state="0">      <bounds x=" 90" y=" 90" width="5" height="1" />    </bezel>
973      <bezel name="pg_4218"    element="Page4" state="0">      <bounds x=" 90" y=" 91" width="5" height="1" />    </bezel>
974      <bezel name="pg_4219"    element="Page4" state="0">      <bounds x=" 90" y=" 92" width="5" height="1" />    </bezel>
975      <bezel name="pg_4220"    element="Page4" state="0">      <bounds x=" 90" y=" 93" width="5" height="1" />    </bezel>
976      <bezel name="pg_4221"    element="Page4" state="0">      <bounds x=" 90" y=" 94" width="5" height="1" />    </bezel>
977      <bezel name="pg_4222"    element="Page4" state="0">      <bounds x=" 90" y=" 95" width="5" height="1" />    </bezel>
978      <bezel name="pg_4223"    element="Page4" state="0">      <bounds x=" 90" y=" 96" width="5" height="1" />    </bezel>
755      <bezel name="pg_4000"    element="Page4" state="0">     <bounds x="  0" y=" 80" width="5" height="1" />     </bezel>
756      <bezel name="pg_4001"    element="Page4" state="0">     <bounds x="  0" y=" 81" width="5" height="1" />     </bezel>
757      <bezel name="pg_4002"    element="Page4" state="0">     <bounds x="  0" y=" 82" width="5" height="1" />     </bezel>
758      <bezel name="pg_4003"    element="Page4" state="0">     <bounds x="  0" y=" 83" width="5" height="1" />     </bezel>
759      <bezel name="pg_4004"    element="Page4" state="0">     <bounds x="  0" y=" 84" width="5" height="1" />     </bezel>
760      <bezel name="pg_4005"    element="Page4" state="0">     <bounds x="  0" y=" 85" width="5" height="1" />     </bezel>
761      <bezel name="pg_4006"    element="Page4" state="0">     <bounds x="  0" y=" 86" width="5" height="1" />     </bezel>
762      <bezel name="pg_4007"    element="Page4" state="0">     <bounds x="  6" y=" 80" width="5" height="1" />     </bezel>
763      <bezel name="pg_4008"    element="Page4" state="0">     <bounds x="  6" y=" 81" width="5" height="1" />     </bezel>
764      <bezel name="pg_4009"    element="Page4" state="0">     <bounds x="  6" y=" 82" width="5" height="1" />     </bezel>
765      <bezel name="pg_4010"    element="Page4" state="0">     <bounds x="  6" y=" 83" width="5" height="1" />     </bezel>
766      <bezel name="pg_4011"    element="Page4" state="0">     <bounds x="  6" y=" 84" width="5" height="1" />     </bezel>
767      <bezel name="pg_4012"    element="Page4" state="0">     <bounds x="  6" y=" 85" width="5" height="1" />     </bezel>
768      <bezel name="pg_4013"    element="Page4" state="0">     <bounds x="  6" y=" 86" width="5" height="1" />     </bezel>
769      <bezel name="pg_4014"    element="Page4" state="0">     <bounds x=" 12" y=" 80" width="5" height="1" />     </bezel>
770      <bezel name="pg_4015"    element="Page4" state="0">     <bounds x=" 12" y=" 81" width="5" height="1" />     </bezel>
771      <bezel name="pg_4016"    element="Page4" state="0">     <bounds x=" 12" y=" 82" width="5" height="1" />     </bezel>
772      <bezel name="pg_4017"    element="Page4" state="0">     <bounds x=" 12" y=" 83" width="5" height="1" />     </bezel>
773      <bezel name="pg_4018"    element="Page4" state="0">     <bounds x=" 12" y=" 84" width="5" height="1" />     </bezel>
774      <bezel name="pg_4019"    element="Page4" state="0">     <bounds x=" 12" y=" 85" width="5" height="1" />     </bezel>
775      <bezel name="pg_4020"    element="Page4" state="0">     <bounds x=" 12" y=" 86" width="5" height="1" />     </bezel>
776      <bezel name="pg_4021"    element="Page4" state="0">     <bounds x=" 18" y=" 80" width="5" height="1" />     </bezel>
777      <bezel name="pg_4022"    element="Page4" state="0">     <bounds x=" 18" y=" 81" width="5" height="1" />     </bezel>
778      <bezel name="pg_4023"    element="Page4" state="0">     <bounds x=" 18" y=" 82" width="5" height="1" />     </bezel>
779      <bezel name="pg_4024"    element="Page4" state="0">     <bounds x=" 18" y=" 83" width="5" height="1" />     </bezel>
780      <bezel name="pg_4025"    element="Page4" state="0">     <bounds x=" 18" y=" 84" width="5" height="1" />     </bezel>
781      <bezel name="pg_4026"    element="Page4" state="0">     <bounds x=" 18" y=" 85" width="5" height="1" />     </bezel>
782      <bezel name="pg_4027"    element="Page4" state="0">     <bounds x=" 18" y=" 86" width="5" height="1" />     </bezel>
783      <bezel name="pg_4028"    element="Page4" state="0">     <bounds x=" 24" y=" 80" width="5" height="1" />     </bezel>
784      <bezel name="pg_4029"    element="Page4" state="0">     <bounds x=" 24" y=" 81" width="5" height="1" />     </bezel>
785      <bezel name="pg_4030"    element="Page4" state="0">     <bounds x=" 24" y=" 82" width="5" height="1" />     </bezel>
786      <bezel name="pg_4031"    element="Page4" state="0">     <bounds x=" 24" y=" 83" width="5" height="1" />     </bezel>
787      <bezel name="pg_4032"    element="Page4" state="0">     <bounds x=" 24" y=" 84" width="5" height="1" />     </bezel>
788      <bezel name="pg_4033"    element="Page4" state="0">     <bounds x=" 24" y=" 85" width="5" height="1" />     </bezel>
789      <bezel name="pg_4034"    element="Page4" state="0">     <bounds x=" 24" y=" 86" width="5" height="1" />     </bezel>
790      <bezel name="pg_4035"    element="Page4" state="0">     <bounds x=" 30" y=" 80" width="5" height="1" />     </bezel>
791      <bezel name="pg_4036"    element="Page4" state="0">     <bounds x=" 30" y=" 81" width="5" height="1" />     </bezel>
792      <bezel name="pg_4037"    element="Page4" state="0">     <bounds x=" 30" y=" 82" width="5" height="1" />     </bezel>
793      <bezel name="pg_4038"    element="Page4" state="0">     <bounds x=" 30" y=" 83" width="5" height="1" />     </bezel>
794      <bezel name="pg_4039"    element="Page4" state="0">     <bounds x=" 30" y=" 84" width="5" height="1" />     </bezel>
795      <bezel name="pg_4040"    element="Page4" state="0">     <bounds x=" 30" y=" 85" width="5" height="1" />     </bezel>
796      <bezel name="pg_4041"    element="Page4" state="0">     <bounds x=" 30" y=" 86" width="5" height="1" />     </bezel>
797      <bezel name="pg_4042"    element="Page4" state="0">     <bounds x=" 36" y=" 80" width="5" height="1" />     </bezel>
798      <bezel name="pg_4043"    element="Page4" state="0">     <bounds x=" 36" y=" 81" width="5" height="1" />     </bezel>
799      <bezel name="pg_4044"    element="Page4" state="0">     <bounds x=" 36" y=" 82" width="5" height="1" />     </bezel>
800      <bezel name="pg_4045"    element="Page4" state="0">     <bounds x=" 36" y=" 83" width="5" height="1" />     </bezel>
801      <bezel name="pg_4046"    element="Page4" state="0">     <bounds x=" 36" y=" 84" width="5" height="1" />     </bezel>
802      <bezel name="pg_4047"    element="Page4" state="0">     <bounds x=" 36" y=" 85" width="5" height="1" />     </bezel>
803      <bezel name="pg_4048"    element="Page4" state="0">     <bounds x=" 36" y=" 86" width="5" height="1" />     </bezel>
804      <bezel name="pg_4049"    element="Page4" state="0">     <bounds x=" 42" y=" 80" width="5" height="1" />     </bezel>
805      <bezel name="pg_4050"    element="Page4" state="0">     <bounds x=" 42" y=" 81" width="5" height="1" />     </bezel>
806      <bezel name="pg_4051"    element="Page4" state="0">     <bounds x=" 42" y=" 82" width="5" height="1" />     </bezel>
807      <bezel name="pg_4052"    element="Page4" state="0">     <bounds x=" 42" y=" 83" width="5" height="1" />     </bezel>
808      <bezel name="pg_4053"    element="Page4" state="0">     <bounds x=" 42" y=" 84" width="5" height="1" />     </bezel>
809      <bezel name="pg_4054"    element="Page4" state="0">     <bounds x=" 42" y=" 85" width="5" height="1" />     </bezel>
810      <bezel name="pg_4055"    element="Page4" state="0">     <bounds x=" 42" y=" 86" width="5" height="1" />     </bezel>
811      <bezel name="pg_4056"    element="Page4" state="0">     <bounds x=" 48" y=" 80" width="5" height="1" />     </bezel>
812      <bezel name="pg_4057"    element="Page4" state="0">     <bounds x=" 48" y=" 81" width="5" height="1" />     </bezel>
813      <bezel name="pg_4058"    element="Page4" state="0">     <bounds x=" 48" y=" 82" width="5" height="1" />     </bezel>
814      <bezel name="pg_4059"    element="Page4" state="0">     <bounds x=" 48" y=" 83" width="5" height="1" />     </bezel>
815      <bezel name="pg_4060"    element="Page4" state="0">     <bounds x=" 48" y=" 84" width="5" height="1" />     </bezel>
816      <bezel name="pg_4061"    element="Page4" state="0">     <bounds x=" 48" y=" 85" width="5" height="1" />     </bezel>
817      <bezel name="pg_4062"    element="Page4" state="0">     <bounds x=" 48" y=" 86" width="5" height="1" />     </bezel>
818      <bezel name="pg_4063"    element="Page4" state="0">     <bounds x=" 54" y=" 80" width="5" height="1" />     </bezel>
819      <bezel name="pg_4064"    element="Page4" state="0">     <bounds x=" 54" y=" 81" width="5" height="1" />     </bezel>
820      <bezel name="pg_4065"    element="Page4" state="0">     <bounds x=" 54" y=" 82" width="5" height="1" />     </bezel>
821      <bezel name="pg_4066"    element="Page4" state="0">     <bounds x=" 54" y=" 83" width="5" height="1" />     </bezel>
822      <bezel name="pg_4067"    element="Page4" state="0">     <bounds x=" 54" y=" 84" width="5" height="1" />     </bezel>
823      <bezel name="pg_4068"    element="Page4" state="0">     <bounds x=" 54" y=" 85" width="5" height="1" />     </bezel>
824      <bezel name="pg_4069"    element="Page4" state="0">     <bounds x=" 54" y=" 86" width="5" height="1" />     </bezel>
825      <bezel name="pg_4070"    element="Page4" state="0">     <bounds x=" 60" y=" 80" width="5" height="1" />     </bezel>
826      <bezel name="pg_4071"    element="Page4" state="0">     <bounds x=" 60" y=" 81" width="5" height="1" />     </bezel>
827      <bezel name="pg_4072"    element="Page4" state="0">     <bounds x=" 60" y=" 82" width="5" height="1" />     </bezel>
828      <bezel name="pg_4073"    element="Page4" state="0">     <bounds x=" 60" y=" 83" width="5" height="1" />     </bezel>
829      <bezel name="pg_4074"    element="Page4" state="0">     <bounds x=" 60" y=" 84" width="5" height="1" />     </bezel>
830      <bezel name="pg_4075"    element="Page4" state="0">     <bounds x=" 60" y=" 85" width="5" height="1" />     </bezel>
831      <bezel name="pg_4076"    element="Page4" state="0">     <bounds x=" 60" y=" 86" width="5" height="1" />     </bezel>
832      <bezel name="pg_4077"    element="Page4" state="0">     <bounds x=" 66" y=" 80" width="5" height="1" />     </bezel>
833      <bezel name="pg_4078"    element="Page4" state="0">     <bounds x=" 66" y=" 81" width="5" height="1" />     </bezel>
834      <bezel name="pg_4079"    element="Page4" state="0">     <bounds x=" 66" y=" 82" width="5" height="1" />     </bezel>
835      <bezel name="pg_4080"    element="Page4" state="0">     <bounds x=" 66" y=" 83" width="5" height="1" />     </bezel>
836      <bezel name="pg_4081"    element="Page4" state="0">     <bounds x=" 66" y=" 84" width="5" height="1" />     </bezel>
837      <bezel name="pg_4082"    element="Page4" state="0">     <bounds x=" 66" y=" 85" width="5" height="1" />     </bezel>
838      <bezel name="pg_4083"    element="Page4" state="0">     <bounds x=" 66" y=" 86" width="5" height="1" />     </bezel>
839      <bezel name="pg_4084"    element="Page4" state="0">     <bounds x=" 72" y=" 80" width="5" height="1" />     </bezel>
840      <bezel name="pg_4085"    element="Page4" state="0">     <bounds x=" 72" y=" 81" width="5" height="1" />     </bezel>
841      <bezel name="pg_4086"    element="Page4" state="0">     <bounds x=" 72" y=" 82" width="5" height="1" />     </bezel>
842      <bezel name="pg_4087"    element="Page4" state="0">     <bounds x=" 72" y=" 83" width="5" height="1" />     </bezel>
843      <bezel name="pg_4088"    element="Page4" state="0">     <bounds x=" 72" y=" 84" width="5" height="1" />     </bezel>
844      <bezel name="pg_4089"    element="Page4" state="0">     <bounds x=" 72" y=" 85" width="5" height="1" />     </bezel>
845      <bezel name="pg_4090"    element="Page4" state="0">     <bounds x=" 72" y=" 86" width="5" height="1" />     </bezel>
846      <bezel name="pg_4091"    element="Page4" state="0">     <bounds x=" 78" y=" 80" width="5" height="1" />     </bezel>
847      <bezel name="pg_4092"    element="Page4" state="0">     <bounds x=" 78" y=" 81" width="5" height="1" />     </bezel>
848      <bezel name="pg_4093"    element="Page4" state="0">     <bounds x=" 78" y=" 82" width="5" height="1" />     </bezel>
849      <bezel name="pg_4094"    element="Page4" state="0">     <bounds x=" 78" y=" 83" width="5" height="1" />     </bezel>
850      <bezel name="pg_4095"    element="Page4" state="0">     <bounds x=" 78" y=" 84" width="5" height="1" />     </bezel>
851      <bezel name="pg_4096"    element="Page4" state="0">     <bounds x=" 78" y=" 85" width="5" height="1" />     </bezel>
852      <bezel name="pg_4097"    element="Page4" state="0">     <bounds x=" 78" y=" 86" width="5" height="1" />     </bezel>
853      <bezel name="pg_4098"    element="Page4" state="0">     <bounds x=" 84" y=" 80" width="5" height="1" />     </bezel>
854      <bezel name="pg_4099"    element="Page4" state="0">     <bounds x=" 84" y=" 81" width="5" height="1" />     </bezel>
855      <bezel name="pg_4100"    element="Page4" state="0">     <bounds x=" 84" y=" 82" width="5" height="1" />     </bezel>
856      <bezel name="pg_4101"    element="Page4" state="0">     <bounds x=" 84" y=" 83" width="5" height="1" />     </bezel>
857      <bezel name="pg_4102"    element="Page4" state="0">     <bounds x=" 84" y=" 84" width="5" height="1" />     </bezel>
858      <bezel name="pg_4103"    element="Page4" state="0">     <bounds x=" 84" y=" 85" width="5" height="1" />     </bezel>
859      <bezel name="pg_4104"    element="Page4" state="0">     <bounds x=" 84" y=" 86" width="5" height="1" />     </bezel>
860      <bezel name="pg_4105"    element="Page4" state="0">     <bounds x=" 90" y=" 80" width="5" height="1" />     </bezel>
861      <bezel name="pg_4106"    element="Page4" state="0">     <bounds x=" 90" y=" 81" width="5" height="1" />     </bezel>
862      <bezel name="pg_4107"    element="Page4" state="0">     <bounds x=" 90" y=" 82" width="5" height="1" />     </bezel>
863      <bezel name="pg_4108"    element="Page4" state="0">     <bounds x=" 90" y=" 83" width="5" height="1" />     </bezel>
864      <bezel name="pg_4109"    element="Page4" state="0">     <bounds x=" 90" y=" 84" width="5" height="1" />     </bezel>
865      <bezel name="pg_4110"    element="Page4" state="0">     <bounds x=" 90" y=" 85" width="5" height="1" />     </bezel>
866      <bezel name="pg_4111"    element="Page4" state="0">     <bounds x=" 90" y=" 86" width="5" height="1" />     </bezel>
867      <bezel name="pg_4112"    element="Page4" state="0">     <bounds x="  0" y=" 90" width="5" height="1" />     </bezel>
868      <bezel name="pg_4113"    element="Page4" state="0">     <bounds x="  0" y=" 91" width="5" height="1" />     </bezel>
869      <bezel name="pg_4114"    element="Page4" state="0">     <bounds x="  0" y=" 92" width="5" height="1" />     </bezel>
870      <bezel name="pg_4115"    element="Page4" state="0">     <bounds x="  0" y=" 93" width="5" height="1" />     </bezel>
871      <bezel name="pg_4116"    element="Page4" state="0">     <bounds x="  0" y=" 94" width="5" height="1" />     </bezel>
872      <bezel name="pg_4117"    element="Page4" state="0">     <bounds x="  0" y=" 95" width="5" height="1" />     </bezel>
873      <bezel name="pg_4118"    element="Page4" state="0">     <bounds x="  0" y=" 96" width="5" height="1" />     </bezel>
874      <bezel name="pg_4119"    element="Page4" state="0">     <bounds x="  6" y=" 90" width="5" height="1" />     </bezel>
875      <bezel name="pg_4120"    element="Page4" state="0">     <bounds x="  6" y=" 91" width="5" height="1" />     </bezel>
876      <bezel name="pg_4121"    element="Page4" state="0">     <bounds x="  6" y=" 92" width="5" height="1" />     </bezel>
877      <bezel name="pg_4122"    element="Page4" state="0">     <bounds x="  6" y=" 93" width="5" height="1" />     </bezel>
878      <bezel name="pg_4123"    element="Page4" state="0">     <bounds x="  6" y=" 94" width="5" height="1" />     </bezel>
879      <bezel name="pg_4124"    element="Page4" state="0">     <bounds x="  6" y=" 95" width="5" height="1" />     </bezel>
880      <bezel name="pg_4125"    element="Page4" state="0">     <bounds x="  6" y=" 96" width="5" height="1" />     </bezel>
881      <bezel name="pg_4126"    element="Page4" state="0">     <bounds x=" 12" y=" 90" width="5" height="1" />     </bezel>
882      <bezel name="pg_4127"    element="Page4" state="0">     <bounds x=" 12" y=" 91" width="5" height="1" />     </bezel>
883      <bezel name="pg_4128"    element="Page4" state="0">     <bounds x=" 12" y=" 92" width="5" height="1" />     </bezel>
884      <bezel name="pg_4129"    element="Page4" state="0">     <bounds x=" 12" y=" 93" width="5" height="1" />     </bezel>
885      <bezel name="pg_4130"    element="Page4" state="0">     <bounds x=" 12" y=" 94" width="5" height="1" />     </bezel>
886      <bezel name="pg_4131"    element="Page4" state="0">     <bounds x=" 12" y=" 95" width="5" height="1" />     </bezel>
887      <bezel name="pg_4132"    element="Page4" state="0">     <bounds x=" 12" y=" 96" width="5" height="1" />     </bezel>
888      <bezel name="pg_4133"    element="Page4" state="0">     <bounds x=" 18" y=" 90" width="5" height="1" />     </bezel>
889      <bezel name="pg_4134"    element="Page4" state="0">     <bounds x=" 18" y=" 91" width="5" height="1" />     </bezel>
890      <bezel name="pg_4135"    element="Page4" state="0">     <bounds x=" 18" y=" 92" width="5" height="1" />     </bezel>
891      <bezel name="pg_4136"    element="Page4" state="0">     <bounds x=" 18" y=" 93" width="5" height="1" />     </bezel>
892      <bezel name="pg_4137"    element="Page4" state="0">     <bounds x=" 18" y=" 94" width="5" height="1" />     </bezel>
893      <bezel name="pg_4138"    element="Page4" state="0">     <bounds x=" 18" y=" 95" width="5" height="1" />     </bezel>
894      <bezel name="pg_4139"    element="Page4" state="0">     <bounds x=" 18" y=" 96" width="5" height="1" />     </bezel>
895      <bezel name="pg_4140"    element="Page4" state="0">     <bounds x=" 24" y=" 90" width="5" height="1" />     </bezel>
896      <bezel name="pg_4141"    element="Page4" state="0">     <bounds x=" 24" y=" 91" width="5" height="1" />     </bezel>
897      <bezel name="pg_4142"    element="Page4" state="0">     <bounds x=" 24" y=" 92" width="5" height="1" />     </bezel>
898      <bezel name="pg_4143"    element="Page4" state="0">     <bounds x=" 24" y=" 93" width="5" height="1" />     </bezel>
899      <bezel name="pg_4144"    element="Page4" state="0">     <bounds x=" 24" y=" 94" width="5" height="1" />     </bezel>
900      <bezel name="pg_4145"    element="Page4" state="0">     <bounds x=" 24" y=" 95" width="5" height="1" />     </bezel>
901      <bezel name="pg_4146"    element="Page4" state="0">     <bounds x=" 24" y=" 96" width="5" height="1" />     </bezel>
902      <bezel name="pg_4147"    element="Page4" state="0">     <bounds x=" 30" y=" 90" width="5" height="1" />     </bezel>
903      <bezel name="pg_4148"    element="Page4" state="0">     <bounds x=" 30" y=" 91" width="5" height="1" />     </bezel>
904      <bezel name="pg_4149"    element="Page4" state="0">     <bounds x=" 30" y=" 92" width="5" height="1" />     </bezel>
905      <bezel name="pg_4150"    element="Page4" state="0">     <bounds x=" 30" y=" 93" width="5" height="1" />     </bezel>
906      <bezel name="pg_4151"    element="Page4" state="0">     <bounds x=" 30" y=" 94" width="5" height="1" />     </bezel>
907      <bezel name="pg_4152"    element="Page4" state="0">     <bounds x=" 30" y=" 95" width="5" height="1" />     </bezel>
908      <bezel name="pg_4153"    element="Page4" state="0">     <bounds x=" 30" y=" 96" width="5" height="1" />     </bezel>
909      <bezel name="pg_4154"    element="Page4" state="0">     <bounds x=" 36" y=" 90" width="5" height="1" />     </bezel>
910      <bezel name="pg_4155"    element="Page4" state="0">     <bounds x=" 36" y=" 91" width="5" height="1" />     </bezel>
911      <bezel name="pg_4156"    element="Page4" state="0">     <bounds x=" 36" y=" 92" width="5" height="1" />     </bezel>
912      <bezel name="pg_4157"    element="Page4" state="0">     <bounds x=" 36" y=" 93" width="5" height="1" />     </bezel>
913      <bezel name="pg_4158"    element="Page4" state="0">     <bounds x=" 36" y=" 94" width="5" height="1" />     </bezel>
914      <bezel name="pg_4159"    element="Page4" state="0">     <bounds x=" 36" y=" 95" width="5" height="1" />     </bezel>
915      <bezel name="pg_4160"    element="Page4" state="0">     <bounds x=" 36" y=" 96" width="5" height="1" />     </bezel>
916      <bezel name="pg_4161"    element="Page4" state="0">     <bounds x=" 42" y=" 90" width="5" height="1" />     </bezel>
917      <bezel name="pg_4162"    element="Page4" state="0">     <bounds x=" 42" y=" 91" width="5" height="1" />     </bezel>
918      <bezel name="pg_4163"    element="Page4" state="0">     <bounds x=" 42" y=" 92" width="5" height="1" />     </bezel>
919      <bezel name="pg_4164"    element="Page4" state="0">     <bounds x=" 42" y=" 93" width="5" height="1" />     </bezel>
920      <bezel name="pg_4165"    element="Page4" state="0">     <bounds x=" 42" y=" 94" width="5" height="1" />     </bezel>
921      <bezel name="pg_4166"    element="Page4" state="0">     <bounds x=" 42" y=" 95" width="5" height="1" />     </bezel>
922      <bezel name="pg_4167"    element="Page4" state="0">     <bounds x=" 42" y=" 96" width="5" height="1" />     </bezel>
923      <bezel name="pg_4168"    element="Page4" state="0">     <bounds x=" 48" y=" 90" width="5" height="1" />     </bezel>
924      <bezel name="pg_4169"    element="Page4" state="0">     <bounds x=" 48" y=" 91" width="5" height="1" />     </bezel>
925      <bezel name="pg_4170"    element="Page4" state="0">     <bounds x=" 48" y=" 92" width="5" height="1" />     </bezel>
926      <bezel name="pg_4171"    element="Page4" state="0">     <bounds x=" 48" y=" 93" width="5" height="1" />     </bezel>
927      <bezel name="pg_4172"    element="Page4" state="0">     <bounds x=" 48" y=" 94" width="5" height="1" />     </bezel>
928      <bezel name="pg_4173"    element="Page4" state="0">     <bounds x=" 48" y=" 95" width="5" height="1" />     </bezel>
929      <bezel name="pg_4174"    element="Page4" state="0">     <bounds x=" 48" y=" 96" width="5" height="1" />     </bezel>
930      <bezel name="pg_4175"    element="Page4" state="0">     <bounds x=" 54" y=" 90" width="5" height="1" />     </bezel>
931      <bezel name="pg_4176"    element="Page4" state="0">     <bounds x=" 54" y=" 91" width="5" height="1" />     </bezel>
932      <bezel name="pg_4177"    element="Page4" state="0">     <bounds x=" 54" y=" 92" width="5" height="1" />     </bezel>
933      <bezel name="pg_4178"    element="Page4" state="0">     <bounds x=" 54" y=" 93" width="5" height="1" />     </bezel>
934      <bezel name="pg_4179"    element="Page4" state="0">     <bounds x=" 54" y=" 94" width="5" height="1" />     </bezel>
935      <bezel name="pg_4180"    element="Page4" state="0">     <bounds x=" 54" y=" 95" width="5" height="1" />     </bezel>
936      <bezel name="pg_4181"    element="Page4" state="0">     <bounds x=" 54" y=" 96" width="5" height="1" />     </bezel>
937      <bezel name="pg_4182"    element="Page4" state="0">     <bounds x=" 60" y=" 90" width="5" height="1" />     </bezel>
938      <bezel name="pg_4183"    element="Page4" state="0">     <bounds x=" 60" y=" 91" width="5" height="1" />     </bezel>
939      <bezel name="pg_4184"    element="Page4" state="0">     <bounds x=" 60" y=" 92" width="5" height="1" />     </bezel>
940      <bezel name="pg_4185"    element="Page4" state="0">     <bounds x=" 60" y=" 93" width="5" height="1" />     </bezel>
941      <bezel name="pg_4186"    element="Page4" state="0">     <bounds x=" 60" y=" 94" width="5" height="1" />     </bezel>
942      <bezel name="pg_4187"    element="Page4" state="0">     <bounds x=" 60" y=" 95" width="5" height="1" />     </bezel>
943      <bezel name="pg_4188"    element="Page4" state="0">     <bounds x=" 60" y=" 96" width="5" height="1" />     </bezel>
944      <bezel name="pg_4189"    element="Page4" state="0">     <bounds x=" 66" y=" 90" width="5" height="1" />     </bezel>
945      <bezel name="pg_4190"    element="Page4" state="0">     <bounds x=" 66" y=" 91" width="5" height="1" />     </bezel>
946      <bezel name="pg_4191"    element="Page4" state="0">     <bounds x=" 66" y=" 92" width="5" height="1" />     </bezel>
947      <bezel name="pg_4192"    element="Page4" state="0">     <bounds x=" 66" y=" 93" width="5" height="1" />     </bezel>
948      <bezel name="pg_4193"    element="Page4" state="0">     <bounds x=" 66" y=" 94" width="5" height="1" />     </bezel>
949      <bezel name="pg_4194"    element="Page4" state="0">     <bounds x=" 66" y=" 95" width="5" height="1" />     </bezel>
950      <bezel name="pg_4195"    element="Page4" state="0">     <bounds x=" 66" y=" 96" width="5" height="1" />     </bezel>
951      <bezel name="pg_4196"    element="Page4" state="0">     <bounds x=" 72" y=" 90" width="5" height="1" />     </bezel>
952      <bezel name="pg_4197"    element="Page4" state="0">     <bounds x=" 72" y=" 91" width="5" height="1" />     </bezel>
953      <bezel name="pg_4198"    element="Page4" state="0">     <bounds x=" 72" y=" 92" width="5" height="1" />     </bezel>
954      <bezel name="pg_4199"    element="Page4" state="0">     <bounds x=" 72" y=" 93" width="5" height="1" />     </bezel>
955      <bezel name="pg_4200"    element="Page4" state="0">     <bounds x=" 72" y=" 94" width="5" height="1" />     </bezel>
956      <bezel name="pg_4201"    element="Page4" state="0">     <bounds x=" 72" y=" 95" width="5" height="1" />     </bezel>
957      <bezel name="pg_4202"    element="Page4" state="0">     <bounds x=" 72" y=" 96" width="5" height="1" />     </bezel>
958      <bezel name="pg_4203"    element="Page4" state="0">     <bounds x=" 78" y=" 90" width="5" height="1" />     </bezel>
959      <bezel name="pg_4204"    element="Page4" state="0">     <bounds x=" 78" y=" 91" width="5" height="1" />     </bezel>
960      <bezel name="pg_4205"    element="Page4" state="0">     <bounds x=" 78" y=" 92" width="5" height="1" />     </bezel>
961      <bezel name="pg_4206"    element="Page4" state="0">     <bounds x=" 78" y=" 93" width="5" height="1" />     </bezel>
962      <bezel name="pg_4207"    element="Page4" state="0">     <bounds x=" 78" y=" 94" width="5" height="1" />     </bezel>
963      <bezel name="pg_4208"    element="Page4" state="0">     <bounds x=" 78" y=" 95" width="5" height="1" />     </bezel>
964      <bezel name="pg_4209"    element="Page4" state="0">     <bounds x=" 78" y=" 96" width="5" height="1" />     </bezel>
965      <bezel name="pg_4210"    element="Page4" state="0">     <bounds x=" 84" y=" 90" width="5" height="1" />     </bezel>
966      <bezel name="pg_4211"    element="Page4" state="0">     <bounds x=" 84" y=" 91" width="5" height="1" />     </bezel>
967      <bezel name="pg_4212"    element="Page4" state="0">     <bounds x=" 84" y=" 92" width="5" height="1" />     </bezel>
968      <bezel name="pg_4213"    element="Page4" state="0">     <bounds x=" 84" y=" 93" width="5" height="1" />     </bezel>
969      <bezel name="pg_4214"    element="Page4" state="0">     <bounds x=" 84" y=" 94" width="5" height="1" />     </bezel>
970      <bezel name="pg_4215"    element="Page4" state="0">     <bounds x=" 84" y=" 95" width="5" height="1" />     </bezel>
971      <bezel name="pg_4216"    element="Page4" state="0">     <bounds x=" 84" y=" 96" width="5" height="1" />     </bezel>
972      <bezel name="pg_4217"    element="Page4" state="0">     <bounds x=" 90" y=" 90" width="5" height="1" />     </bezel>
973      <bezel name="pg_4218"    element="Page4" state="0">     <bounds x=" 90" y=" 91" width="5" height="1" />     </bezel>
974      <bezel name="pg_4219"    element="Page4" state="0">     <bounds x=" 90" y=" 92" width="5" height="1" />     </bezel>
975      <bezel name="pg_4220"    element="Page4" state="0">     <bounds x=" 90" y=" 93" width="5" height="1" />     </bezel>
976      <bezel name="pg_4221"    element="Page4" state="0">     <bounds x=" 90" y=" 94" width="5" height="1" />     </bezel>
977      <bezel name="pg_4222"    element="Page4" state="0">     <bounds x=" 90" y=" 95" width="5" height="1" />     </bezel>
978      <bezel name="pg_4223"    element="Page4" state="0">     <bounds x=" 90" y=" 96" width="5" height="1" />     </bezel>
979979   </view>
980980</mamelayout>
trunk/src/mame/machine/315-5838_317-0229_comp.cpp
r253707r253708
44
55    315-5838 - Decathlete (ST-V)
66    317-0229 - Dead or Alive (Model 2A)
7   317-0229 - Name Club / Name Club Ver 2 (ST-V) (tested as RCDD2 in the service menu!)
8   317-0231 - Print Club Love Love / Print Club Love Love Ver 2 (ST-V)
7    317-0229 - Name Club / Name Club Ver 2 (ST-V) (tested as RCDD2 in the service menu!)
8    317-0231 - Print Club Love Love / Print Club Love Love Ver 2 (ST-V)
99
10   Several Print Club (ST-V) carts have
11   an unpopulated space marked '317-0229' on the PCB
10    Several Print Club (ST-V) carts have
11    an unpopulated space marked '317-0229' on the PCB
1212
1313    Package Type: TQFP100
1414
1515    Decathlete accesses the chip at 2 different addresses, however, I don't think there
16   are 2 channels / sets of registers, instead the 2nd set of addresses are just a
17   mirror that allows access to a different set of source roms; the tables etc. are
18   re-uploaded before every transfer.
16    are 2 channels / sets of registers, instead the 2nd set of addresses are just a
17    mirror that allows access to a different set of source roms; the tables etc. are
18    re-uploaded before every transfer.
1919
2020    Dead of Alive has the source data in RAM, not ROM.
2121    This is similar to how some 5881 games were set up, with the ST-V versions decrypting
2222    data directly from ROM and the Model 2 ones using a RAM source buffer.
2323
24   Decathlete decompresses all graphic data with the chip.
24    Decathlete decompresses all graphic data with the chip.
2525
26   The Name Club games use the chip for decompressing data for the printer (full size
27   versions of the graphics?)
26    The Name Club games use the chip for decompressing data for the printer (full size
27    versions of the graphics?)
2828
29   Print Club Love Love decrypts some start up code/data required for booting.
29    Print Club Love Love decrypts some start up code/data required for booting.
3030
31   Dead or Alive decrypts a string that is checked on startup, nothing else.
31    Dead or Alive decrypts a string that is checked on startup, nothing else.
3232
3333    Looking at the values read I don't think there is any address based encryption, for
3434    example many blocks where you'd expect a zero fill start with repeating patterns
trunk/src/mame/machine/esqlcd.cpp
r253707r253708
99
1010//#define VERBOSE
1111
12const device_type ESQ2x16_SQ1 = &device_creator<esq2x16_sq1_t>;   
12const device_type ESQ2x16_SQ1 = &device_creator<esq2x16_sq1_t>;
1313
1414// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
1515static MACHINE_CONFIG_FRAGMENT(esq2x16)
r253707r253708
1919/*! \file font5x7.h \brief Graphic LCD Font (Ascii Characters). */
2020//*****************************************************************************
2121//
22// File Name   : 'font5x7.h'
23// Title      : Graphic LCD Font (Ascii Charaters)
24// Author      : Pascal Stang
25// Date         : 10/19/2001
26// Revised      : 10/19/2001
27// Version      : 0.1
28// Target MCU   : Atmel AVR
29// Editor Tabs   : 4
22// File Name    : 'font5x7.h'
23// Title        : Graphic LCD Font (Ascii Charaters)
24// Author       : Pascal Stang
25// Date         : 10/19/2001
26// Revised      : 10/19/2001
27// Version      : 0.1
28// Target MCU   : Atmel AVR
29// Editor Tabs  : 4
3030//
3131//*****************************************************************************
3232// standard ascii 5x7 font
3333// defines ascii characters 0x20-0x7F (32-127)
3434static unsigned char Font5x7[][5] = {
35   {0x00, 0x00, 0x08, 0x00, 0x00}, // _Undef_      0x00 - dots for debug purposes
36   {0x01, 0x00, 0x00, 0x00, 0x40}, // _Undef_      0x01 - dots for debug purposes
37   {0x02, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x02
38   {0x03, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x03
39   {0x04, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x04
40   {0x05, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x05
41   {0x06, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x06
42   {0x07, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x07
43   {0x20, 0x70, 0x3F, 0x00, 0x00}, // Croma      0x08
44   {0x20, 0x70, 0x3F, 0x02, 0x0C}, // Croma      0x09
45   {0x20, 0x70, 0x3F, 0x05, 0x0A}, // Croma      0x0A
46   {0x20, 0x70, 0x3F, 0x15, 0x2A}, // Croma      0x0B
47   {0x20, 0x50, 0x50, 0x3F, 0x00}, // Croma      0x0C
48   {0x0D, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x0D
49   {0x0E, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x0E
50   {0x0F, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x0F
51   {0x10, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x10
52   {0x11, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x11
53   {0x12, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x12
54   {0x13, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x13
55   {0x14, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x14
56   {0x15, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x15
57   {0x16, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x16
58   {0x17, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x17
59   {0x18, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x18
60   {0x19, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x19
61   {0x1A, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1A
62   {0x1B, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1B
63   {0x1C, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1C
64   {0x1D, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1D
65   {0x1E, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1E
66   {0x1F, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1F
67   {0x00, 0x00, 0x00, 0x00, 0x00}, // (space)      0x20
68   {0x00, 0x00, 0x5F, 0x00, 0x00}, // !         0x21
69   {0x00, 0x07, 0x00, 0x07, 0x00}, // "         0x22
70   {0x14, 0x7F, 0x14, 0x7F, 0x14}, // #         0x23
71   {0x24, 0x2A, 0x7F, 0x2A, 0x12}, // $         0x24
72   {0x23, 0x13, 0x08, 0x64, 0x62}, // %         0x25
73   {0x36, 0x49, 0x55, 0x22, 0x50}, // &         0x26
74   {0x00, 0x05, 0x03, 0x00, 0x00}, // '         0x27
75   {0x00, 0x1C, 0x22, 0x41, 0x00}, // (         0x28
76   {0x00, 0x41, 0x22, 0x1C, 0x00}, // )         0x29
77   {0x08, 0x2A, 0x1C, 0x2A, 0x08}, // *         0x2A
78   {0x08, 0x08, 0x3E, 0x08, 0x08}, // +         0x2B
79   {0x00, 0x50, 0x30, 0x00, 0x00}, // ,         0x2C
80   {0x08, 0x08, 0x08, 0x08, 0x08}, // -         0x2D
81   {0x00, 0x60, 0x60, 0x00, 0x00}, // .         0x2E
82   {0x20, 0x10, 0x08, 0x04, 0x02}, // /         0x2F
83   {0x3E, 0x51, 0x49, 0x45, 0x3E}, // 0         0x30
84   {0x00, 0x42, 0x7F, 0x40, 0x00}, // 1         0x31
85   {0x42, 0x61, 0x51, 0x49, 0x46}, // 2         0x32
86   {0x21, 0x41, 0x45, 0x4B, 0x31}, // 3         0x33
87   {0x18, 0x14, 0x12, 0x7F, 0x10}, // 4         0x34
88   {0x27, 0x45, 0x45, 0x45, 0x39}, // 5         0x35
89   {0x3C, 0x4A, 0x49, 0x49, 0x30}, // 6         0x36
90   {0x01, 0x71, 0x09, 0x05, 0x03}, // 7         0x37
91   {0x36, 0x49, 0x49, 0x49, 0x36}, // 8         0x38
92   {0x06, 0x49, 0x49, 0x29, 0x1E}, // 9         0x39
93   {0x00, 0x36, 0x36, 0x00, 0x00}, // :         0x3A
94   {0x00, 0x56, 0x36, 0x00, 0x00}, // ;         0x3B
95   {0x00, 0x08, 0x14, 0x22, 0x41}, // <         0x3C
96   {0x14, 0x14, 0x14, 0x14, 0x14}, // =         0x3D
97   {0x41, 0x22, 0x14, 0x08, 0x00}, // >         0x3E
98   {0x02, 0x01, 0x51, 0x09, 0x06}, // ?         0x3F
99   {0x32, 0x49, 0x79, 0x41, 0x3E}, // @         0x40
100   {0x7E, 0x11, 0x11, 0x11, 0x7E}, // A         0x41
101   {0x7F, 0x49, 0x49, 0x49, 0x36}, // B         0x42
102   {0x3E, 0x41, 0x41, 0x41, 0x22}, // C         0x43
103   {0x7F, 0x41, 0x41, 0x22, 0x1C}, // D         0x44
104   {0x7F, 0x49, 0x49, 0x49, 0x41}, // E         0x45
105   {0x7F, 0x09, 0x09, 0x01, 0x01}, // F         0x46
106   {0x3E, 0x41, 0x41, 0x51, 0x32}, // G         0x47
107   {0x7F, 0x08, 0x08, 0x08, 0x7F}, // H         0x48
108   {0x00, 0x41, 0x7F, 0x41, 0x00}, // I         0x49
109   {0x20, 0x40, 0x41, 0x3F, 0x01}, // J         0x4A
110   {0x7F, 0x08, 0x14, 0x22, 0x41}, // K         0x4B
111   {0x7F, 0x40, 0x40, 0x40, 0x40}, // L         0x4C
112   {0x7F, 0x02, 0x04, 0x02, 0x7F}, // M         0x4D
113   {0x7F, 0x04, 0x08, 0x10, 0x7F}, // N         0x4E
114   {0x3E, 0x41, 0x41, 0x41, 0x3E}, // O         0x4F
115   {0x7F, 0x09, 0x09, 0x09, 0x06}, // P         0x50
116   {0x3E, 0x41, 0x51, 0x21, 0x5E}, // Q         0x51
117   {0x7F, 0x09, 0x19, 0x29, 0x46}, // R         0x52
118   {0x46, 0x49, 0x49, 0x49, 0x31}, // S         0x53
119   {0x01, 0x01, 0x7F, 0x01, 0x01}, // T         0x54
120   {0x3F, 0x40, 0x40, 0x40, 0x3F}, // U         0x55
121   {0x1F, 0x20, 0x40, 0x20, 0x1F}, // V         0x56
122   {0x7F, 0x20, 0x18, 0x20, 0x7F}, // W         0x57
123   {0x63, 0x14, 0x08, 0x14, 0x63}, // X         0x58
124   {0x03, 0x04, 0x78, 0x04, 0x03}, // Y         0x59
125   {0x61, 0x51, 0x49, 0x45, 0x43}, // Z         0x5A
126   {0x00, 0x00, 0x7F, 0x41, 0x41}, // [         0x5B
127   {0x02, 0x04, 0x08, 0x10, 0x20}, // \         0x5C
128   {0x41, 0x41, 0x7F, 0x00, 0x00}, // ]         0x5D
129   {0x04, 0x02, 0x01, 0x02, 0x04}, // ^         0x5E
130   {0x40, 0x40, 0x40, 0x40, 0x40}, // _         0x5F
131   {0x00, 0x01, 0x02, 0x04, 0x00}, // `         0x60
132   {0x20, 0x54, 0x54, 0x54, 0x78}, // a         0x61
133   {0x7F, 0x48, 0x44, 0x44, 0x38}, // b         0x62
134   {0x38, 0x44, 0x44, 0x44, 0x20}, // c         0x63
135   {0x38, 0x44, 0x44, 0x48, 0x7F}, // d         0x64
136   {0x38, 0x54, 0x54, 0x54, 0x18}, // e         0x65
137   {0x08, 0x7E, 0x09, 0x01, 0x02}, // f         0x66
138   {0x08, 0x14, 0x54, 0x54, 0x3C}, // g         0x67
139   {0x7F, 0x08, 0x04, 0x04, 0x78}, // h         0x68
140   {0x00, 0x44, 0x7D, 0x40, 0x00}, // i         0x69
141   {0x20, 0x40, 0x44, 0x3D, 0x00}, // j         0x6A
142   {0x00, 0x7F, 0x10, 0x28, 0x44}, // k         0x6B
143   {0x00, 0x41, 0x7F, 0x40, 0x00}, // l         0x6C
144   {0x7C, 0x04, 0x18, 0x04, 0x78}, // m         0x6D
145   {0x7C, 0x08, 0x04, 0x04, 0x78}, // n         0x6E
146   {0x38, 0x44, 0x44, 0x44, 0x38}, // o         0x6F
147   {0x7C, 0x14, 0x14, 0x14, 0x08}, // p         0x70
148   {0x08, 0x14, 0x14, 0x18, 0x7C}, // q         0x71
149   {0x7C, 0x08, 0x04, 0x04, 0x08}, // r         0x72
150   {0x48, 0x54, 0x54, 0x54, 0x20}, // s         0x73
151   {0x04, 0x3F, 0x44, 0x40, 0x20}, // t         0x74
152   {0x3C, 0x40, 0x40, 0x20, 0x7C}, // u         0x75
153   {0x1C, 0x20, 0x40, 0x20, 0x1C}, // v         0x76
154   {0x3C, 0x40, 0x30, 0x40, 0x3C}, // w         0x77
155   {0x44, 0x28, 0x10, 0x28, 0x44}, // x         0x78
156   {0x0C, 0x50, 0x50, 0x50, 0x3C}, // y         0x79
157   {0x44, 0x64, 0x54, 0x4C, 0x44}, // z         0x7A
158   {0x00, 0x08, 0x36, 0x41, 0x00}, // {         0x7B
159   {0x00, 0x00, 0x7F, 0x00, 0x00}, // |         0x7C
160   {0x00, 0x41, 0x36, 0x08, 0x00}, // }         0x7D
161   {0x08, 0x08, 0x2A, 0x1C, 0x08}, // ->         0x7E
162   {0x08, 0x1C, 0x2A, 0x08, 0x08}  // <-         0x7F
35   {0x00, 0x00, 0x08, 0x00, 0x00}, // _Undef_      0x00 - dots for debug purposes
36   {0x01, 0x00, 0x00, 0x00, 0x40}, // _Undef_      0x01 - dots for debug purposes
37   {0x02, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x02
38   {0x03, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x03
39   {0x04, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x04
40   {0x05, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x05
41   {0x06, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x06
42   {0x07, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x07
43   {0x20, 0x70, 0x3F, 0x00, 0x00}, // Croma        0x08
44   {0x20, 0x70, 0x3F, 0x02, 0x0C}, // Croma        0x09
45   {0x20, 0x70, 0x3F, 0x05, 0x0A}, // Croma        0x0A
46   {0x20, 0x70, 0x3F, 0x15, 0x2A}, // Croma        0x0B
47   {0x20, 0x50, 0x50, 0x3F, 0x00}, // Croma        0x0C
48   {0x0D, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x0D
49   {0x0E, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x0E
50   {0x0F, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x0F
51   {0x10, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x10
52   {0x11, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x11
53   {0x12, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x12
54   {0x13, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x13
55   {0x14, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x14
56   {0x15, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x15
57   {0x16, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x16
58   {0x17, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x17
59   {0x18, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x18
60   {0x19, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x19
61   {0x1A, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1A
62   {0x1B, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1B
63   {0x1C, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1C
64   {0x1D, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1D
65   {0x1E, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1E
66   {0x1F, 0x00, 0x00, 0x00, 0x00}, // _Undef_      0x1F
67   {0x00, 0x00, 0x00, 0x00, 0x00}, // (space)      0x20
68   {0x00, 0x00, 0x5F, 0x00, 0x00}, // !            0x21
69   {0x00, 0x07, 0x00, 0x07, 0x00}, // "            0x22
70   {0x14, 0x7F, 0x14, 0x7F, 0x14}, // #            0x23
71   {0x24, 0x2A, 0x7F, 0x2A, 0x12}, // $            0x24
72   {0x23, 0x13, 0x08, 0x64, 0x62}, // %            0x25
73   {0x36, 0x49, 0x55, 0x22, 0x50}, // &            0x26
74   {0x00, 0x05, 0x03, 0x00, 0x00}, // '            0x27
75   {0x00, 0x1C, 0x22, 0x41, 0x00}, // (            0x28
76   {0x00, 0x41, 0x22, 0x1C, 0x00}, // )            0x29
77   {0x08, 0x2A, 0x1C, 0x2A, 0x08}, // *            0x2A
78   {0x08, 0x08, 0x3E, 0x08, 0x08}, // +            0x2B
79   {0x00, 0x50, 0x30, 0x00, 0x00}, // ,            0x2C
80   {0x08, 0x08, 0x08, 0x08, 0x08}, // -            0x2D
81   {0x00, 0x60, 0x60, 0x00, 0x00}, // .            0x2E
82   {0x20, 0x10, 0x08, 0x04, 0x02}, // /            0x2F
83   {0x3E, 0x51, 0x49, 0x45, 0x3E}, // 0            0x30
84   {0x00, 0x42, 0x7F, 0x40, 0x00}, // 1            0x31
85   {0x42, 0x61, 0x51, 0x49, 0x46}, // 2            0x32
86   {0x21, 0x41, 0x45, 0x4B, 0x31}, // 3            0x33
87   {0x18, 0x14, 0x12, 0x7F, 0x10}, // 4            0x34
88   {0x27, 0x45, 0x45, 0x45, 0x39}, // 5            0x35
89   {0x3C, 0x4A, 0x49, 0x49, 0x30}, // 6            0x36
90   {0x01, 0x71, 0x09, 0x05, 0x03}, // 7            0x37
91   {0x36, 0x49, 0x49, 0x49, 0x36}, // 8            0x38
92   {0x06, 0x49, 0x49, 0x29, 0x1E}, // 9            0x39
93   {0x00, 0x36, 0x36, 0x00, 0x00}, // :            0x3A
94   {0x00, 0x56, 0x36, 0x00, 0x00}, // ;            0x3B
95   {0x00, 0x08, 0x14, 0x22, 0x41}, // <            0x3C
96   {0x14, 0x14, 0x14, 0x14, 0x14}, // =            0x3D
97   {0x41, 0x22, 0x14, 0x08, 0x00}, // >            0x3E
98   {0x02, 0x01, 0x51, 0x09, 0x06}, // ?            0x3F
99   {0x32, 0x49, 0x79, 0x41, 0x3E}, // @            0x40
100   {0x7E, 0x11, 0x11, 0x11, 0x7E}, // A            0x41
101   {0x7F, 0x49, 0x49, 0x49, 0x36}, // B            0x42
102   {0x3E, 0x41, 0x41, 0x41, 0x22}, // C            0x43
103   {0x7F, 0x41, 0x41, 0x22, 0x1C}, // D            0x44
104   {0x7F, 0x49, 0x49, 0x49, 0x41}, // E            0x45
105   {0x7F, 0x09, 0x09, 0x01, 0x01}, // F            0x46
106   {0x3E, 0x41, 0x41, 0x51, 0x32}, // G            0x47
107   {0x7F, 0x08, 0x08, 0x08, 0x7F}, // H            0x48
108   {0x00, 0x41, 0x7F, 0x41, 0x00}, // I            0x49
109   {0x20, 0x40, 0x41, 0x3F, 0x01}, // J            0x4A
110   {0x7F, 0x08, 0x14, 0x22, 0x41}, // K            0x4B
111   {0x7F, 0x40, 0x40, 0x40, 0x40}, // L            0x4C
112   {0x7F, 0x02, 0x04, 0x02, 0x7F}, // M            0x4D
113   {0x7F, 0x04, 0x08, 0x10, 0x7F}, // N            0x4E
114   {0x3E, 0x41, 0x41, 0x41, 0x3E}, // O            0x4F
115   {0x7F, 0x09, 0x09, 0x09, 0x06}, // P            0x50
116   {0x3E, 0x41, 0x51, 0x21, 0x5E}, // Q            0x51
117   {0x7F, 0x09, 0x19, 0x29, 0x46}, // R            0x52
118   {0x46, 0x49, 0x49, 0x49, 0x31}, // S            0x53
119   {0x01, 0x01, 0x7F, 0x01, 0x01}, // T            0x54
120   {0x3F, 0x40, 0x40, 0x40, 0x3F}, // U            0x55
121   {0x1F, 0x20, 0x40, 0x20, 0x1F}, // V            0x56
122   {0x7F, 0x20, 0x18, 0x20, 0x7F}, // W            0x57
123   {0x63, 0x14, 0x08, 0x14, 0x63}, // X            0x58
124   {0x03, 0x04, 0x78, 0x04, 0x03}, // Y            0x59
125   {0x61, 0x51, 0x49, 0x45, 0x43}, // Z            0x5A
126   {0x00, 0x00, 0x7F, 0x41, 0x41}, // [            0x5B
127   {0x02, 0x04, 0x08, 0x10, 0x20}, // \            0x5C
128   {0x41, 0x41, 0x7F, 0x00, 0x00}, // ]            0x5D
129   {0x04, 0x02, 0x01, 0x02, 0x04}, // ^            0x5E
130   {0x40, 0x40, 0x40, 0x40, 0x40}, // _            0x5F
131   {0x00, 0x01, 0x02, 0x04, 0x00}, // `            0x60
132   {0x20, 0x54, 0x54, 0x54, 0x78}, // a            0x61
133   {0x7F, 0x48, 0x44, 0x44, 0x38}, // b            0x62
134   {0x38, 0x44, 0x44, 0x44, 0x20}, // c            0x63
135   {0x38, 0x44, 0x44, 0x48, 0x7F}, // d            0x64
136   {0x38, 0x54, 0x54, 0x54, 0x18}, // e            0x65
137   {0x08, 0x7E, 0x09, 0x01, 0x02}, // f            0x66
138   {0x08, 0x14, 0x54, 0x54, 0x3C}, // g            0x67
139   {0x7F, 0x08, 0x04, 0x04, 0x78}, // h            0x68
140   {0x00, 0x44, 0x7D, 0x40, 0x00}, // i            0x69
141   {0x20, 0x40, 0x44, 0x3D, 0x00}, // j            0x6A
142   {0x00, 0x7F, 0x10, 0x28, 0x44}, // k            0x6B
143   {0x00, 0x41, 0x7F, 0x40, 0x00}, // l            0x6C
144   {0x7C, 0x04, 0x18, 0x04, 0x78}, // m            0x6D
145   {0x7C, 0x08, 0x04, 0x04, 0x78}, // n            0x6E
146   {0x38, 0x44, 0x44, 0x44, 0x38}, // o            0x6F
147   {0x7C, 0x14, 0x14, 0x14, 0x08}, // p            0x70
148   {0x08, 0x14, 0x14, 0x18, 0x7C}, // q            0x71
149   {0x7C, 0x08, 0x04, 0x04, 0x08}, // r            0x72
150   {0x48, 0x54, 0x54, 0x54, 0x20}, // s            0x73
151   {0x04, 0x3F, 0x44, 0x40, 0x20}, // t            0x74
152   {0x3C, 0x40, 0x40, 0x20, 0x7C}, // u            0x75
153   {0x1C, 0x20, 0x40, 0x20, 0x1C}, // v            0x76
154   {0x3C, 0x40, 0x30, 0x40, 0x3C}, // w            0x77
155   {0x44, 0x28, 0x10, 0x28, 0x44}, // x            0x78
156   {0x0C, 0x50, 0x50, 0x50, 0x3C}, // y            0x79
157   {0x44, 0x64, 0x54, 0x4C, 0x44}, // z            0x7A
158   {0x00, 0x08, 0x36, 0x41, 0x00}, // {            0x7B
159   {0x00, 0x00, 0x7F, 0x00, 0x00}, // |            0x7C
160   {0x00, 0x41, 0x36, 0x08, 0x00}, // }            0x7D
161   {0x08, 0x08, 0x2A, 0x1C, 0x08}, // ->           0x7E
162   {0x08, 0x1C, 0x2A, 0x08, 0x08}  // <-           0x7F
163163};
164164//--------------------------------------------------------------------------------------------------------------------------------------------
165165machine_config_constructor esq2x16_sq1_t::device_mconfig_additions() const
r253707r253708
174174
175175   // Non-ASCII codes that needs to be treated as ASCII characters
176176   if (
177     data == 0x08 ||
178     data == 0x09 ||
179     data == 0x0A ||
180     data == 0x0B ||
181     data == 0x0C
177      data == 0x08 ||
178      data == 0x09 ||
179      data == 0x0A ||
180      data == 0x0B ||
181      data == 0x0C
182182   ) data = '^';  // musical notes
183183
184184   // Resolve here 2-Bytes commands: the command was saved previously
r253707r253708
221221      case 0x8E:
222222      case 0x8F:
223223         // LED OFF, ON, BLINK
224         LedState = m_LcdCommand & 0x03;
224         LedState = m_LcdCommand & 0x03;
225225         if (
226           DisplayCode >= 16 || // Out of bounds
227           DisplayCode == 6  || // non-existent
228           DisplayCode == 7  || // non-existent
229           DisplayCode == 14 || // non-existent
230           DisplayCode == 15    // non-existent
231          )
226            DisplayCode >= 16 || // Out of bounds
227            DisplayCode == 6  || // non-existent
228            DisplayCode == 7  || // non-existent
229            DisplayCode == 14 || // non-existent
230            DisplayCode == 15    // non-existent
231            )
232232         {
233233            #ifdef VERBOSE
234234            printf("LCD %02X: Led %02d does'nt exist       - pos=%02X (%d)\n", m_LcdCommand, DisplayCode, m_lcdPos, m_lcdPage);
r253707r253708
236236         }
237237         else
238238         {
239            if (m_leds[DisplayCode] != LedState)
239            if (m_leds[DisplayCode] != LedState)
240240            {
241241               m_leds[DisplayCode] = LedState;
242                m_ledsDirty[DisplayCode] = 1;
243             }
242               m_ledsDirty[DisplayCode] = 1;
243            }
244244            update_display();
245245         }
246246         m_LcdCommand = 0;
r253707r253708
255255         return;
256256         break;
257257   }
258   
258
259259   if ((data >= 0x20) && (data <= 0x7f))
260260   {
261261      #ifdef VERBOSE
262262      printf("LCD %02X:                     \"%c\"   - pos=%02X (%d)\n", DisplayCode, data, m_lcdPos, m_lcdPage);
263263      #endif
264264      m_lcdpg[m_lcdPage][m_lcdPos++] = DisplayCode;
265      if (m_lcdPos > 31)    m_lcdPos = 31;
265      if (m_lcdPos > 31) m_lcdPos = 31;
266266
267267      update_display();
268268      return;
269269   }
270   
270
271271   if (DisplayCode >= 0x80)
272272   {
273273      switch (DisplayCode) {
274274         // Known 2-bytes command
275         case 0x87:   // Go To
276         case 0x88:   // Save Cursor Position
277         case 0x89:   // Restore Cursor Position
275         case 0x87:  // Go To
276         case 0x88:  // Save Cursor Position
277         case 0x89:  // Restore Cursor Position
278278            // Save the command for the next byte
279279            m_LcdCommand = DisplayCode;
280280            return;
r253707r253708
354354   for (int led = 0; led < 16; led++)
355355   {
356356      if (m_ledsDirty[led]) {
357          machine().output().set_indexed_value("rLed_", led, m_leds[led]);
358          m_ledsDirty[led] = 0;
359       }
357         machine().output().set_indexed_value("rLed_", led, m_leds[led]);
358         m_ledsDirty[led] = 0;
359      }
360360   }
361361
362362   for (int page = 0; page < 4; page++)
363363   {
364364      for (int pos = 0; pos < 32; pos++)
365365      {
366         // stealed from tecnbras.cpp and modified   
366         // stealed from tecnbras.cpp and modified
367367         for (int rr=0; rr<7; rr++) {
368368            lcdCharRow = RotateLcdChar(m_lcdpg[page][pos],rr);
369            machine().output().set_indexed_value("pg_", (page+1)*1000 + pos*7 + rr, 0x1F & lcdCharRow);
369            machine().output().set_indexed_value("pg_", (page+1)*1000 + pos*7 + rr, 0x1F & lcdCharRow);
370370         }
371371      }
372372   }
r253707r253708
377377   //lcd_reset();
378378   m_lcdPage = m_lcdSavedPos = m_lcdPos = m_LcdCommand = 0;
379379   memset(m_leds,  0, sizeof(m_leds));
380   memset(m_lcdpg,  1, sizeof(m_lcdpg));   // Set to 1 for debug: to see what "pages" are set to 0 from the firmware
380   memset(m_lcdpg,  1, sizeof(m_lcdpg));   // Set to 1 for debug: to see what "pages" are set to 0 from the firmware
381381}
382382//--------------------------------------------------------------------------------------------------------------------------------------------
383383void esq2x16_sq1_t::lcd_reset()
trunk/src/mame/machine/gaelco2.cpp
r253707r253708
291291{
292292   return (x << c) | (x >> (32 - c));
293293}
294
294
295295static UINT16 get_lo(UINT32 x)
296296{
297297   return ((x & 0x00000010) <<  1) |
r253707r253708
308308         ((x & 0x00044000) >>  5) |
309309         ((x & 0x00000020) >>  1);
310310}
311
311
312312static UINT16 get_hi(UINT32 x)
313313{
314314   return ((x & 0x00001400) >>  0) |
r253707r253708
327327         ((x & 0x00000080) >>  4) |
328328         ((x & 0x00000100) >>  1);
329329}
330
330
331331static UINT16 get_out(UINT16 x)
332332{
333333   return ((x & 0xc840) <<  0) |
r253707r253708
343343         ((x & 0x2000) >>  6) |
344344         ((x & 0x0020) >>  2);
345345}
346
346
347347UINT16 mangle(UINT32 x)
348348{
349349   UINT16 a = get_lo(x);
trunk/src/mame/machine/pc9801_kbd.h
r253707r253708
5555   UINT8               m_rx_buf[0x80];
5656   UINT8               m_keyb_tx;
5757   UINT8               m_keyb_rx;
58   bool            m_key_avail;
58   bool                m_key_avail;
5959};
6060
6161
trunk/src/mame/machine/trs80.cpp
r253707r253708
422422    EEh    9600
423423    FFh    19200
424424Note: this may be a COM5016 dual baud rate generator, or may be an equivalent circuit embedded in the gate array ASIC on the trs80 model 4
425   */
425    */
426426
427427   static const int baud_clock[]={ 800, 1200, 1760, 2152, 2400, 4800, 9600, 19200, 28800, 32000, 38400, 57600, 76800, 115200, 153600, 307200 };
428428   m_ay31015->set_receiver_clock(baud_clock[data & 0x0f]);
trunk/src/mame/video/galpanic.cpp
r253707r253708
88void galpanic_state::video_start()
99{
1010   m_screen->register_screen_bitmap(m_bitmap);
11   
11
1212   save_item(NAME(m_bitmap));
1313}
1414
trunk/src/mame/video/megasys1.cpp
r253707r253708
893893{
894894   const UINT8 *color_prom = memregion("proms")->base();
895895   int pri_code, offset, i, order;
896   
896
897897   /* convert PROM to something we can use */
898898
899899   for (pri_code = 0; pri_code < 0x10 ; pri_code++)    // 16 priority codes
trunk/src/osd/modules/osdwindow.cpp
r253707r253708
6060      default:
6161         return nullptr;
6262   }
63}
No newline at end of file
63}
trunk/src/osd/modules/osdwindow.h
r253707r253708
192192
193193   render_primitive_list   *m_primlist;
194194   osd_window_config       m_win_config;
195   int                  m_index;
196   osd_window            *m_main;
195   int                     m_index;
196   osd_window              *m_main;
197197protected:
198198   int                     m_prescale;
199199};
r253707r253708
241241protected:
242242   /* Internal flags */
243243   static const int FI_CHANGED                 = 0x010000;
244   bool      m_sliders_dirty;
244   bool        m_sliders_dirty;
245245
246246private:
247   osd_window   *m_window;
248   int         m_flags;
247   osd_window  *m_window;
248   int         m_flags;
249249};
250250
251251
trunk/src/osd/modules/render/bgfx/blendreader.cpp
r253707r253708
1111#include "blendreader.h"
1212
1313const blend_reader::string_to_enum blend_reader::EQUATION_NAMES[blend_reader::EQUATION_COUNT] = {
14    { "add",            BGFX_STATE_BLEND_EQUATION_ADD },
15    { "sub",            BGFX_STATE_BLEND_EQUATION_SUB },
16    { "subtract",       BGFX_STATE_BLEND_EQUATION_SUB },
17    { "revSub",         BGFX_STATE_BLEND_EQUATION_REVSUB },
18    { "revSubtract",    BGFX_STATE_BLEND_EQUATION_REVSUB },
19    { "min",            BGFX_STATE_BLEND_EQUATION_MIN },
20    { "max",            BGFX_STATE_BLEND_EQUATION_MAX }
14   { "add",            BGFX_STATE_BLEND_EQUATION_ADD },
15   { "sub",            BGFX_STATE_BLEND_EQUATION_SUB },
16   { "subtract",       BGFX_STATE_BLEND_EQUATION_SUB },
17   { "revSub",         BGFX_STATE_BLEND_EQUATION_REVSUB },
18   { "revSubtract",    BGFX_STATE_BLEND_EQUATION_REVSUB },
19   { "min",            BGFX_STATE_BLEND_EQUATION_MIN },
20   { "max",            BGFX_STATE_BLEND_EQUATION_MAX }
2121};
2222
2323const blend_reader::string_to_enum blend_reader::FUNCTION_NAMES[blend_reader::FUNCTION_COUNT] = {
24    { "0",              BGFX_STATE_BLEND_ZERO },
25    { "zero",           BGFX_STATE_BLEND_ZERO },
26    { "1",              BGFX_STATE_BLEND_ONE },
27    { "one",            BGFX_STATE_BLEND_ONE },
28    { "srcColor",       BGFX_STATE_BLEND_SRC_COLOR },
29    { "1-srcColor",     BGFX_STATE_BLEND_INV_SRC_COLOR },
30    { "invSrcColor",    BGFX_STATE_BLEND_INV_SRC_COLOR },
31    { "dstColor",       BGFX_STATE_BLEND_DST_COLOR },
32    { "1-dstColor",     BGFX_STATE_BLEND_INV_DST_COLOR },
33    { "invDstColor",    BGFX_STATE_BLEND_INV_DST_COLOR },
34    { "srcAlpha",       BGFX_STATE_BLEND_SRC_ALPHA },
35    { "1-srcAlpha",     BGFX_STATE_BLEND_INV_SRC_ALPHA },
36    { "invSrcAlpha",    BGFX_STATE_BLEND_INV_SRC_ALPHA },
37    { "dstAlpha",       BGFX_STATE_BLEND_DST_ALPHA },
38    { "1-dstAlpha",     BGFX_STATE_BLEND_INV_DST_ALPHA },
39    { "invDstAlpha",    BGFX_STATE_BLEND_INV_DST_ALPHA }
24   { "0",              BGFX_STATE_BLEND_ZERO },
25   { "zero",           BGFX_STATE_BLEND_ZERO },
26   { "1",              BGFX_STATE_BLEND_ONE },
27   { "one",            BGFX_STATE_BLEND_ONE },
28   { "srcColor",       BGFX_STATE_BLEND_SRC_COLOR },
29   { "1-srcColor",     BGFX_STATE_BLEND_INV_SRC_COLOR },
30   { "invSrcColor",    BGFX_STATE_BLEND_INV_SRC_COLOR },
31   { "dstColor",       BGFX_STATE_BLEND_DST_COLOR },
32   { "1-dstColor",     BGFX_STATE_BLEND_INV_DST_COLOR },
33   { "invDstColor",    BGFX_STATE_BLEND_INV_DST_COLOR },
34   { "srcAlpha",       BGFX_STATE_BLEND_SRC_ALPHA },
35   { "1-srcAlpha",     BGFX_STATE_BLEND_INV_SRC_ALPHA },
36   { "invSrcAlpha",    BGFX_STATE_BLEND_INV_SRC_ALPHA },
37   { "dstAlpha",       BGFX_STATE_BLEND_DST_ALPHA },
38   { "1-dstAlpha",     BGFX_STATE_BLEND_INV_DST_ALPHA },
39   { "invDstAlpha",    BGFX_STATE_BLEND_INV_DST_ALPHA }
4040};
4141
4242uint64_t blend_reader::read_from_value(const Value& value)
4343{
44    uint64_t equation = get_enum_from_value(value, "equation", BGFX_STATE_BLEND_EQUATION_ADD, EQUATION_NAMES, EQUATION_COUNT);
45    uint64_t srccolor = get_enum_from_value(value, "srcColor", BGFX_STATE_BLEND_ONE, FUNCTION_NAMES, FUNCTION_COUNT);
46    uint64_t dstcolor = get_enum_from_value(value, "dstColor", BGFX_STATE_BLEND_ZERO, FUNCTION_NAMES, FUNCTION_COUNT);
47    uint64_t srcalpha = get_enum_from_value(value, "srcAlpha", BGFX_STATE_BLEND_ONE, FUNCTION_NAMES, FUNCTION_COUNT);
48    uint64_t dstalpha = get_enum_from_value(value, "dstAlpha", BGFX_STATE_BLEND_ZERO, FUNCTION_NAMES, FUNCTION_COUNT);
44   uint64_t equation = get_enum_from_value(value, "equation", BGFX_STATE_BLEND_EQUATION_ADD, EQUATION_NAMES, EQUATION_COUNT);
45   uint64_t srccolor = get_enum_from_value(value, "srcColor", BGFX_STATE_BLEND_ONE, FUNCTION_NAMES, FUNCTION_COUNT);
46   uint64_t dstcolor = get_enum_from_value(value, "dstColor", BGFX_STATE_BLEND_ZERO, FUNCTION_NAMES, FUNCTION_COUNT);
47   uint64_t srcalpha = get_enum_from_value(value, "srcAlpha", BGFX_STATE_BLEND_ONE, FUNCTION_NAMES, FUNCTION_COUNT);
48   uint64_t dstalpha = get_enum_from_value(value, "dstAlpha", BGFX_STATE_BLEND_ZERO, FUNCTION_NAMES, FUNCTION_COUNT);
4949
50    return BGFX_STATE_BLEND_EQUATION(equation) | BGFX_STATE_BLEND_FUNC_SEPARATE(srccolor, dstcolor, srcalpha, dstalpha);
50   return BGFX_STATE_BLEND_EQUATION(equation) | BGFX_STATE_BLEND_FUNC_SEPARATE(srccolor, dstcolor, srcalpha, dstalpha);
5151}
trunk/src/osd/modules/render/bgfx/blendreader.h
r253707r253708
1919
2020class blend_reader : public state_reader {
2121public:
22    static uint64_t read_from_value(const Value& value);
22   static uint64_t read_from_value(const Value& value);
2323
2424private:
25    static const int EQUATION_COUNT = 7;
26    static const string_to_enum EQUATION_NAMES[EQUATION_COUNT];
27    static const int FUNCTION_COUNT = 16;
28    static const string_to_enum FUNCTION_NAMES[FUNCTION_COUNT];
25   static const int EQUATION_COUNT = 7;
26   static const string_to_enum EQUATION_NAMES[EQUATION_COUNT];
27   static const int FUNCTION_COUNT = 16;
28   static const string_to_enum FUNCTION_NAMES[FUNCTION_COUNT];
2929};
3030
31#endif // __DRAWBGFX_BLEND_READER__
No newline at end of file
31#endif // __DRAWBGFX_BLEND_READER__
trunk/src/osd/modules/render/bgfx/chain.h
r253707r253708
2222class bgfx_chain
2323{
2424public:
25    bgfx_chain(std::string name, std::string author, std::vector<bgfx_slider*> sliders, std::vector<bgfx_parameter*> params, std::vector<bgfx_chain_entry*> entries);
26    ~bgfx_chain();
25   bgfx_chain(std::string name, std::string author, std::vector<bgfx_slider*> sliders, std::vector<bgfx_parameter*> params, std::vector<bgfx_chain_entry*> entries);
26   ~bgfx_chain();
2727
28    void submit(render_primitive* prim, int view);
28   void submit(render_primitive* prim, int view);
2929
3030private:
31   std::string                  m_name;
32   std::string                  m_author;
33    std::vector<bgfx_slider*>      m_sliders;
34    std::vector<bgfx_parameter*>   m_params;
35    std::vector<bgfx_chain_entry*>   m_entries;
31   std::string                     m_name;
32   std::string                     m_author;
33   std::vector<bgfx_slider*>       m_sliders;
34   std::vector<bgfx_parameter*>    m_params;
35   std::vector<bgfx_chain_entry*>  m_entries;
3636};
3737
38#endif // __DRAWBGFX_CHAIN__
No newline at end of file
38#endif // __DRAWBGFX_CHAIN__
trunk/src/osd/modules/render/bgfx/chainentry.h
r253707r253708
2727class bgfx_chain_entry
2828{
2929public:
30    bgfx_chain_entry(std::string name, bgfx_effect* effect, std::vector<bgfx_input_pair>& inputs, bgfx_target* output);
31    ~bgfx_chain_entry();
30   bgfx_chain_entry(std::string name, bgfx_effect* effect, std::vector<bgfx_input_pair>& inputs, bgfx_target* output);
31   ~bgfx_chain_entry();
3232
33    void submit(render_primitive* prim, int view);
33   void submit(render_primitive* prim, int view);
3434
35    // Getters
36    std::string name() const { return m_name; }
35   // Getters
36   std::string name() const { return m_name; }
3737
3838private:
39   std::string                  m_name;
40    bgfx_effect*               m_effect;
41    std::vector<bgfx_input_pair>   m_inputs;
42    bgfx_target*               m_output;
39   std::string                     m_name;
40   bgfx_effect*                    m_effect;
41   std::vector<bgfx_input_pair>    m_inputs;
42   bgfx_target*                    m_output;
4343};
4444
45#endif // __DRAWBGFX_CHAIN_ENTRY__
No newline at end of file
45#endif // __DRAWBGFX_CHAIN_ENTRY__
trunk/src/osd/modules/render/bgfx/chainentryreader.cpp
r253707r253708
2020
2121bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, texture_manager& textures, target_manager& targets, effect_manager& effects)
2222{
23    validate_parameters(value);
23   validate_parameters(value);
2424
2525   bgfx_effect* effect = effects.effect(value["effect"].GetString());
2626
r253707r253708
5353   assert(value["shader"].IsString());
5454   assert(value.HasMember("output"));
5555   assert(value["output"].IsString());
56}
No newline at end of file
56}
trunk/src/osd/modules/render/bgfx/chainentryreader.h
r253707r253708
2121class chain_entry_reader : public state_reader
2222{
2323public:
24    static bgfx_chain_entry* read_from_value(const Value& value, texture_manager& textures, target_manager& targets, effect_manager& effects);
24   static bgfx_chain_entry* read_from_value(const Value& value, texture_manager& textures, target_manager& targets, effect_manager& effects);
2525
2626private:
27    static void validate_parameters(const Value& value);
27   static void validate_parameters(const Value& value);
2828};
2929
30#endif // __DRAWBGFX_CHAIN_ENTRY_READER__
No newline at end of file
30#endif // __DRAWBGFX_CHAIN_ENTRY_READER__
trunk/src/osd/modules/render/bgfx/chainreader.cpp
r253707r253708
2020
2121bgfx_chain* chain_reader::read_from_value(const Value& value, texture_manager& textures, target_manager& targets, effect_manager& effects, uint32_t screen_width, uint32_t screen_height)
2222{
23    validate_parameters(value);
23   validate_parameters(value);
2424
2525   std::string name = value["name"].GetString();
2626   std::string author = value["author"].GetString();
r253707r253708
9292   assert(value.HasMember("author"));
9393   assert(value["author"].IsString());
9494   assert(value.HasMember("passes"));
95}
No newline at end of file
95}
trunk/src/osd/modules/render/bgfx/chainreader.h
r253707r253708
2121class chain_reader : public state_reader
2222{
2323public:
24    static bgfx_chain* read_from_value(const Value& value, texture_manager& textures, target_manager& targets, effect_manager& effects, uint32_t screen_width, uint32_t screen_height);
24   static bgfx_chain* read_from_value(const Value& value, texture_manager& textures, target_manager& targets, effect_manager& effects, uint32_t screen_width, uint32_t screen_height);
2525
2626private:
27    static void validate_parameters(const Value& value);
27   static void validate_parameters(const Value& value);
2828};
2929
30#endif // __DRAWBGFX_CHAIN_READER__
No newline at end of file
30#endif // __DRAWBGFX_CHAIN_READER__
trunk/src/osd/modules/render/bgfx/cullreader.cpp
r253707r253708
1111#include "cullreader.h"
1212
1313const cull_reader::string_to_enum cull_reader::MODE_NAMES[cull_reader::MODE_COUNT] = {
14    { "none",   0 },
15    { "cw",     BGFX_STATE_CULL_CW },
16    { "ccw",    BGFX_STATE_CULL_CCW }
14   { "none",   0 },
15   { "cw",     BGFX_STATE_CULL_CW },
16   { "ccw",    BGFX_STATE_CULL_CCW }
1717};
1818
1919uint64_t cull_reader::read_from_value(const Value& value)
2020{
21    return get_enum_from_value(value, "mode", BGFX_STATE_CULL_CCW, MODE_NAMES, MODE_COUNT);
21   return get_enum_from_value(value, "mode", BGFX_STATE_CULL_CCW, MODE_NAMES, MODE_COUNT);
2222}
trunk/src/osd/modules/render/bgfx/cullreader.h
r253707r253708
1515
1616class cull_reader : public state_reader {
1717public:
18    static uint64_t read_from_value(const Value& value);
18   static uint64_t read_from_value(const Value& value);
1919
2020private:
21    static const int MODE_COUNT = 3;
22    static const string_to_enum MODE_NAMES[MODE_COUNT];
21   static const int MODE_COUNT = 3;
22   static const string_to_enum MODE_NAMES[MODE_COUNT];
2323};
2424
25#endif // __DRAWBGFX_CULL_READER__
No newline at end of file
25#endif // __DRAWBGFX_CULL_READER__
trunk/src/osd/modules/render/bgfx/depthreader.cpp
r253707r253708
1111#include "depthreader.h"
1212
1313const depth_reader::string_to_enum depth_reader::FUNCTION_NAMES[depth_reader::FUNCTION_COUNT] = {
14    { "never",      BGFX_STATE_DEPTH_TEST_NEVER },
15    { "less",       BGFX_STATE_DEPTH_TEST_LESS },
16    { "equal",      BGFX_STATE_DEPTH_TEST_EQUAL },
17    { "lequal",     BGFX_STATE_DEPTH_TEST_LEQUAL },
18    { "greater",    BGFX_STATE_DEPTH_TEST_GREATER },
19    { "notequal",   BGFX_STATE_DEPTH_TEST_NOTEQUAL },
20    { "gequal",     BGFX_STATE_DEPTH_TEST_GEQUAL },
21    { "always",     BGFX_STATE_DEPTH_TEST_ALWAYS }
14   { "never",      BGFX_STATE_DEPTH_TEST_NEVER },
15   { "less",       BGFX_STATE_DEPTH_TEST_LESS },
16   { "equal",      BGFX_STATE_DEPTH_TEST_EQUAL },
17   { "lequal",     BGFX_STATE_DEPTH_TEST_LEQUAL },
18   { "greater",    BGFX_STATE_DEPTH_TEST_GREATER },
19   { "notequal",   BGFX_STATE_DEPTH_TEST_NOTEQUAL },
20   { "gequal",     BGFX_STATE_DEPTH_TEST_GEQUAL },
21   { "always",     BGFX_STATE_DEPTH_TEST_ALWAYS }
2222};
2323
2424uint64_t depth_reader::read_from_value(const Value& value)
2525{
26    uint64_t write_enable = 0;
27    if (value.HasMember("writeEnable"))
28    {
29        assert(value["writeEnable"].IsBool());
30        write_enable = value["writeEnable"].GetBool() ? BGFX_STATE_DEPTH_WRITE: 0;
31    }
26   uint64_t write_enable = 0;
27   if (value.HasMember("writeEnable"))
28   {
29      assert(value["writeEnable"].IsBool());
30      write_enable = value["writeEnable"].GetBool() ? BGFX_STATE_DEPTH_WRITE: 0;
31   }
3232
33    uint64_t function = get_enum_from_value(value, "function", BGFX_STATE_DEPTH_TEST_ALWAYS, FUNCTION_NAMES, FUNCTION_COUNT);
33   uint64_t function = get_enum_from_value(value, "function", BGFX_STATE_DEPTH_TEST_ALWAYS, FUNCTION_NAMES, FUNCTION_COUNT);
3434
35    return write_enable | function;
35   return write_enable | function;
3636}
trunk/src/osd/modules/render/bgfx/depthreader.h
r253707r253708
1515
1616class depth_reader : public state_reader {
1717public:
18    static uint64_t read_from_value(const Value& value);
18   static uint64_t read_from_value(const Value& value);
1919
2020private:
21    static const int FUNCTION_COUNT = 8;
22    static const string_to_enum FUNCTION_NAMES[FUNCTION_COUNT];
21   static const int FUNCTION_COUNT = 8;
22   static const string_to_enum FUNCTION_NAMES[FUNCTION_COUNT];
2323};
2424
25#endif // __DRAWBGFX_DEPTH_READER__
No newline at end of file
25#endif // __DRAWBGFX_DEPTH_READER__
trunk/src/osd/modules/render/bgfx/effect.cpp
r253707r253708
99#include "effect.h"
1010
1111bgfx_effect::bgfx_effect(uint64_t state, bgfx::ShaderHandle vertex_shader, bgfx::ShaderHandle fragment_shader, std::vector<bgfx_uniform*> uniforms)
12    : m_state(state)
12   : m_state(state)
1313{
14    m_program_handle = bgfx::createProgram(vertex_shader, fragment_shader, false);
14   m_program_handle = bgfx::createProgram(vertex_shader, fragment_shader, false);
1515
16    for (int i = 0; i < uniforms.size(); i++)
17    {
18        m_uniforms[uniforms[i]->name()] = uniforms[i];
19    }
16   for (int i = 0; i < uniforms.size(); i++)
17   {
18      m_uniforms[uniforms[i]->name()] = uniforms[i];
19   }
2020}
2121
2222bgfx_effect::~bgfx_effect()
2323{
24    for (std::pair<std::string, bgfx_uniform*> uniform : m_uniforms)
25    {
26        delete uniform.second;
27    }
28    m_uniforms.clear();
29    bgfx::destroyProgram(m_program_handle);
24   for (std::pair<std::string, bgfx_uniform*> uniform : m_uniforms)
25   {
26      delete uniform.second;
27   }
28   m_uniforms.clear();
29   bgfx::destroyProgram(m_program_handle);
3030}
3131
3232void bgfx_effect::submit(int view)
r253707r253708
3535   {
3636      (uniform_pair.second)->upload();
3737   }
38    bgfx::setState(m_state);
39    bgfx::submit(view, m_program_handle);
38   bgfx::setState(m_state);
39   bgfx::submit(view, m_program_handle);
4040}
4141
4242bgfx_uniform* bgfx_effect::uniform(std::string name)
4343{
44    std::map<std::string, bgfx_uniform*>::iterator iter = m_uniforms.find(name);
44   std::map<std::string, bgfx_uniform*>::iterator iter = m_uniforms.find(name);
4545
46    if (iter != m_uniforms.end())
47    {
48        return iter->second;
49    }
46   if (iter != m_uniforms.end())
47   {
48      return iter->second;
49   }
5050
51    return nullptr;
52}
No newline at end of file
51   return nullptr;
52}
trunk/src/osd/modules/render/bgfx/effect.h
r253707r253708
2222class bgfx_effect
2323{
2424public:
25    bgfx_effect(uint64_t state, bgfx::ShaderHandle vertexShader, bgfx::ShaderHandle fragmentShader, std::vector<bgfx_uniform*> uniforms);
26    ~bgfx_effect();
25   bgfx_effect(uint64_t state, bgfx::ShaderHandle vertexShader, bgfx::ShaderHandle fragmentShader, std::vector<bgfx_uniform*> uniforms);
26   ~bgfx_effect();
2727
28    void submit(int view);
28   void submit(int view);
2929
30    // Getters
31    bgfx_uniform* uniform(std::string name);
32    bgfx::ProgramHandle get_program() const { return m_program_handle; }
30   // Getters
31   bgfx_uniform* uniform(std::string name);
32   bgfx::ProgramHandle get_program() const { return m_program_handle; }
3333
3434private:
35    uint64_t                        m_state;
36    bgfx::ProgramHandle                  m_program_handle;
37    std::map<std::string, bgfx_uniform*>   m_uniforms;
35   uint64_t                                m_state;
36   bgfx::ProgramHandle                     m_program_handle;
37   std::map<std::string, bgfx_uniform*>    m_uniforms;
3838};
3939
40#endif // __DRAWBGFX_EFFECT__
No newline at end of file
40#endif // __DRAWBGFX_EFFECT__
trunk/src/osd/modules/render/bgfx/effectmanager.cpp
r253707r253708
2525
2626effect_manager::~effect_manager()
2727{
28    for (std::pair<std::string, bgfx_effect*> effect : m_effects)
29    {
28   for (std::pair<std::string, bgfx_effect*> effect : m_effects)
29   {
3030      delete effect.second;
31    }
32    m_effects.clear();
31   }
32   m_effects.clear();
3333}
3434
3535bgfx_effect* effect_manager::effect(std::string name)
3636{
37    std::map<std::string, bgfx_effect*>::iterator iter = m_effects.find(name);
38    if (iter != m_effects.end())
39    {
40        return iter->second;
41    }
37   std::map<std::string, bgfx_effect*>::iterator iter = m_effects.find(name);
38   if (iter != m_effects.end())
39   {
40      return iter->second;
41   }
4242
43    return load_effect(name);
43   return load_effect(name);
4444}
4545
4646bgfx_effect* effect_manager::load_effect(std::string name) {
r253707r253708
6060   document.Parse<0>(data);
6161   bgfx_effect* effect = effect_reader::read_from_value(m_shaders, document);
6262
63    m_effects[name] = effect;
63   m_effects[name] = effect;
6464
65    return effect;
65   return effect;
6666}
trunk/src/osd/modules/render/bgfx/effectmanager.h
r253707r253708
2525
2626class effect_manager {
2727public:
28    effect_manager(shader_manager& shaders) : m_shaders(shaders) { }
29    ~effect_manager();
28   effect_manager(shader_manager& shaders) : m_shaders(shaders) { }
29   ~effect_manager();
3030
31    // Getters
32    bgfx_effect* effect(std::string name);
31   // Getters
32   bgfx_effect* effect(std::string name);
3333
3434private:
35    bgfx_effect* load_effect(std::string name);
35   bgfx_effect* load_effect(std::string name);
3636
37   shader_manager&                  m_shaders;
38    std::map<std::string, bgfx_effect*> m_effects;
37   shader_manager&                     m_shaders;
38   std::map<std::string, bgfx_effect*> m_effects;
3939};
4040
41#endif // __DRAWBGFX_EFFECT_MANAGER__
No newline at end of file
41#endif // __DRAWBGFX_EFFECT_MANAGER__
trunk/src/osd/modules/render/bgfx/effectreader.cpp
r253707r253708
2424
2525bgfx_effect* effect_reader::read_from_value(shader_manager& shaders, const Value& value)
2626{
27    validate_parameters(value);
27   validate_parameters(value);
2828
29    uint64_t blend = blend_reader::read_from_value(value["blend"]);
30    uint64_t depth = depth_reader::read_from_value(value["depth"]);
31    uint64_t cull = cull_reader::read_from_value(value["cull"]);
32    uint64_t write = write_reader::read_from_value(value["write"]);
29   uint64_t blend = blend_reader::read_from_value(value["blend"]);
30   uint64_t depth = depth_reader::read_from_value(value["depth"]);
31   uint64_t cull = cull_reader::read_from_value(value["cull"]);
32   uint64_t write = write_reader::read_from_value(value["write"]);
3333
34    std::vector<bgfx_uniform*> uniforms;
35    const Value& uniform_array = value["uniforms"];
36    for (UINT32 i = 0; i < uniform_array.Size(); i++)
37    {
38        uniforms.push_back(uniform_reader::read_from_value(uniform_array[i]));
39    }
34   std::vector<bgfx_uniform*> uniforms;
35   const Value& uniform_array = value["uniforms"];
36   for (UINT32 i = 0; i < uniform_array.Size(); i++)
37   {
38      uniforms.push_back(uniform_reader::read_from_value(uniform_array[i]));
39   }
4040
41    std::string vertex_name(value["vertex"].GetString());
41   std::string vertex_name(value["vertex"].GetString());
4242   bgfx::ShaderHandle vertex_shader = shaders.shader(vertex_name);
4343
4444   std::string fragment_name("");
4545   if (value.HasMember("fragment"))
4646   {
47       fragment_name = value["fragment"].GetString();
47      fragment_name = value["fragment"].GetString();
4848   }
4949   else if (value.HasMember("pixel"))
5050   {
51       fragment_name = value["pixel"].GetString();
51      fragment_name = value["pixel"].GetString();
5252   }
5353   bgfx::ShaderHandle fragment_shader = shaders.shader(fragment_name);
5454
55    return new bgfx_effect(blend | depth | cull | write, vertex_shader, fragment_shader, uniforms);
55   return new bgfx_effect(blend | depth | cull | write, vertex_shader, fragment_shader, uniforms);
5656}
5757
5858void effect_reader::validate_parameters(const Value& value)
5959{
60    assert(value.HasMember("blend"));
61    assert(value.HasMember("depth"));
62    assert(value.HasMember("cull"));
63    assert(value.HasMember("write"));
64    assert(value.HasMember("vertex"));
65    assert(value["vertex"].IsString());
66    assert(value.HasMember("fragment") || value.HasMember("pixel"));
67    if (value.HasMember("fragment"))
68    {
69       assert(value["fragment"].IsString());
60   assert(value.HasMember("blend"));
61   assert(value.HasMember("depth"));
62   assert(value.HasMember("cull"));
63   assert(value.HasMember("write"));
64   assert(value.HasMember("vertex"));
65   assert(value["vertex"].IsString());
66   assert(value.HasMember("fragment") || value.HasMember("pixel"));
67   if (value.HasMember("fragment"))
68   {
69      assert(value["fragment"].IsString());
7070   }
71    if (value.HasMember("pixel"))
72    {
73       assert(value["pixel"].IsString());
71   if (value.HasMember("pixel"))
72   {
73      assert(value["pixel"].IsString());
7474   }
75    assert(value.HasMember("uniforms"));
76    assert(value["uniforms"].IsArray());
77}
No newline at end of file
75   assert(value.HasMember("uniforms"));
76   assert(value["uniforms"].IsArray());
77}
trunk/src/osd/modules/render/bgfx/effectreader.h
r253707r253708
1919class effect_reader : public state_reader
2020{
2121public:
22    static bgfx_effect* read_from_value(shader_manager& shaders, const Value& value);
22   static bgfx_effect* read_from_value(shader_manager& shaders, const Value& value);
2323
2424private:
25    static void validate_parameters(const Value& value);
25   static void validate_parameters(const Value& value);
2626};
2727
28#endif // __DRAWBGFX_EFFECT_READER__
No newline at end of file
28#endif // __DRAWBGFX_EFFECT_READER__
trunk/src/osd/modules/render/bgfx/inputpair.cpp
r253707r253708
2323void bgfx_input_pair::bind(bgfx_effect *effect)
2424{
2525   bgfx::setTexture(m_index, effect->uniform(m_sampler)->handle(), m_texture->handle());
26}
No newline at end of file
26}
trunk/src/osd/modules/render/bgfx/inputpair.h
r253707r253708
2424class bgfx_input_pair
2525{
2626public:
27    bgfx_input_pair(int index, std::string sampler, bgfx_texture* texture);
27   bgfx_input_pair(int index, std::string sampler, bgfx_texture* texture);
2828
2929   void bind(bgfx_effect *effect);
3030
3131private:
32    int            m_index;
33    std::string    m_sampler;
34    bgfx_texture*   m_texture;
32   int             m_index;
33   std::string     m_sampler;
34   bgfx_texture*   m_texture;
3535};
3636
37#endif // __DRAWBGFX_INPUT_PAIR__
No newline at end of file
37#endif // __DRAWBGFX_INPUT_PAIR__
trunk/src/osd/modules/render/bgfx/parameter.h
r253707r253708
2727      PARAM_FRAME_MASK
2828   };
2929
30    bgfx_parameter(std::string name, parameter_type type, int period);
31    ~bgfx_parameter();
30   bgfx_parameter(std::string name, parameter_type type, int period);
31   ~bgfx_parameter();
3232
3333   void frame();
3434   bool active();
r253707r253708
4040   UINT32 m_frame;
4141};
4242
43#endif // __DRAWBGFX_PARAMETER__
No newline at end of file
43#endif // __DRAWBGFX_PARAMETER__
trunk/src/osd/modules/render/bgfx/paramreader.cpp
r253707r253708
1313#include "parameter.h"
1414
1515const parameter_reader::string_to_enum parameter_reader::TYPE_NAMES[parameter_reader::TYPE_COUNT] = {
16    { "frame_mask", uint64_t(bgfx_parameter::parameter_type::PARAM_FRAME_MASK) }
16   { "frame_mask", uint64_t(bgfx_parameter::parameter_type::PARAM_FRAME_MASK) }
1717};
1818
1919bgfx_parameter* parameter_reader::read_from_value(const Value& value)
2020{
21    validate_parameters(value);
21   validate_parameters(value);
2222
2323   std::string name = value["name"].GetString();
2424   bgfx_parameter::parameter_type type = bgfx_parameter::parameter_type(get_enum_from_value(value, "type", uint64_t(bgfx_parameter::parameter_type::PARAM_FRAME_MASK), TYPE_NAMES, TYPE_COUNT));
r253707r253708
3535   assert(value["type"].IsString());
3636   assert(value.HasMember("period"));
3737   assert(value["period"].IsDouble());
38}
No newline at end of file
38}
trunk/src/osd/modules/render/bgfx/paramreader.h
r253707r253708
1818class parameter_reader : public state_reader
1919{
2020public:
21    static bgfx_parameter* read_from_value(const Value& value);
21   static bgfx_parameter* read_from_value(const Value& value);
2222
2323private:
24    static void validate_parameters(const Value& value);
24   static void validate_parameters(const Value& value);
2525
26    static const int TYPE_COUNT = 1;
27    static const string_to_enum TYPE_NAMES[TYPE_COUNT];
26   static const int TYPE_COUNT = 1;
27   static const string_to_enum TYPE_NAMES[TYPE_COUNT];
2828};
2929
30#endif // __DRAWBGFX_PARAM_READER__
No newline at end of file
30#endif // __DRAWBGFX_PARAM_READER__
trunk/src/osd/modules/render/bgfx/shadermanager.cpp
r253707r253708
2020
2121shader_manager::~shader_manager()
2222{
23    for (std::pair<std::string, bgfx::ShaderHandle> shader : m_shaders)
24    {
25        bgfx::destroyShader(shader.second);
26    }
27    m_shaders.clear();
23   for (std::pair<std::string, bgfx::ShaderHandle> shader : m_shaders)
24   {
25      bgfx::destroyShader(shader.second);
26   }
27   m_shaders.clear();
2828}
2929
3030bgfx::ShaderHandle shader_manager::shader(std::string name)
3131{
32    std::map<std::string, bgfx::ShaderHandle>::iterator iter = m_shaders.find(name);
33    if (iter != m_shaders.end())
34    {
35        return iter->second;
36    }
32   std::map<std::string, bgfx::ShaderHandle>::iterator iter = m_shaders.find(name);
33   if (iter != m_shaders.end())
34   {
35      return iter->second;
36   }
3737
38    return load_shader(name);
38   return load_shader(name);
3939}
4040
4141bgfx::ShaderHandle shader_manager::load_shader(std::string name) {
r253707r253708
6565
6666   bgfx::ShaderHandle handle = bgfx::createShader(load_mem(shader_path + name + ".bin"));
6767
68    m_shaders[name] = handle;
68   m_shaders[name] = handle;
6969
70    return handle;
70   return handle;
7171}
7272
7373const bgfx::Memory* shader_manager::load_mem(std::string name) {
trunk/src/osd/modules/render/bgfx/shadermanager.h
r253707r253708
2121
2222class shader_manager {
2323public:
24    shader_manager() {}
25    ~shader_manager();
24   shader_manager() {}
25   ~shader_manager();
2626
27    // Getters
28    bgfx::ShaderHandle shader(std::string name);
27   // Getters
28   bgfx::ShaderHandle shader(std::string name);
2929
3030private:
31    bgfx::ShaderHandle load_shader(std::string name);
32    static const bgfx::Memory* load_mem(std::string name);
31   bgfx::ShaderHandle load_shader(std::string name);
32   static const bgfx::Memory* load_mem(std::string name);
3333
34    std::map<std::string, bgfx::ShaderHandle> m_shaders;
34   std::map<std::string, bgfx::ShaderHandle> m_shaders;
3535};
3636
37#endif // __DRAWBGFX_SHADER_MANAGER__
No newline at end of file
37#endif // __DRAWBGFX_SHADER_MANAGER__
trunk/src/osd/modules/render/bgfx/slider.h
r253707r253708
3131      SLIDER_VEC2
3232   };
3333
34    bgfx_slider(slider_type type, std::string name, std::string description, void *defaults, void *min, void *max);
35    ~bgfx_slider();
34   bgfx_slider(slider_type type, std::string name, std::string description, void *defaults, void *min, void *max);
35   ~bgfx_slider();
3636
3737   static size_t size(slider_type type);
3838   static size_t storage_size(slider_type type);
r253707r253708
4141   slider_type m_type;
4242   std::string m_name;
4343   std::string m_description;
44   char*   m_data;
45   char*   m_min;
46   char*   m_max;
44   char*   m_data;
45   char*   m_min;
46   char*   m_max;
4747};
4848
49#endif // __DRAWBGFX_SLIDER__
No newline at end of file
49#endif // __DRAWBGFX_SLIDER__
trunk/src/osd/modules/render/bgfx/sliderreader.cpp
r253707r253708
1313#include "slider.h"
1414
1515const slider_reader::string_to_enum slider_reader::TYPE_NAMES[slider_reader::TYPE_COUNT] = {
16    { "bool",   uint64_t(bgfx_slider::slider_type::SLIDER_BOOL) },
17    { "float",  uint64_t(bgfx_slider::slider_type::SLIDER_FLOAT) },
18    { "int",    uint64_t(bgfx_slider::slider_type::SLIDER_INT) },
19    { "color",  uint64_t(bgfx_slider::slider_type::SLIDER_COLOR) },
20    { "vec2",   uint64_t(bgfx_slider::slider_type::SLIDER_VEC2) }
16   { "bool",   uint64_t(bgfx_slider::slider_type::SLIDER_BOOL) },
17   { "float",  uint64_t(bgfx_slider::slider_type::SLIDER_FLOAT) },
18   { "int",    uint64_t(bgfx_slider::slider_type::SLIDER_INT) },
19   { "color",  uint64_t(bgfx_slider::slider_type::SLIDER_COLOR) },
20   { "vec2",   uint64_t(bgfx_slider::slider_type::SLIDER_VEC2) }
2121};
2222
2323bgfx_slider* slider_reader::read_from_value(const Value& value)
2424{
25    validate_parameters(value);
25   validate_parameters(value);
2626
2727   bgfx_slider::slider_type type = bgfx_slider::slider_type(get_enum_from_value(value, "type", uint64_t(bgfx_slider::slider_type::SLIDER_FLOAT), TYPE_NAMES, TYPE_COUNT));
2828   std::string name = value["name"].GetString();
r253707r253708
7171   assert(value.HasMember("text"));
7272   assert(value["text"].IsString());
7373   assert(value.HasMember("default"));
74}
No newline at end of file
74}
trunk/src/osd/modules/render/bgfx/sliderreader.h
r253707r253708
1818class slider_reader : public state_reader
1919{
2020public:
21    static bgfx_slider* read_from_value(const Value& value);
21   static bgfx_slider* read_from_value(const Value& value);
2222
2323private:
2424   static void get_values(const Value& value, std::string name, float* values);
25    static void validate_parameters(const Value& value);
25   static void validate_parameters(const Value& value);
2626
27    static const int TYPE_COUNT = 5;
28    static const string_to_enum TYPE_NAMES[TYPE_COUNT];
27   static const int TYPE_COUNT = 5;
28   static const string_to_enum TYPE_NAMES[TYPE_COUNT];
2929};
3030
31#endif // __DRAWBGFX_SLIDER_READER__
No newline at end of file
31#endif // __DRAWBGFX_SLIDER_READER__
trunk/src/osd/modules/render/bgfx/statereader.cpp
r253707r253708
22
33uint64_t state_reader::get_enum_from_value(const Value& value, std::string name, const uint64_t default_value, const string_to_enum* enums, const int count)
44{
5    if (value.HasMember(name.c_str()))
6    {
7        assert(value[name.c_str()].IsString());
8        return get_param_from_string(value[name.c_str()].GetString(), enums, count);
9    }
10    else
11    {
12        return default_value;
13    }
5   if (value.HasMember(name.c_str()))
6   {
7      assert(value[name.c_str()].IsString());
8      return get_param_from_string(value[name.c_str()].GetString(), enums, count);
9   }
10   else
11   {
12      return default_value;
13   }
1414}
1515
1616uint64_t state_reader::get_param_from_string(std::string value, const string_to_enum* enums, const int count)
1717{
18    for (int i = 0; i < count; i++)
19    {
20        if (value == enums[i].m_string)
21        {
22            return enums[i].m_enum;
23        }
24    }
25    assert(false);
26    return 0;
18   for (int i = 0; i < count; i++)
19   {
20      if (value == enums[i].m_string)
21      {
22         return enums[i].m_enum;
23      }
24   }
25   assert(false);
26   return 0;
2727}
2828
2929void state_reader::validate_array_parameter(const Value& value, std::string typeName, std::string paramName, const int count)
3030{
31    const char* name = paramName.c_str();
32    if (value.HasMember(name))
33    {
34        assert(value[name].IsArray());
35        assert(value[name].Size() == count);
36    }
31   const char* name = paramName.c_str();
32   if (value.HasMember(name))
33   {
34      assert(value[name].IsArray());
35      assert(value[name].Size() == count);
36   }
3737}
3838
3939void state_reader::validate_double_parameter(const Value& value, std::string typeName, std::string name)
4040{
41    if (value.HasMember(name.c_str()))
42    {
43        assert(value[name.c_str()].IsDouble());
44    }
41   if (value.HasMember(name.c_str()))
42   {
43      assert(value[name.c_str()].IsDouble());
44   }
4545}
4646
4747void state_reader::validate_string_parameter(const Value& value, std::string typeName, std::string name)
4848{
49    if (value.HasMember(name.c_str()))
50    {
51        assert(value[name.c_str()].IsString());
52    }
49   if (value.HasMember(name.c_str()))
50   {
51      assert(value[name.c_str()].IsString());
52   }
5353}
5454
5555void state_reader::validate_boolean_parameter(const Value& value, std::string typeName, std::string name)
5656{
57    if (value.HasMember(name.c_str()))
58    {
59        assert(value[name.c_str()].IsBool());
60    }
57   if (value.HasMember(name.c_str()))
58   {
59      assert(value[name.c_str()].IsBool());
60   }
6161}
6262
6363bool state_reader::get_bool(const Value& value, const std::string name, const bool default_value)
6464{
65    if (value.HasMember(name.c_str()))
66    {
67        return value[name.c_str()].GetBool();
68    }
69    return default_value;
65   if (value.HasMember(name.c_str()))
66   {
67      return value[name.c_str()].GetBool();
68   }
69   return default_value;
7070}
7171
7272void state_reader::get_float(const Value& value, const std::string name, float* out, float* default_value, int count)
7373{
74    if (value.HasMember(name.c_str()))
75    {
74   if (value.HasMember(name.c_str()))
75   {
7676      if (count == 1)
7777      {
7878         *out = (float) value[name.c_str()].GetDouble();
r253707r253708
8282      {
8383         get_vec_values(value[name.c_str()], out, count);
8484      }
85    }
86    for (int def = 0; def < count; def++)
87    {
85   }
86   for (int def = 0; def < count; def++)
87   {
8888      out[def] = default_value[def];
8989   }
9090}
9191
9292void state_reader::get_vec_values(const Value& value_array, float* data, const unsigned int count)
9393{
94    for (unsigned int i = 0; i < count && i < value_array.Size(); i++)
95    {
96        data[i] = (float) value_array[i].GetDouble();
97    }
94   for (unsigned int i = 0; i < count && i < value_array.Size(); i++)
95   {
96      data[i] = (float) value_array[i].GetDouble();
97   }
9898}
9999
100100std::string state_reader::get_string(const Value& value, const std::string name, const std::string default_value)
101101{
102    if (value.HasMember(name.c_str()))
103    {
104        return std::string(value[name.c_str()].GetString());
105    }
106    return default_value;
102   if (value.HasMember(name.c_str()))
103   {
104      return std::string(value[name.c_str()].GetString());
105   }
106   return default_value;
107107}
trunk/src/osd/modules/render/bgfx/statereader.h
r253707r253708
1313class state_reader
1414{
1515protected:
16    struct string_to_enum
17    {
18        std::string m_string;
19        const UINT64 m_enum;
20    };
16   struct string_to_enum
17   {
18      std::string m_string;
19      const UINT64 m_enum;
20   };
2121
22    static void validate_array_parameter(const Value& value, std::string type_name, std::string name, const int count);
23    static void validate_double_parameter(const Value& value, std::string type_name, std::string name);
24    static void validate_string_parameter(const Value& value, std::string type_name, std::string name);
25    static void validate_boolean_parameter(const Value& value, std::string type_name, std::string name);
22   static void validate_array_parameter(const Value& value, std::string type_name, std::string name, const int count);
23   static void validate_double_parameter(const Value& value, std::string type_name, std::string name);
24   static void validate_string_parameter(const Value& value, std::string type_name, std::string name);
25   static void validate_boolean_parameter(const Value& value, std::string type_name, std::string name);
2626
27    static bool get_bool(const Value& value, const std::string name, const bool default_value);
28    static void get_float(const Value& value, const std::string name, float* out, float* default_value, const int count = 1);
29    static std::string get_string(const Value& value, const std::string name, const std::string default_value);
27   static bool get_bool(const Value& value, const std::string name, const bool default_value);
28   static void get_float(const Value& value, const std::string name, float* out, float* default_value, const int count = 1);
29   static std::string get_string(const Value& value, const std::string name, const std::string default_value);
3030
31    static uint64_t get_enum_from_value(const Value& value, std::string name, const uint64_t default_value, const string_to_enum* enums, const int count);
32    static uint64_t get_param_from_string(std::string value, const string_to_enum* enums, const int count);
31   static uint64_t get_enum_from_value(const Value& value, std::string name, const uint64_t default_value, const string_to_enum* enums, const int count);
32   static uint64_t get_param_from_string(std::string value, const string_to_enum* enums, const int count);
3333
3434private:
35    static void get_vec_values(const Value& value_array, float* data, const unsigned int count);
35   static void get_vec_values(const Value& value_array, float* data, const unsigned int count);
3636};
3737
38#endif // __DRAWBGFX_STATE_READER__
No newline at end of file
38#endif // __DRAWBGFX_STATE_READER__
trunk/src/osd/modules/render/bgfx/target.h
r253707r253708
1616class bgfx_target : public bgfx_texture
1717{
1818public:
19    bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, bool filter = false);
20    bgfx_target(std::string name, void *handle, uint32_t width, uint32_t height);
21    virtual ~bgfx_target();
19   bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, bool filter = false);
20   bgfx_target(std::string name, void *handle, uint32_t width, uint32_t height);
21   virtual ~bgfx_target();
2222
23    // Getters
24    bgfx::FrameBufferHandle target() const { return m_target; }
23   // Getters
24   bgfx::FrameBufferHandle target() const { return m_target; }
2525
2626private:
2727   bgfx::FrameBufferHandle m_target;
2828};
2929
30#endif // __DRAWBGFX_TARGET__
No newline at end of file
30#endif // __DRAWBGFX_TARGET__
trunk/src/osd/modules/render/bgfx/targetmanager.cpp
r253707r253708
1616
1717target_manager::~target_manager()
1818{
19    for (std::pair<std::string, bgfx_target*> target : m_targets)
20    {
19   for (std::pair<std::string, bgfx_target*> target : m_targets)
20   {
2121      delete target.second;
22    }
23    m_targets.clear();
22   }
23   m_targets.clear();
2424}
2525
2626bgfx_target* target_manager::create_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, bool filter)
r253707r253708
4545
4646bgfx_target* target_manager::target(std::string name)
4747{
48    std::map<std::string, bgfx_target*>::iterator iter = m_targets.find(name);
49    if (iter != m_targets.end())
50    {
51        return iter->second;
52    }
48   std::map<std::string, bgfx_target*>::iterator iter = m_targets.find(name);
49   if (iter != m_targets.end())
50   {
51      return iter->second;
52   }
5353
54    return nullptr;
54   return nullptr;
5555}
trunk/src/osd/modules/render/bgfx/targetmanager.h
r253707r253708
2525
2626class target_manager {
2727public:
28    target_manager(texture_manager& textures) : m_textures(textures) { }
29    ~target_manager();
28   target_manager(texture_manager& textures) : m_textures(textures) { }
29   ~target_manager();
3030
3131   bgfx_target* create_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, bool filter = false);
3232   bgfx_target* create_target(std::string name, void *handle, uint32_t width, uint32_t height);
3333
34    // Getters
35    bgfx_target* target(std::string name);
34   // Getters
35   bgfx_target* target(std::string name);
3636
3737private:
38    bgfx_target* create_target(std::string name);
38   bgfx_target* create_target(std::string name);
3939
40    std::map<std::string, bgfx_target*> m_targets;
41    texture_manager& m_textures;
40   std::map<std::string, bgfx_target*> m_targets;
41   texture_manager& m_textures;
4242};
4343
44#endif // __DRAWBGFX_TARGET_MANAGER__
No newline at end of file
44#endif // __DRAWBGFX_TARGET_MANAGER__
trunk/src/osd/modules/render/bgfx/texture.h
r253707r253708
1818class bgfx_texture
1919{
2020public:
21    bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, void* data = nullptr, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP);
22    virtual ~bgfx_texture();
21   bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, void* data = nullptr, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP);
22   virtual ~bgfx_texture();
2323
24    // Getters
25    std::string name() const { return m_name; }
26    bgfx::TextureFormat::Enum format() const { return m_format; }
27    uint32_t width() const { return m_width; }
28    uint32_t height() const { return m_height; }
29    bgfx::TextureHandle handle() const { return m_handle; }
24   // Getters
25   std::string name() const { return m_name; }
26   bgfx::TextureFormat::Enum format() const { return m_format; }
27   uint32_t width() const { return m_width; }
28   uint32_t height() const { return m_height; }
29   bgfx::TextureHandle handle() const { return m_handle; }
3030
3131protected:
32    std::string             m_name;
33   bgfx::TextureFormat::Enum   m_format;
34    uint32_t               m_width;
35    uint32_t               m_height;
36    bgfx::TextureHandle         m_handle;
32   std::string                 m_name;
33   bgfx::TextureFormat::Enum   m_format;
34   uint32_t                    m_width;
35   uint32_t                    m_height;
36   bgfx::TextureHandle         m_handle;
3737};
3838
39#endif // __DRAWBGFX_TEXTURE__
No newline at end of file
39#endif // __DRAWBGFX_TEXTURE__
trunk/src/osd/modules/render/bgfx/texturemanager.cpp
r253707r253708
1616
1717texture_manager::~texture_manager()
1818{
19    for (std::pair<std::string, bgfx_texture*> texture : m_textures)
20    {
19   for (std::pair<std::string, bgfx_texture*> texture : m_textures)
20   {
2121      delete texture.second;
22    }
23    m_textures.clear();
22   }
23   m_textures.clear();
2424}
2525
2626void texture_manager::add_texture(std::string name, bgfx_texture* texture)
r253707r253708
3737
3838bgfx_texture* texture_manager::texture(std::string name)
3939{
40    std::map<std::string, bgfx_texture*>::iterator iter = m_textures.find(name);
41    if (iter != m_textures.end())
42    {
43        return iter->second;
44    }
40   std::map<std::string, bgfx_texture*>::iterator iter = m_textures.find(name);
41   if (iter != m_textures.end())
42   {
43      return iter->second;
44   }
4545
46    return nullptr;
46   return nullptr;
4747}
trunk/src/osd/modules/render/bgfx/texturemanager.h
r253707r253708
2323
2424class texture_manager {
2525public:
26    texture_manager() { }
27    ~texture_manager();
26   texture_manager() { }
27   ~texture_manager();
2828
2929   bgfx_texture* create_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, void* data = nullptr, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP);
3030   void add_texture(std::string name, bgfx_texture* texture);
3131
32    // Getters
33    bgfx_texture* texture(std::string name);
32   // Getters
33   bgfx_texture* texture(std::string name);
3434
3535private:
36    bgfx_texture* create_texture(std::string name);
36   bgfx_texture* create_texture(std::string name);
3737
38    std::map<std::string, bgfx_texture*> m_textures;
38   std::map<std::string, bgfx_texture*> m_textures;
3939};
4040
41#endif // __DRAWBGFX_TEXTURE_MANAGER__
No newline at end of file
41#endif // __DRAWBGFX_TEXTURE_MANAGER__
trunk/src/osd/modules/render/bgfx/uniform.cpp
r253707r253708
1010#include <cstring>
1111
1212bgfx_uniform::bgfx_uniform(std::string name, bgfx::UniformType::Enum type)
13    : m_name(name)
14    , m_type(type)
13   : m_name(name)
14   , m_type(type)
1515{
16    m_handle = bgfx::createUniform(m_name.c_str(), m_type);
17    m_data_size = get_size_for_type(type);
18    if (m_data_size > 0)
19    {
20        m_data = new uint8_t[m_data_size];
21    }
16   m_handle = bgfx::createUniform(m_name.c_str(), m_type);
17   m_data_size = get_size_for_type(type);
18   if (m_data_size > 0)
19   {
20      m_data = new uint8_t[m_data_size];
21   }
2222}
2323
2424bgfx_uniform::~bgfx_uniform()
2525{
26    bgfx::destroyUniform(m_handle);
27    delete [] m_data;
26   bgfx::destroyUniform(m_handle);
27   delete [] m_data;
2828}
2929
3030void bgfx_uniform::upload()
3131{
3232   if (m_type != bgfx::UniformType::Int1) // Avoid samplers; set separately!
33       bgfx::setUniform(m_handle, m_data);
33      bgfx::setUniform(m_handle, m_data);
3434}
3535
3636bgfx_uniform* bgfx_uniform::set(float* value)
3737{
38    return set(value, get_size_for_type(bgfx::UniformType::Vec4));
38   return set(value, get_size_for_type(bgfx::UniformType::Vec4));
3939}
4040
4141bgfx_uniform* bgfx_uniform::set_int(int value)
4242{
43    return set(&value, get_size_for_type(bgfx::UniformType::Int1));
43   return set(&value, get_size_for_type(bgfx::UniformType::Int1));
4444}
4545
4646bgfx_uniform* bgfx_uniform::set_mat3(float* value)
4747{
48    return set(value, get_size_for_type(bgfx::UniformType::Mat3));
48   return set(value, get_size_for_type(bgfx::UniformType::Mat3));
4949}
5050
5151bgfx_uniform* bgfx_uniform::set_mat4(float* value)
5252{
53    return set(value, get_size_for_type(bgfx::UniformType::Mat4));
53   return set(value, get_size_for_type(bgfx::UniformType::Mat4));
5454}
5555
5656bgfx_uniform* bgfx_uniform::set(void* data, size_t size)
5757{
58    int min_size = (size < m_data_size) ? size : m_data_size;
59    memcpy(m_data, data, min_size);
60    return this;
58   int min_size = (size < m_data_size) ? size : m_data_size;
59   memcpy(m_data, data, min_size);
60   return this;
6161}
6262
6363size_t bgfx_uniform::get_size_for_type(bgfx::UniformType::Enum type)
6464{
65    switch (type)
66    {
67        case bgfx::UniformType::Vec4:
68            return sizeof(float) * 4;
65   switch (type)
66   {
67      case bgfx::UniformType::Vec4:
68         return sizeof(float) * 4;
6969
70        case bgfx::UniformType::Int1:
71            return sizeof(int);
70      case bgfx::UniformType::Int1:
71         return sizeof(int);
7272
73        case bgfx::UniformType::Mat3:
74            return sizeof(float) * 3 * 3;
73      case bgfx::UniformType::Mat3:
74         return sizeof(float) * 3 * 3;
7575
76        case bgfx::UniformType::Mat4:
77            return sizeof(float) * 4 * 4;
76      case bgfx::UniformType::Mat4:
77         return sizeof(float) * 4 * 4;
7878
79        default:
80            return 0;
81    }
82}
No newline at end of file
79      default:
80         return 0;
81   }
82}
trunk/src/osd/modules/render/bgfx/uniform.h
r253707r253708
1818class bgfx_uniform
1919{
2020public:
21    bgfx_uniform(std::string name, bgfx::UniformType::Enum type);
22    virtual ~bgfx_uniform();
21   bgfx_uniform(std::string name, bgfx::UniformType::Enum type);
22   virtual ~bgfx_uniform();
2323
24    virtual void upload();
24   virtual void upload();
2525
26    // Getters
27    std::string name() { return m_name; }
28    bgfx::UniformType::Enum type() const { return m_type; }
29    bgfx::UniformHandle handle() const { return m_handle; }
26   // Getters
27   std::string name() { return m_name; }
28   bgfx::UniformType::Enum type() const { return m_type; }
29   bgfx::UniformHandle handle() const { return m_handle; }
3030
31    // Setters
32    bgfx_uniform* set(float* value);
33    bgfx_uniform* set_int(int value);
34    bgfx_uniform* set_mat3(float* value);
35    bgfx_uniform* set_mat4(float* value);
36    bgfx_uniform* set(void* data, size_t size);
31   // Setters
32   bgfx_uniform* set(float* value);
33   bgfx_uniform* set_int(int value);
34   bgfx_uniform* set_mat3(float* value);
35   bgfx_uniform* set_mat4(float* value);
36   bgfx_uniform* set(void* data, size_t size);
3737
38    static size_t get_size_for_type(bgfx::UniformType::Enum type);
38   static size_t get_size_for_type(bgfx::UniformType::Enum type);
3939
4040protected:
41    bgfx::UniformHandle      m_handle;
42    std::string              m_name;
43    bgfx::UniformType::Enum m_type;
44    uint8_t*                m_data;
45    size_t               m_data_size;
41   bgfx::UniformHandle     m_handle;
42   std::string             m_name;
43   bgfx::UniformType::Enum m_type;
44   uint8_t*                m_data;
45   size_t                  m_data_size;
4646};
4747
48#endif // __DRAWBGFX_UNIFORM__
No newline at end of file
48#endif // __DRAWBGFX_UNIFORM__
trunk/src/osd/modules/render/bgfx/uniformreader.cpp
r253707r253708
1010#include "uniform.h"
1111
1212const uniform_reader::string_to_enum uniform_reader::TYPE_NAMES[uniform_reader::TYPE_COUNT] = {
13    { "int",    bgfx::UniformType::Int1 },
14    { "vec4",   bgfx::UniformType::Vec4 },
15    { "mat3",   bgfx::UniformType::Mat3 },
16    { "mat4",   bgfx::UniformType::Mat4 },
17    { "camera", bgfx::UniformType::Mat4 }
13   { "int",    bgfx::UniformType::Int1 },
14   { "vec4",   bgfx::UniformType::Vec4 },
15   { "mat3",   bgfx::UniformType::Mat3 },
16   { "mat4",   bgfx::UniformType::Mat4 },
17   { "camera", bgfx::UniformType::Mat4 }
1818};
1919
2020bgfx_uniform* uniform_reader::read_from_value(const Value& value)
2121{
22    assert(value.HasMember("name"));
23    assert(value["name"].IsString());
24    const char* name = value["name"].GetString();
22   assert(value.HasMember("name"));
23   assert(value["name"].IsString());
24   const char* name = value["name"].GetString();
2525
26    assert(value.HasMember("type"));
27    bgfx::UniformType::Enum type = bgfx::UniformType::Enum(get_enum_from_value(value, "type", bgfx::UniformType::Vec4, TYPE_NAMES, TYPE_COUNT));
28    const size_t type_size = bgfx_uniform::get_size_for_type(type);
26   assert(value.HasMember("type"));
27   bgfx::UniformType::Enum type = bgfx::UniformType::Enum(get_enum_from_value(value, "type", bgfx::UniformType::Vec4, TYPE_NAMES, TYPE_COUNT));
28   const size_t type_size = bgfx_uniform::get_size_for_type(type);
2929
30    assert(value.HasMember("values"));
31    assert(value["values"].IsArray());
32    const Value& value_array = value["values"];
33    const size_t array_size = value_array.Size() * sizeof(float);
30   assert(value.HasMember("values"));
31   assert(value["values"].IsArray());
32   const Value& value_array = value["values"];
33   const size_t array_size = value_array.Size() * sizeof(float);
3434
35    const size_t alloc_size = (type_size > array_size) ? type_size : array_size;
36    float* data = reinterpret_cast<float*>(new char[alloc_size]);
35   const size_t alloc_size = (type_size > array_size) ? type_size : array_size;
36   float* data = reinterpret_cast<float*>(new char[alloc_size]);
3737
38    unsigned int index = 0;
39    for (; index < type_size / 4 && index < value_array.Size(); index++)
40    {
41        data[index] = (float)value_array[index].GetDouble();
42    }
38   unsigned int index = 0;
39   for (; index < type_size / 4 && index < value_array.Size(); index++)
40   {
41      data[index] = (float)value_array[index].GetDouble();
42   }
4343
44    for (; index < type_size / 4; index++) {
45        data[index] = 0.0f;
46    }
44   for (; index < type_size / 4; index++) {
45      data[index] = 0.0f;
46   }
4747
48    bgfx_uniform* uniform = new bgfx_uniform(name, type);
49    uniform->set((void*)data, type_size);
50    delete [] data;
48   bgfx_uniform* uniform = new bgfx_uniform(name, type);
49   uniform->set((void*)data, type_size);
50   delete [] data;
5151
52    return uniform;
52   return uniform;
5353}
trunk/src/osd/modules/render/bgfx/uniformreader.h
r253707r253708
1919
2020enum uniform_type
2121{
22    TYPE_INT1 = bgfx::UniformType::Int1,
23    TYPE_VEC4 = bgfx::UniformType::Vec4,
24    TYPE_MAT3 = bgfx::UniformType::Mat3,
25    TYPE_MAT4 = bgfx::UniformType::Mat4,
26    TYPE_CAMERA,    // Alias for the current ortho camera, used to auto-bind on material load
22   TYPE_INT1 = bgfx::UniformType::Int1,
23   TYPE_VEC4 = bgfx::UniformType::Vec4,
24   TYPE_MAT3 = bgfx::UniformType::Mat3,
25   TYPE_MAT4 = bgfx::UniformType::Mat4,
26   TYPE_CAMERA,    // Alias for the current ortho camera, used to auto-bind on material load
2727
28    TYPE_COUNT = 5
28   TYPE_COUNT = 5
2929};
3030
3131class uniform_reader : public state_reader
3232{
3333public:
34    static bgfx_uniform* read_from_value(const Value& value);
34   static bgfx_uniform* read_from_value(const Value& value);
3535
3636private:
37    static const int TYPE_COUNT = uniform_type::TYPE_COUNT;
38    static const string_to_enum TYPE_NAMES[TYPE_COUNT];
37   static const int TYPE_COUNT = uniform_type::TYPE_COUNT;
38   static const string_to_enum TYPE_NAMES[TYPE_COUNT];
3939};
4040
41#endif // __DRAWBGFX_UNIFORM_READER__
No newline at end of file
41#endif // __DRAWBGFX_UNIFORM_READER__
trunk/src/osd/modules/render/bgfx/writereader.cpp
r253707r253708
33#include "writereader.h"
44
55const write_reader::string_to_enum write_reader::RGB_NAMES[write_reader::RGB_COUNT] = {
6    { "true",   BGFX_STATE_RGB_WRITE },
7    { "false",  0 },
8    { "1",        BGFX_STATE_RGB_WRITE },
9    { "0",       0 }
6   { "true",   BGFX_STATE_RGB_WRITE },
7   { "false",  0 },
8   { "1",      BGFX_STATE_RGB_WRITE },
9   { "0",      0 }
1010};
1111
1212const write_reader::string_to_enum write_reader::ALPHA_NAMES[write_reader::ALPHA_COUNT] = {
13    { "true",   BGFX_STATE_ALPHA_WRITE },
14    { "false",  0 },
15    { "1",      BGFX_STATE_ALPHA_WRITE },
16    { "0",       0 }
13   { "true",   BGFX_STATE_ALPHA_WRITE },
14   { "false",  0 },
15   { "1",      BGFX_STATE_ALPHA_WRITE },
16   { "0",      0 }
1717};
1818
1919uint64_t write_reader::read_from_value(const Value& value)
2020{
21    uint64_t rgb = get_enum_from_value(value, "rgb", 0, RGB_NAMES, RGB_COUNT);
22    uint64_t alpha = get_enum_from_value(value, "alpha", 0, ALPHA_NAMES, ALPHA_COUNT);
23    return rgb | alpha;
21   uint64_t rgb = get_enum_from_value(value, "rgb", 0, RGB_NAMES, RGB_COUNT);
22   uint64_t alpha = get_enum_from_value(value, "alpha", 0, ALPHA_NAMES, ALPHA_COUNT);
23   return rgb | alpha;
2424}
trunk/src/osd/modules/render/bgfx/writereader.h
r253707r253708
77
88class write_reader : public state_reader {
99public:
10    static uint64_t read_from_value(const Value& value);
10   static uint64_t read_from_value(const Value& value);
1111
1212private:
13    static const int RGB_COUNT = 4;
14    static const int ALPHA_COUNT = 4;
15    static const string_to_enum RGB_NAMES[RGB_COUNT];
16    static const string_to_enum ALPHA_NAMES[ALPHA_COUNT];
13   static const int RGB_COUNT = 4;
14   static const int ALPHA_COUNT = 4;
15   static const string_to_enum RGB_NAMES[RGB_COUNT];
16   static const string_to_enum ALPHA_NAMES[ALPHA_COUNT];
1717};
1818
19#endif // __DRAWBGFX_WRITE_READER__
No newline at end of file
19#endif // __DRAWBGFX_WRITE_READER__
trunk/src/osd/modules/render/binpacker.cpp
r253707r253708
1111
1212bool rectangle_packer::pack(const std::vector<packable_rectangle>& rects, std::vector<std::vector<packed_rectangle>>& packs,  int pack_size)
1313{
14    clear();
14   clear();
1515
16    m_pack_size = pack_size;
16   m_pack_size = pack_size;
1717
18    // Add rects to member array, and check to make sure none is too big
19    for (size_t rect = 0; rect < rects.size(); rect++)
20    {
21        m_rects.push_back(rectangle(0, 0, rects[rect].width(), rects[rect].height(), rects[rect].hash(), rects[rect].format(), rects[rect].rowpixels(), rects[rect].palette(), rects[rect].base()));
22    }
18   // Add rects to member array, and check to make sure none is too big
19   for (size_t rect = 0; rect < rects.size(); rect++)
20   {
21      m_rects.push_back(rectangle(0, 0, rects[rect].width(), rects[rect].height(), rects[rect].hash(), rects[rect].format(), rects[rect].rowpixels(), rects[rect].palette(), rects[rect].base()));
22   }
2323
24    // Sort from greatest to least area
25    std::sort(m_rects.rbegin(), m_rects.rend());
24   // Sort from greatest to least area
25   std::sort(m_rects.rbegin(), m_rects.rend());
2626
27    // Pack
28    while (m_num_packed < (int)m_rects.size())
29    {
30        int i = m_packs.size();
31        m_packs.push_back(rectangle(m_pack_size));
32        m_roots.push_back(i);
33        if (!fill(i))
34        {
27   // Pack
28   while (m_num_packed < (int)m_rects.size())
29   {
30      int i = m_packs.size();
31      m_packs.push_back(rectangle(m_pack_size));
32      m_roots.push_back(i);
33      if (!fill(i))
34      {
3535         return false;
3636      }
37    }
37   }
3838
39    // Write out
40    packs.resize(m_roots.size());
41    for (size_t i = 0; i < m_roots.size(); ++i)
42    {
43        packs[i].clear();
44        add_pack_to_array(m_roots[i], packs[i]);
45    }
39   // Write out
40   packs.resize(m_roots.size());
41   for (size_t i = 0; i < m_roots.size(); ++i)
42   {
43      packs[i].clear();
44      add_pack_to_array(m_roots[i], packs[i]);
45   }
4646
47    return true;
47   return true;
4848}
4949
5050void rectangle_packer::clear()
5151{
52    m_pack_size = 0;
53    m_num_packed = 0;
54    m_rects.clear();
55    m_packs.clear();
56    m_roots.clear();
52   m_pack_size = 0;
53   m_num_packed = 0;
54   m_rects.clear();
55   m_packs.clear();
56   m_roots.clear();
5757}
5858
5959bool rectangle_packer::fill(int pack)
6060{
61    // For each rect
62    for (size_t rect = 0; rect < m_rects.size(); ++rect)
63    {
64        // If it's not already packed
65        if (!m_rects[rect].packed)
66        {
67            // If it fits in the current working area
68            if (fits(m_rects[rect], m_packs[pack]))
69            {
70                // Store in lower-left of working area, split, and recurse
71                m_num_packed++;
72                split(pack, rect);
73                fill(m_packs[pack].children[0]);
74                fill(m_packs[pack].children[1]);
75                return true;
76            }
77        }
78    }
79    return false;
61   // For each rect
62   for (size_t rect = 0; rect < m_rects.size(); ++rect)
63   {
64      // If it's not already packed
65      if (!m_rects[rect].packed)
66      {
67         // If it fits in the current working area
68         if (fits(m_rects[rect], m_packs[pack]))
69         {
70            // Store in lower-left of working area, split, and recurse
71            m_num_packed++;
72            split(pack, rect);
73            fill(m_packs[pack].children[0]);
74            fill(m_packs[pack].children[1]);
75            return true;
76         }
77      }
78   }
79   return false;
8080}
8181
8282void rectangle_packer::split(int pack, int rect)
8383{
84    // Split the working area either horizontally or vertically with respect
85    // to the rect we're storing, such that we get the largest possible child
86    // area.
84   // Split the working area either horizontally or vertically with respect
85   // to the rect we're storing, such that we get the largest possible child
86   // area.
8787
88    rectangle left = m_packs[pack];
89    rectangle right = m_packs[pack];
90    rectangle bottom = m_packs[pack];
91    rectangle top = m_packs[pack];
88   rectangle left = m_packs[pack];
89   rectangle right = m_packs[pack];
90   rectangle bottom = m_packs[pack];
91   rectangle top = m_packs[pack];
9292
93    left.y += m_rects[rect].h;
94    left.w = m_rects[rect].w;
95    left.h -= m_rects[rect].h;
93   left.y += m_rects[rect].h;
94   left.w = m_rects[rect].w;
95   left.h -= m_rects[rect].h;
9696
97    right.x += m_rects[rect].w;
98    right.w -= m_rects[rect].w;
97   right.x += m_rects[rect].w;
98   right.w -= m_rects[rect].w;
9999
100    bottom.x += m_rects[rect].w;
101    bottom.h = m_rects[rect].h;
102    bottom.w -= m_rects[rect].w;
100   bottom.x += m_rects[rect].w;
101   bottom.h = m_rects[rect].h;
102   bottom.w -= m_rects[rect].w;
103103
104    top.y += m_rects[rect].h;
105    top.h -= m_rects[rect].h;
104   top.y += m_rects[rect].h;
105   top.h -= m_rects[rect].h;
106106
107    int max_lr_area = left.get_area();
108    if (right.get_area() > max_lr_area)
109    {
110        max_lr_area = right.get_area();
111    }
107   int max_lr_area = left.get_area();
108   if (right.get_area() > max_lr_area)
109   {
110      max_lr_area = right.get_area();
111   }
112112
113    int max_bt_area = bottom.get_area();
114    if (top.get_area() > max_bt_area)
115    {
116        max_bt_area = top.get_area();
117    }
113   int max_bt_area = bottom.get_area();
114   if (top.get_area() > max_bt_area)
115   {
116      max_bt_area = top.get_area();
117   }
118118
119    if (max_lr_area > max_bt_area)
120    {
121        if (left.get_area() > right.get_area())
122        {
123            m_packs.push_back(left);
124            m_packs.push_back(right);
125        }
126        else
127        {
128            m_packs.push_back(right);
129            m_packs.push_back(left);
130        }
131    }
132    else
133    {
134        if (bottom.get_area() > top.get_area())
135        {
136            m_packs.push_back(bottom);
137            m_packs.push_back(top);
138        }
139        else
140        {
141            m_packs.push_back(top);
142            m_packs.push_back(bottom);
143        }
144    }
119   if (max_lr_area > max_bt_area)
120   {
121      if (left.get_area() > right.get_area())
122      {
123         m_packs.push_back(left);
124         m_packs.push_back(right);
125      }
126      else
127      {
128         m_packs.push_back(right);
129         m_packs.push_back(left);
130      }
131   }
132   else
133   {
134      if (bottom.get_area() > top.get_area())
135      {
136         m_packs.push_back(bottom);
137         m_packs.push_back(top);
138      }
139      else
140      {
141         m_packs.push_back(top);
142         m_packs.push_back(bottom);
143      }
144   }
145145
146    // This pack area now represents the rect we've just stored, so save the
147    // relevant info to it, and assign children.
148    m_packs[pack].w = m_rects[rect].w;
149    m_packs[pack].h = m_rects[rect].h;
150    m_packs[pack].hash = m_rects[rect].hash;
151    m_packs[pack].format = m_rects[rect].format;
152    m_packs[pack].rowpixels = m_rects[rect].rowpixels;
153    m_packs[pack].palette = m_rects[rect].palette;
154    m_packs[pack].base = m_rects[rect].base;
155    m_packs[pack].children[0] = m_packs.size() - 2;
156    m_packs[pack].children[1] = m_packs.size() - 1;
146   // This pack area now represents the rect we've just stored, so save the
147   // relevant info to it, and assign children.
148   m_packs[pack].w = m_rects[rect].w;
149   m_packs[pack].h = m_rects[rect].h;
150   m_packs[pack].hash = m_rects[rect].hash;
151   m_packs[pack].format = m_rects[rect].format;
152   m_packs[pack].rowpixels = m_rects[rect].rowpixels;
153   m_packs[pack].palette = m_rects[rect].palette;
154   m_packs[pack].base = m_rects[rect].base;
155   m_packs[pack].children[0] = m_packs.size() - 2;
156   m_packs[pack].children[1] = m_packs.size() - 1;
157157
158    // Done with the rect
159    m_rects[rect].packed = true;
158   // Done with the rect
159   m_rects[rect].packed = true;
160160
161161}
162162
163163bool rectangle_packer::fits(rectangle& rect1, const rectangle& rect2)
164164{
165    // Check to see if rect1 fits in rect2
165   // Check to see if rect1 fits in rect2
166166
167    if (rect1.w <= rect2.w && rect1.h <= rect2.h)
168    {
169        return true;
170    }
171    else
172    {
173        return false;
174    }
167   if (rect1.w <= rect2.w && rect1.h <= rect2.h)
168   {
169      return true;
170   }
171   else
172   {
173      return false;
174   }
175175}
176176
177177void rectangle_packer::add_pack_to_array(int pack, std::vector<packed_rectangle>& array) const
178178{
179    if (m_packs[pack].hash != 0)
180    {
179   if (m_packs[pack].hash != 0)
180   {
181181      array.push_back(packed_rectangle(m_packs[pack].hash, m_packs[pack].format,
182182         m_packs[pack].w, m_packs[pack].h, m_packs[pack].x, m_packs[pack].y,
183183         m_packs[pack].rowpixels, m_packs[pack].palette, m_packs[pack].base));
184184
185        if (m_packs[pack].children[0] != -1)
186        {
187            add_pack_to_array(m_packs[pack].children[0], array);
188        }
185      if (m_packs[pack].children[0] != -1)
186      {
187         add_pack_to_array(m_packs[pack].children[0], array);
188      }
189189
190        if (m_packs[pack].children[1] != -1)
191        {
192            add_pack_to_array(m_packs[pack].children[1], array);
193        }
194    }
190      if (m_packs[pack].children[1] != -1)
191      {
192         add_pack_to_array(m_packs[pack].children[1], array);
193      }
194   }
195195}
trunk/src/osd/modules/render/binpacker.h
r253707r253708
1010class rectangle_packer
1111{
1212public:
13    // The input and output are in terms of vectors of ints to avoid
14    // dependencies (although I suppose a public member struct could have been
15    // used). The parameters are:
13   // The input and output are in terms of vectors of ints to avoid
14   // dependencies (although I suppose a public member struct could have been
15   // used). The parameters are:
1616
17    // packs : After packing, the outer array contains the packs (therefore
18    // the number of packs is packs.size()). Each inner array contains a
19    // sequence of sets of 3 ints. Each set represents a rectangle in the
20    // pack. The elements in the set are 1) the rect ID, 2) the x position
21    // of the rect with respect to the pack, and 3) the y position of the rect
22    // with respect to the pack. The widths and heights of the rects are not
23    // included, as it's assumed they are stored on the caller's side (they
24    // were after all the input to the function).
17   // packs : After packing, the outer array contains the packs (therefore
18   // the number of packs is packs.size()). Each inner array contains a
19   // sequence of sets of 3 ints. Each set represents a rectangle in the
20   // pack. The elements in the set are 1) the rect ID, 2) the x position
21   // of the rect with respect to the pack, and 3) the y position of the rect
22   // with respect to the pack. The widths and heights of the rects are not
23   // included, as it's assumed they are stored on the caller's side (they
24   // were after all the input to the function).
2525
2626   class packable_rectangle
2727   {
r253707r253708
107107      void* m_base;
108108   };
109109
110    bool pack(const std::vector<packable_rectangle>& rects, std::vector<std::vector<packed_rectangle>>& packs, int pack_size);
110   bool pack(const std::vector<packable_rectangle>& rects, std::vector<std::vector<packed_rectangle>>& packs, int pack_size);
111111
112112private:
113    struct rectangle
114    {
115        rectangle(int size)
116            : x(0)
117            , y(0)
118            , w(size)
119            , h(size)
120            , hash(-1)
121            , format(0)
113   struct rectangle
114   {
115      rectangle(int size)
116         : x(0)
117         , y(0)
118         , w(size)
119         , h(size)
120         , hash(-1)
121         , format(0)
122122         , rowpixels(0)
123123         , palette(nullptr)
124124         , base(nullptr)
125            , packed(false)
126        {
127            children[0] = -1;
128            children[1] = -1;
129        }
125         , packed(false)
126      {
127         children[0] = -1;
128         children[1] = -1;
129      }
130130
131        rectangle(int x, int y, int w, int h, int hash, UINT32 format, int rowpixels, const rgb_t *palette, void *base)
132            : x(x)
133            , y(y)
134            , w(w)
135            , h(h)
136            , hash(hash)
137            , format(format)
131      rectangle(int x, int y, int w, int h, int hash, UINT32 format, int rowpixels, const rgb_t *palette, void *base)
132         : x(x)
133         , y(y)
134         , w(w)
135         , h(h)
136         , hash(hash)
137         , format(format)
138138         , rowpixels(rowpixels)
139139         , palette(palette)
140140         , base(base)
141            , packed(false)
142        {
143            children[0] = -1;
144            children[1] = -1;
145        }
141         , packed(false)
142      {
143         children[0] = -1;
144         children[1] = -1;
145      }
146146
147        int get_area() const
148        {
149            return w * h;
150        }
147      int get_area() const
148      {
149         return w * h;
150      }
151151
152        bool operator<(const rectangle& rect) const
153        {
154            return get_area() < rect.get_area();
155        }
152      bool operator<(const rectangle& rect) const
153      {
154         return get_area() < rect.get_area();
155      }
156156
157        int           x;
158        int           y;
159        int           w;
160        int           h;
161        int           hash;
162        UINT32         format;
163        int           rowpixels;
164        const rgb_t*   palette;
165        void*         base;
166        int           children[2];
167        bool          packed;
168    };
157      int             x;
158      int             y;
159      int             w;
160      int             h;
161      int             hash;
162      UINT32          format;
163      int             rowpixels;
164      const rgb_t*    palette;
165      void*           base;
166      int             children[2];
167      bool            packed;
168   };
169169
170    void clear();
171    bool fill(int pack);
172    void split(int pack, int rect);
173    bool fits(rectangle& rect1, const rectangle& rect2);
174    void add_pack_to_array(int pack, std::vector<packed_rectangle>& array) const;
170   void clear();
171   bool fill(int pack);
172   void split(int pack, int rect);
173   bool fits(rectangle& rect1, const rectangle& rect2);
174   void add_pack_to_array(int pack, std::vector<packed_rectangle>& array) const;
175175
176    int                     m_pack_size;
177    int                     m_num_packed;
178    std::vector<rectangle>   m_rects;
179    std::vector<rectangle>    m_packs;
180    std::vector<int>        m_roots;
176   int                     m_pack_size;
177   int                     m_num_packed;
178   std::vector<rectangle>  m_rects;
179   std::vector<rectangle>  m_packs;
180   std::vector<int>        m_roots;
181181};
182182
183#endif // __RECTPACKER_H__
No newline at end of file
183#endif // __RECTPACKER_H__
trunk/src/osd/modules/render/d3d/d3dcomm.h
r253707r253708
223223{
224224   float       x, y, z;                    // X,Y,Z coordinates
225225   float       rhw;                        // RHW when no HLSL, padding when HLSL
226   D3DCOLOR   color;                      // diffuse color
226   D3DCOLOR    color;                      // diffuse color
227227   float       u0, v0;                     // texture stage 0 coordinates
228228   float       u1, v1;                     // additional info for vector data
229229};
trunk/src/osd/modules/render/d3d/d3dhlsl.h
r253707r253708
334334      int                 step;
335335      int                 screen_type;
336336      INT32(*adjustor)(running_machine &, void *, std::string *, INT32);
337      int               id;
337      int                 id;
338338   };
339339
340340private:
r253707r253708
371371   d3d_base *              d3dintf;                    // D3D interface
372372
373373   running_machine *       machine;
374   renderer_d3d9 *          d3d;                        // D3D renderer
374   renderer_d3d9 *         d3d;                        // D3D renderer
375375
376376   bool                    master_enable;              // overall enable flag
377377   bool                    vector_enable;              // vector post-processing enable flag
trunk/src/osd/modules/render/d3dtarget.h
r253707r253708
1111#ifndef __D3DTARGET__
1212#define __D3DTARGET__
1313
14#endif // __D3DTARGET__
No newline at end of file
14#endif // __D3DTARGET__
trunk/src/osd/modules/render/draw13.h
r253707r253708
4141
4242   void compute(const render_primitive &prim, const int prescale);
4343
44   INT32   dudx, dvdx, dudy, dvdy;
44   INT32   dudx, dvdx, dudy, dvdy;
4545   INT32   startu, startv;
4646   INT32   rotwidth, rotheight;
4747};
r253707r253708
210210   static const copy_info_t s_blit_info_default[];
211211};
212212
213#endif // __DRAW13__
No newline at end of file
213#endif // __DRAW13__
trunk/src/osd/modules/render/drawbgfx.cpp
r253707r253708
5151//  MACROS
5252//============================================================
5353
54#define GIBBERISH   (0)
54#define GIBBERISH   (0)
5555
5656//============================================================
5757//  INLINES
r253707r253708
7878      return nullptr;
7979   }
8080
81#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
81#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
8282   return (void*)wmi.info.x11.window;
83#   elif BX_PLATFORM_OSX
83#   elif BX_PLATFORM_OSX
8484   return wmi.info.cocoa.window;
85#   elif BX_PLATFORM_WINDOWS
85#   elif BX_PLATFORM_WINDOWS
8686   return wmi.info.win.window;
87#   elif BX_PLATFORM_STEAMLINK
87#   elif BX_PLATFORM_STEAMLINK
8888   return wmi.info.vivante.window;
8989#   elif BX_PLATFORM_EMSCRIPTEN
9090   return nullptr;
91#   endif // BX_PLATFORM_
91#   endif // BX_PLATFORM_
9292}
9393#endif
9494
r253707r253708
130130   m_shaders = new shader_manager();
131131   m_effects = new effect_manager(*m_shaders);
132132
133    if (window().m_index != 0)
134    {
133   if (window().m_index != 0)
134   {
135135#ifdef OSD_WINDOWS
136       m_framebuffer = m_targets->create_target("backbuffer", window().m_hwnd, m_width[window().m_index], m_height[window().m_index]);
136      m_framebuffer = m_targets->create_target("backbuffer", window().m_hwnd, m_width[window().m_index], m_height[window().m_index]);
137137#else
138       m_framebuffer = m_targets->create_target("backbuffer", sdlNativeWindowHandle(window().sdl_window()), m_width[window().m_index], m_height[window().m_index]);
138      m_framebuffer = m_targets->create_target("backbuffer", sdlNativeWindowHandle(window().sdl_window()), m_width[window().m_index], m_height[window().m_index]);
139139#endif
140       bgfx::touch(window().m_index);
141    }
140      bgfx::touch(window().m_index);
141   }
142142
143143   // Create program from shaders.
144144   m_gui_effect[0] = m_effects->effect("gui_opaque");
r253707r253708
209209   float v0 = float(rect.y()) / float(CACHE_SIZE);
210210   float u1 = u0 + float(rect.width()) / float(CACHE_SIZE);
211211   float v1 = v0 + float(rect.height()) / float(CACHE_SIZE);
212    u1 -= 0.5f / float(CACHE_SIZE);
213    v1 -= 0.5f / float(CACHE_SIZE);
214    u0 += 0.5f / float(CACHE_SIZE);
215    v0 += 0.5f / float(CACHE_SIZE);
216    UINT32 rgba = u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255);
212   u1 -= 0.5f / float(CACHE_SIZE);
213   v1 -= 0.5f / float(CACHE_SIZE);
214   u0 += 0.5f / float(CACHE_SIZE);
215   v0 += 0.5f / float(CACHE_SIZE);
216   UINT32 rgba = u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255);
217217
218218   float x[4] = { prim->bounds.x0, prim->bounds.x1, prim->bounds.x0, prim->bounds.x1 };
219219   float y[4] = { prim->bounds.y0, prim->bounds.y0, prim->bounds.y1, prim->bounds.y1 };
r253707r253708
781781      }
782782   }
783783
784    if (index != 0)
785    {
786        bgfx::setViewFrameBuffer(index, m_framebuffer->target());
787    }
788       bgfx::setViewSeq(index, true);
784   if (index != 0)
785   {
786      bgfx::setViewFrameBuffer(index, m_framebuffer->target());
787   }
788      bgfx::setViewSeq(index, true);
789789   bgfx::setViewRect(index, 0, 0, m_width[index], m_height[index]);
790790
791791   // Setup view transform.
r253707r253708
10201020         const UINT32 hash = get_texture_hash(prim);
10211021         // If this texture is packable and not currently in the atlas, prepare the texture for putting in the atlas
10221022         if ((hash != 0 && m_hash_to_entry[hash].hash() == 0 && acquired_infos[hash].hash() == 0)
1023             || (hash != 0 && m_hash_to_entry[hash].hash() != hash && acquired_infos[hash].hash() == 0))
1024         {   // Create create the texture and mark the atlas dirty
1023            || (hash != 0 && m_hash_to_entry[hash].hash() != hash && acquired_infos[hash].hash() == 0))
1024         {   // Create create the texture and mark the atlas dirty
10251025            atlas_dirty = true;
10261026
10271027            m_texinfo.push_back(rectangle_packer::packable_rectangle(hash, prim->flags & PRIMFLAG_TEXFORMAT_MASK,
r253707r253708
10961096slider_state* renderer_bgfx::get_slider_list()
10971097{
10981098   return nullptr;
1099}
No newline at end of file
1099}
trunk/src/osd/modules/render/drawd3d.h
r253707r253708
112112   bool                    is_mod2x_supported() { return (bool)m_mod2x_supported; }
113113   bool                    is_mod4x_supported() { return (bool)m_mod4x_supported; }
114114
115   D3DFORMAT            get_screen_format() { return m_screen_format; }
116   D3DFORMAT            get_pixel_format() { return m_pixformat; }
117   D3DDISPLAYMODE         get_origmode() { return m_origmode; }
115   D3DFORMAT               get_screen_format() { return m_screen_format; }
116   D3DFORMAT               get_pixel_format() { return m_pixformat; }
117   D3DDISPLAYMODE          get_origmode() { return m_origmode; }
118118
119119   UINT32                  get_last_texture_flags() { return m_last_texture_flags; }
120120
r253707r253708
134134
135135   device *                m_device;                   // pointer to the Direct3DDevice object
136136   int                     m_gamma_supported;          // is full screen gamma supported?
137   present_parameters       m_presentation;             // set of presentation parameters
138   D3DDISPLAYMODE         m_origmode;                 // original display mode for the adapter
139   D3DFORMAT            m_pixformat;                // pixel format we are using
137   present_parameters      m_presentation;             // set of presentation parameters
138   D3DDISPLAYMODE          m_origmode;                 // original display mode for the adapter
139   D3DFORMAT               m_pixformat;                // pixel format we are using
140140
141141   vertex_buffer *         m_vertexbuf;                // pointer to the vertex buffer object
142142   vertex *                m_lockedbuf;                // pointer to the locked vertex buffer
r253707r253708
145145   vertex *                m_vectorbatch;              // pointer to the vector batch buffer
146146   int                     m_batchindex;               // current index into the vector batch
147147
148   poly_info             m_poly[VERTEX_BUFFER_SIZE/3];// array to hold polygons as they are created
148   poly_info               m_poly[VERTEX_BUFFER_SIZE/3];// array to hold polygons as they are created
149149   int                     m_numpolys;                 // number of accumulated polygons
150150
151151   bool                    m_restarting;               // if we're restarting
152152
153153   int                     m_mod2x_supported;          // is D3DTOP_MODULATE2X supported?
154154   int                     m_mod4x_supported;          // is D3DTOP_MODULATE4X supported?
155   D3DFORMAT            m_screen_format;            // format to use for screen textures
155   D3DFORMAT               m_screen_format;            // format to use for screen textures
156156
157157   texture_info *          m_last_texture;             // previous texture
158158   UINT32                  m_last_texture_flags;       // previous texture flags
r253707r253708
161161   int                     m_last_blendsrc;            // previous blendmode
162162   int                     m_last_blenddst;            // previous blendmode
163163   int                     m_last_filter;              // previous texture filter
164   UINT32               m_last_wrap;                // previous wrap state
165   int                  m_last_modmode;             // previous texture modulation
164   UINT32                  m_last_wrap;                // previous wrap state
165   int                     m_last_modmode;             // previous texture modulation
166166
167167   void *                  m_hlsl_buf;                 // HLSL vertex data
168168   shaders *               m_shaders;                  // HLSL interface
r253707r253708
175175
176176#endif // OSD_WINDOWS
177177
178#endif // __WIN_DRAWD3D__
No newline at end of file
178#endif // __WIN_DRAWD3D__
trunk/src/osd/modules/render/drawgdi.h
r253707r253708
5454   size_t                  m_bmsize;
5555};
5656
57#endif // __DRAWGDI__
No newline at end of file
57#endif // __DRAWGDI__
trunk/src/osd/modules/render/drawnone.h
r253707r253708
3333   virtual void toggle_fsfx() override { }
3434};
3535
36#endif // __DRAWNONE__
No newline at end of file
36#endif // __DRAWNONE__
trunk/src/osd/modules/render/drawogl.h
r253707r253708
228228   INT32           m_surf_h;
229229   GLfloat         m_texVerticex[8];
230230
231   static bool      s_shown_video_info;
232   static bool      s_dll_loaded;
231   static bool     s_shown_video_info;
232   static bool     s_dll_loaded;
233233};
234234
235#endif // __DRAWOGL__
No newline at end of file
235#endif // __DRAWOGL__
trunk/src/osd/modules/render/drawsdl.h
r253707r253708
8383   void            (*yuv_blit)(const UINT16 *bitmap, UINT8 *ptr, const int pitch, const UINT32 *lookup, const int width, const int height);
8484};
8585
86#endif // __DRAWSDL2__
No newline at end of file
86#endif // __DRAWSDL2__
trunk/src/osd/modules/render/sdlglcontext.h
r253707r253708
6464   char m_error[256];
6565};
6666
67#endif // __SDL_GL_CONTEXT__
No newline at end of file
67#endif // __SDL_GL_CONTEXT__
trunk/src/osd/modules/render/winglcontext.h
r253707r253708
167167   static HMODULE m_module;
168168};
169169
170#endif // __WIN_GL_CONTEXT__
No newline at end of file
170#endif // __WIN_GL_CONTEXT__
trunk/src/osd/modules/sync/work_osd.cpp
r253707r253708
110110
111111struct osd_work_queue
112112{
113   std::mutex         *lock;           // lock for protecting the queue
113   std::mutex          *lock;           // lock for protecting the queue
114114   osd_work_item * volatile list;      // list of items in the queue
115115   osd_work_item ** volatile tailptr;  // pointer to the tail pointer of work items in the queue
116116   osd_work_item * volatile free;      // free list of work items
trunk/src/osd/windows/window.cpp
r253707r253708
205205   }
206206
207207   const int fallbacks[VIDEO_MODE_COUNT] = {
208      -1,               // NONE -> no fallback
209      VIDEO_MODE_NONE,   // GDI -> NONE
210      VIDEO_MODE_D3D,      // BGFX -> D3D
208      -1,                 // NONE -> no fallback
209      VIDEO_MODE_NONE,    // GDI -> NONE
210      VIDEO_MODE_D3D,     // BGFX -> D3D
211211#if (USE_OPENGL)
212      VIDEO_MODE_GDI,      // OPENGL -> GDI
212      VIDEO_MODE_GDI,     // OPENGL -> GDI
213213#endif
214      -1,               // No SDL2ACCEL on Windows OSD
214      -1,                 // No SDL2ACCEL on Windows OSD
215215#if (USE_OPENGL)
216      VIDEO_MODE_OPENGL,   // D3D -> OPENGL
216      VIDEO_MODE_OPENGL,  // D3D -> OPENGL
217217#else
218      VIDEO_MODE_GDI,      // D3D -> GDI
218      VIDEO_MODE_GDI,     // D3D -> GDI
219219#endif
220      -1               // No SOFT on Windows OSD
220      -1                  // No SOFT on Windows OSD
221221   };
222222
223223   int current_mode = video_config.mode;
trunk/src/osd/windows/winmain.cpp
r253707r253708
280280   { WINOPTION_HWSTRETCH ";hws",                     "1",        OPTION_BOOLEAN,    "enables hardware stretching" },
281281
282282   // post-processing options
283   { nullptr,                                                 nullptr,             OPTION_HEADER,     "DIRECT3D POST-PROCESSING OPTIONS" },
284   { WINOPTION_HLSL_ENABLE";hlsl",                            "0",                 OPTION_BOOLEAN,    "enables HLSL post-processing (PS3.0 required)" },
285   { WINOPTION_HLSLPATH,                                      "hlsl",              OPTION_STRING,     "path to hlsl files" },
286   { WINOPTION_HLSL_PRESCALE_X,                               "0",                 OPTION_INTEGER,    "HLSL pre-scale override factor for X (0 for auto)" },
287   { WINOPTION_HLSL_PRESCALE_Y,                               "0",                 OPTION_INTEGER,    "HLSL pre-scale override factor for Y (0 for auto)" },
288   { WINOPTION_HLSL_WRITE,                                    nullptr,             OPTION_STRING,     "enables HLSL AVI writing (huge disk bandwidth suggested)" },
283   { nullptr,                                                  nullptr,             OPTION_HEADER,     "DIRECT3D POST-PROCESSING OPTIONS" },
284   { WINOPTION_HLSL_ENABLE";hlsl",                             "0",                 OPTION_BOOLEAN,    "enables HLSL post-processing (PS3.0 required)" },
285   { WINOPTION_HLSLPATH,                                       "hlsl",              OPTION_STRING,     "path to hlsl files" },
286   { WINOPTION_HLSL_PRESCALE_X,                                "0",                 OPTION_INTEGER,    "HLSL pre-scale override factor for X (0 for auto)" },
287   { WINOPTION_HLSL_PRESCALE_Y,                                "0",                 OPTION_INTEGER,    "HLSL pre-scale override factor for Y (0 for auto)" },
288   { WINOPTION_HLSL_WRITE,                                     nullptr,             OPTION_STRING,     "enables HLSL AVI writing (huge disk bandwidth suggested)" },
289289   { WINOPTION_HLSL_SNAP_WIDTH,                                "2048",              OPTION_STRING,     "HLSL upscaled-snapshot width" },
290290   { WINOPTION_HLSL_SNAP_HEIGHT,                               "1536",              OPTION_STRING,     "HLSL upscaled-snapshot height" },
291291   { WINOPTION_SHADOW_MASK_TILE_MODE,                          "0",                 OPTION_INTEGER,    "shadow mask tile mode (0 for screen based, 1 for source based)" },
trunk/src/osd/windows/winmain.h
r253707r253708
278278   void build_slider_list();
279279   void update_slider_list();
280280
281   windows_options &   m_options;
282   slider_state *      m_sliders;
281   windows_options &   m_options;
282   slider_state *      m_sliders;
283283
284284   static const int DEFAULT_FONT_HEIGHT = 200;
285285};
trunk/src/tools/jedutil.cpp
r253707r253708
535535   {19, 2304, 0, 252}};
536536
537537static pin_fuse_rows ampal18p8pinfuserows[] = {
538    {12, 2268, 2304, 2556},
539    {13, 1944, 1980, 2232},
540    {14, 1620, 1656, 1908},
541    {15, 1296, 1332, 1584},
542    {16, 972,  1008, 1260},
543    {17, 648,  684,  936},
544    {18, 324,  360,  612},
545    {19, 0,    36,   288}};
538   {12, 2268, 2304, 2556},
539   {13, 1944, 1980, 2232},
540   {14, 1620, 1656, 1908},
541   {15, 1296, 1332, 1584},
542   {16, 972,  1008, 1260},
543   {17, 648,  684,  936},
544   {18, 324,  360,  612},
545   {19, 0,    36,   288}};
546546
547547static pin_fuse_rows gal18v10pinfuserows[] = {
548548   {9,  3096, 3132, 3384},
r253707r253708
20192019      config_peel18cv8_pins,
20202020      nullptr,
20212021      get_peel18cv8_pin_fuse_state},
2022    {"AMPAL18P8", 2600,
2023        ampal18p8pinfuserows, ARRAY_LENGTH(ampal18p8pinfuserows),
2024        ampal18p8pinfusecolumns, ARRAY_LENGTH(ampal18p8pinfusecolumns),
2025        print_ampal18p8_product_terms,
2026        config_ampal18p8_pins,
2027        nullptr,
2028        nullptr},
2022   {"AMPAL18P8", 2600,
2023      ampal18p8pinfuserows, ARRAY_LENGTH(ampal18p8pinfuserows),
2024      ampal18p8pinfusecolumns, ARRAY_LENGTH(ampal18p8pinfusecolumns),
2025      print_ampal18p8_product_terms,
2026      config_ampal18p8_pins,
2027      nullptr,
2028      nullptr},
20292029   {"GAL18V10", 3540,
20302030      gal18v10pinfuserows, ARRAY_LENGTH(gal18v10pinfuserows),
20312031      gal18v10pinfusecolumns, ARRAY_LENGTH(gal18v10pinfusecolumns),
r253707r253708
53125312         output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
53135313         output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
53145314
5315            if (jed_get_fuse(jed, 2591 + (8 - index)))
5315         if (jed_get_fuse(jed, 2591 + (8 - index)))
53165316         {
53175317            output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
53185318         }
trunk/src/version.cpp
r253707r253708
88
99***************************************************************************/
1010
11#define BARE_BUILD_VERSION "0.170"
11#define BARE_BUILD_VERSION "0.171"
1212
1313extern const char bare_build_version[];
1414extern const char build_version[];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team