Previous 199869 Revisions Next

r40607 Sunday 6th September, 2015 at 09:43:52 UTC by incog
Update tutor.xml
[/trunk]makefile
[hash]tutor.xml
[scripts]genie.lua
[scripts/src]machine.lua main.lua
[scripts/target/mame]mess.lua
[src/emu/machine]at_keybc.c
[src/mame/drivers]goldstar.c konendev.c seta.c suna8.c
[src/mame/includes]suna8.h
[src/mame/video]k057714.c suna8.c
[src/mess/drivers]apple2.c apple2e.c ie15.c

trunk/hash/tutor.xml
r249118r249119
1515005E Frogger ~ フロッガー    [dumped]
1616006E Scramble ~ スクランブル  [dumped]
1717007E NightFlight ~ ナイトフライト  [dumped]
18008E Marine Adventure ~ マリン アドベンチー    [dumped]
18008E Marine Adventure ~ マリン アドベンチー    [dumped]
1919009E Mission Attack ~ ミッション アタック    [dumped]
20010E Traffic Jam ~ トラフィック ジャム
21011E Mystery Gold ~ ミステリー ゴールド
20010E Traffic Jam ~ トラフィック ジャム    [dumped]
21011E Mystery Gold ~ ミステリー ゴールド    [dumped]
2222012E DonPan ~ ドンバン [dumped]
2323013E Mickey Athletic Land ~ ミッキー アスレチックランド [dumped]
2424014E Pooyan ~ プーヤン
2525015E Jungler ~ ジャングラー
2626016E Guttang Gottong ~ ガッタンゴットン
27017E Maze Patrol ~ メイズ パトロール
27017E Maze Patrol ~ メイズ パトロール    [dumped]
2828018E Tron ~ トロン
29019E Mr. Do! ~ Mr.DO!
29019E Mr. Do! ~ Mr.DO!    [dumped]
3030020E Bermuda Triangle ~ バミューダ・ トライアングル
3131021E 4-nin Mahjan ~ 四人麻雀
3232022E Triplecommand ~ トリプルコマンド
r249118r249119
218218         </dataarea>
219219      </part>
220220   </software>
221   
222   <software name="Maze Patrol">
223      <description>Maze Patrol (Jpn)</description>
224      <year>1983</year>
225      <publisher>Tomy</publisher>
226      <info name="alt_title" value="メイズ パトロール"/>
227      <info name="serial" value="017E"/>
228      <part name="cart" interface="tutor_cart">
229         <dataarea name="rom" size="8192">
230            <rom name="tomy 36.7.u1" size="8192" crc="f3059779" sha1="fd51c445f0356ed3796bdbbd4a7f6086d7bb5331" offset="0" />
231         </dataarea>
232      </part>
233   </software>
221234
222235   <software name="athland">
223236      <description>Mickey Athletic Land (Jpn)</description>
r249118r249119
257270         </dataarea>
258271      </part>
259272   </software>
273   
274   <software name="mysteryg">
275      <description>Mystery Gold (Jpn)</description>
276      <year>1983</year>
277      <publisher>Tomy</publisher>
278      <info name="alt_title" value="ミステリー ゴールド"/>
279      <info name="serial" value="011E"/>
280      <part name="cart" interface="tutor_cart">
281         <dataarea name="rom" size="8192">
282            <rom name="mysteryg.bin" size="8192" crc="2c4f30b8" sha1="8d1fcb8e86f4e2d5557a7c39e7859811311a966a" offset="0" />
283         </dataarea>
284      </part>
285   </software>
286   
287   <software name="mrdo">
288      <description>Mr. Do! (Jpn)</description>
289      <year>1983</year>
290      <publisher>Tomy</publisher>
291      <info name="alt_title" value="Mr.DO!"/>
292      <info name="serial" value="019E"/>
293      <part name="cart" interface="tutor_cart">
294         <dataarea name="rom" size="8192">
295            <rom name="tomy 3l1.ic1.bin" size="8192" crc="1dfa3f4b" sha1="93d1c17c5edd44f27c28cde88a68f609b77feb0c" offset="0" />
296         </dataarea>
297      </part>
298   </software>
260299
261300   <software name="nflight">
262301      <description>Night Flight (Jpn)</description>
r249118r249119
334373      </part>
335374   </software>
336375
337   <software name="trafjam">
376   <software name="trafjam" cloneof="trafjam">
338377   <!-- Stock No: 8103, (Japanese 010E)-->
339      <description>Traffic Jam</description>
340      <year>1983</year>
378      <description>Traffic Jam (Jpn)</description>
379      <year>1982</year>
341380      <publisher>Tomy</publisher>
342381      <part name="cart" interface="tutor_cart">
343382         <dataarea name="rom" size="8192">
344            <rom name="trafjam.bin" size="8192" crc="c0c78141" sha1="2ba074955a1507ca9f6cde8987695f495e81aeab" offset="0" />
383            <rom name="tomy 33.5.ic1" size="8192" crc="c970f2c3" sha1="086825470d349f3bbd598bbb8b8c9e13aa2458b6" offset="0" />
345384         </dataarea>
346385      </part>
347386   </software>
348387
349   <software name="trafjama" cloneof="trafjam">
388   <software name="trafjama">
350389   <!-- Stock No: 8103, (Japanese 010E)-->
351      <description>Traffic Jam (Alt)</description>
352      <year>1982</year>
390      <description>Traffic Jam (USA)</description>
391      <year>1983</year>
353392      <publisher>Tomy</publisher>
354393      <part name="cart" interface="tutor_cart">
355394         <dataarea name="rom" size="8192">
356            <rom name="trafjama.bin" size="8192" crc="c970f2c3" sha1="086825470d349f3bbd598bbb8b8c9e13aa2458b6" offset="0" />
395            <rom name="trafjama.bin" size="8192" crc="c0c78141" sha1="2ba074955a1507ca9f6cde8987695f495e81aeab" offset="0" />
357396         </dataarea>
358397      </part>
359398   </software>
trunk/makefile
r249118r249119
9292
9393# DRIVERS = src/mame/drivers/1942.c,src/mame/drivers/cops.c
9494
95# FORCE_VERSION_COMPILE = 1
96
9795-include useroptions.mak
9896
9997###########################################################################
r249118r249119
632630PARAMS += --DRIVERS='$(DRIVERS)'
633631endif
634632
635ifdef FORCE_VERSION_COMPILE
636PARAMS += --FORCE_VERSION_COMPILE='$(FORCE_VERSION_COMPILE)'
637endif
638
639633#-------------------------------------------------
640634# All scripts
641635#-------------------------------------------------
trunk/scripts/genie.lua
r249118r249119
374374   description = "List of drivers to compile.",
375375}
376376
377newoption {
378   trigger = "FORCE_VERSION_COMPILE",
379   description = "Force compiling of version.c file.",
380   allowed = {
381      { "0",   "Disabled"    },
382      { "1",   "Enabled"      },
383   }
384}
385
386377if _OPTIONS["SHLIB"]=="1" then
387378   LIBTYPE = "SharedLib"
388379else
trunk/scripts/src/machine.lua
r249118r249119
26522652      MAME_DIR .. "src/emu/machine/netlist.h",
26532653   }
26542654end
2655
2656---------------------------------------------------
2657--
2658--@src/emu/machine/nsc810.h,MACHINES["NSC810"] = true
2659---------------------------------------------------
2660
2661if (MACHINES["NSC810"]~=null) then
2662   files {
2663      MAME_DIR .. "src/emu/machine/nsc810.c",
2664      MAME_DIR .. "src/emu/machine/nsc810.h",
2665   }
2666end
trunk/scripts/src/main.lua
r249118r249119
234234      { MAME_DIR .. "src/".._target .."/" .. _subtarget ..".lst" ,  GEN_DIR  .. _target .. "/" .. _subtarget .."/drivlist.c",    {  MAME_DIR .. "src/build/makelist.py" }, {"@echo Building driver list...",    PYTHON .. " $(1) $(<) > $(@)" }},
235235   }
236236end   
237
238if _OPTIONS["FORCE_VERSION_COMPILE"]=="1" then
239237   configuration { "gmake" }
240238      dependency {
241239         { ".PHONY", ".FORCE", true },
242240         { "$(OBJDIR)/src/version.o", ".FORCE", true },
243241      }
244end
242
245243   configuration { "mingw*" }
246244      custombuildtask {   
247245         { MAME_DIR .. "src/version.c" ,  GEN_DIR  .. "/resource/" .. rctarget .. "vers.rc",    {  MAME_DIR .. "src/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...",    PYTHON .. " $(1)  -r -b " .. rctarget .. " $(<) > $(@)" }},
trunk/scripts/target/mame/mess.lua
r249118r249119
561561MACHINES["WOZFDC"] = true
562562MACHINES["DIABLO_HD"] = true
563563MACHINES["TMS1024"] = true
564MACHINES["NSC810"] = true
565564
566565--------------------------------------------------
567566-- specify available bus cores
r249118r249119
26532652   MAME_DIR .. "src/mess/drivers/hpz80unk.c",
26542653   MAME_DIR .. "src/mess/drivers/ht68k.c",
26552654   MAME_DIR .. "src/mess/drivers/hunter2.c",
2655   MAME_DIR .. "src/emu/machine/nsc810.c",
2656   MAME_DIR .. "src/emu/machine/nsc810.h",
26562657   MAME_DIR .. "src/mess/drivers/i7000.c",
26572658   MAME_DIR .. "src/mess/drivers/ibm6580.c",
26582659   MAME_DIR .. "src/mess/drivers/icatel.c",
trunk/src/emu/machine/at_keybc.c
r249118r249119
2828static INPUT_PORTS_START( at_keybc )
2929   PORT_START("DSW")
3030   PORT_BIT(     0xbf, 0xbf, IPT_UNUSED )
31   PORT_DIPNAME( 0x40, 0x00, "Display switch")
31   PORT_DIPNAME( 0x40, 0x40, "Display switch")
3232   PORT_DIPSETTING(    0x40, "Monochrome adapter" )
3333   PORT_DIPSETTING(    0x00, "Color/Graphics adapter" )
3434INPUT_PORTS_END
trunk/src/mame/drivers/goldstar.c
r249118r249119
17311731   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
17321732   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big")
17331733   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
1734   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Stop 1 / Take")
1735   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 / Bet" )
1736   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_NAME("Stop 3 / Small / Info")
1737   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Stop All")
1734   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
1735   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
1736   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Info")
1737   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start")
17381738
17391739   PORT_INCLUDE( cmv4_coins )
17401740
r249118r249119
17951795   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )  PORT_DIPLOCATION("DSW5:6")  /* normally Display Of Doll At All Fr. Bonus, but no whores in this set */
17961796   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
17971797   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1798   PORT_DIPNAME( 0x40, 0x40, "Skill Stop" )        PORT_DIPLOCATION("DSW5:7")  /* OK */
1799   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1800   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1798   /* DSW5-7 listed as unused */
18011799   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )  PORT_DIPLOCATION("DSW5:8")  /* normally Test Mode For Disp. Of Doll, but no whores in this set */
18021800   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
18031801   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
trunk/src/mame/drivers/konendev.c
r249118r249119
6363
6464   DECLARE_READ32_MEMBER(mcu2_r);
6565   DECLARE_READ32_MEMBER(ifu2_r);
66   DECLARE_READ32_MEMBER(ctrl0_r);
67   DECLARE_READ32_MEMBER(ctrl1_r);
68   DECLARE_READ32_MEMBER(ctrl2_r);
69   DECLARE_READ32_MEMBER(rtc_r);
70   DECLARE_WRITE32_MEMBER(rtc_w);
66   DECLARE_READ32_MEMBER(unk_78800004_r);
67   DECLARE_READ32_MEMBER(unk_78a00000_r);
68   DECLARE_READ32_MEMBER(unk_78e00000_r);
7169   DECLARE_WRITE32_MEMBER(eeprom_w);
72   DECLARE_READ32_MEMBER(sound_data_r);
73   DECLARE_WRITE32_MEMBER(sound_data_w);
7470
7571   DECLARE_WRITE_LINE_MEMBER(gcu_interrupt);
76   INTERRUPT_GEN_MEMBER(vbl_interrupt);
7772
78   UINT8 rtc_dev_r(UINT32 reg);
79
8073   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8174};
8275
r249118r249119
10194   {
10295      r &= ~0x4000;       // MCU2 presence
10396      r &= ~0x2000;       // IFU2 presence
104      r &= ~0x1000;       // FMU2 presence   
97      r &= ~0x1000;       // FMU2 presence
10598   }
10699   if (ACCESSING_BITS_0_7)
107100   {
108      r |= ioport("DSW")->read() & 0xff;
109
110      //r |= 0x80;         // 0 = ram clear?
111      //r |= 0x40;         // logic door
112      r |= 0x04;         // battery 1 status
113      r |= 0x10;         // battery 2 status     
101      r |= 0x40;          // logic door
102      r |= 0x04;          // battery 1 status
103      r |= 0x10;          // battery 2 status
114104   }
115105
116106   return r;
r249118r249119
128118   return r;
129119}
130120
131// This seems to be Epson RTC-72423
132UINT8 konendev_state::rtc_dev_r(UINT32 reg)
121READ32_MEMBER(konendev_state::unk_78800004_r)
133122{
134   switch (reg)
135   {
136      case 0x0:      return 9;
137      case 0x1:      return 5;
138      case 0x2:      return 3;
139      case 0x3:      return 2;
140      case 0x4:      return 1;
141      case 0x5:      return 0;
142      case 0x6:      return 7;
143      case 0x7:      return 2;
144      case 0x8:      return 2;
145      case 0x9:      return 1;
146      case 0xa:      return 5;
147      case 0xb:      return 1;
148      case 0xc:      return 3;
149   }
150
151   return 0;
123   return 0xffffffff;
152124}
153125
154READ32_MEMBER(konendev_state::rtc_r)
126READ32_MEMBER(konendev_state::unk_78a00000_r)
155127{
156   UINT32 r = 0;
157   
158   if (ACCESSING_BITS_24_31)
159      r |= (UINT32)(rtc_dev_r(offset * 4)) << 24;
160   if (ACCESSING_BITS_16_23)
161      r |= (UINT32)(rtc_dev_r((offset * 4)+1)) << 16;
162   if (ACCESSING_BITS_8_15)
163      r |= (UINT32)(rtc_dev_r((offset * 4)+2)) << 8;
164   if (ACCESSING_BITS_0_7)
165      r |= (UINT32)(rtc_dev_r((offset * 4)+3));
166
167   return r;
128   return 0xffffffff;
168129}
169130
170WRITE32_MEMBER(konendev_state::rtc_w)
131READ32_MEMBER(konendev_state::unk_78e00000_r)
171132{
133   return 0xffffffff;
172134}
173135
174READ32_MEMBER(konendev_state::ctrl0_r)
175{
176   return ((UINT32)(ioport("IN1")->read() & 0xffff) << 16) | 0xffff;
177}
178
179READ32_MEMBER(konendev_state::ctrl1_r)
180{
181   // 0x01000000 = main door optic
182   // 0x00000010 = hard meter access
183
184   return 0xfeffffef;
185}
186
187READ32_MEMBER(konendev_state::ctrl2_r)
188{
189   return ((UINT32)(ioport("IN0")->read() & 0xffff) << 16) | 0xffff;
190}
191
192136WRITE32_MEMBER(konendev_state::eeprom_w)
193137{
194138   if (ACCESSING_BITS_0_7)
r249118r249119
199143   }
200144}
201145
202READ32_MEMBER(konendev_state::sound_data_r)
203{
204   return 0xffffffff;
205}
206
207WRITE32_MEMBER(konendev_state::sound_data_w)
208{
209}
210
211146static ADDRESS_MAP_START( konendev_map, AS_PROGRAM, 32, konendev_state )
212147   AM_RANGE(0x00000000, 0x00ffffff) AM_RAM
213148   AM_RANGE(0x78000000, 0x78000003) AM_READ(mcu2_r)
214   AM_RANGE(0x78080000, 0x7808000f) AM_READWRITE(rtc_r, rtc_w)
215   AM_RANGE(0x780c0000, 0x780c0003) AM_READWRITE(sound_data_r, sound_data_w)
216149   AM_RANGE(0x78100000, 0x78100003) AM_WRITE(eeprom_w)
217150   AM_RANGE(0x78800000, 0x78800003) AM_READ(ifu2_r)
218   AM_RANGE(0x78800004, 0x78800007) AM_READ(ctrl0_r)
219   AM_RANGE(0x78a00000, 0x78a0001f) AM_READ(ctrl1_r)
220   AM_RANGE(0x78e00000, 0x78e00003) AM_READ(ctrl2_r)
151   AM_RANGE(0x78800004, 0x78800007) AM_READ(unk_78800004_r)
152   AM_RANGE(0x78a00000, 0x78a0001f) AM_READ(unk_78a00000_r)
153   AM_RANGE(0x78e00000, 0x78e00003) AM_READ(unk_78e00000_r)
154//  AM_RANGE(0x78000000, 0x78000003) AM_READNOP
155//  AM_RANGE(0x78100000, 0x7810001b) AM_RAM
156//  AM_RANGE(0x78a00014, 0x78a00017) AM_WRITENOP
221157   AM_RANGE(0x79000000, 0x79000003) AM_DEVWRITE("gcu", k057714_device, fifo_w)
222158   AM_RANGE(0x79800000, 0x798000ff) AM_DEVREADWRITE("gcu", k057714_device, read, write)
223159   AM_RANGE(0x7a000000, 0x7a01ffff) AM_RAM AM_SHARE("nvram0")
r249118r249119
228164
229165
230166static INPUT_PORTS_START( konendev )
231   PORT_START("IN0")
232   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )      // "Take Win" button
233   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_GAMBLE_BET )      // "Gamble" button
234   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 )         // "25 Lines" button
235   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 )         // "20 Lines" button
236   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON3 )         // "15 Lines" button
237   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 )         // "10 Lines" button   
238   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON5 )         // "5 Lines" button
239   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON6 )         // "1 Line" button   
240   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 )         // "Reserve" button
241   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON8 )         // "Collect" button
242   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON9 )         // "Bet 20" button
243   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON10 )         // "Bet 10" button
244   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON11 )         // "Bet 5" button
245   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON12 )         // "Bet 3" button
246   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON13 )         // "Bet 2" button
247   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON14 )         // "Bet 1" button
248
249   PORT_START("IN1")
250   PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED )
251   PORT_SERVICE( 0x2000, IP_ACTIVE_LOW )               // Audit key
252   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON16 )         // Reset key   
253   PORT_DIPNAME( 0x0800, 0x0800, "Main door switch" )
254   PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
255   PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
256   PORT_DIPNAME( 0x0400, 0x0400, "Cashbox door" )
257   PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
258   PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
259   PORT_BIT( 0x0300, IP_ACTIVE_LOW, IPT_UNUSED )
260   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
261   PORT_DIPNAME( 0x0040, 0x0040, "BNA Door" )
262   PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
263   PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
264   PORT_DIPNAME( 0x0020, 0x0020, "BNA Transport Exist" )
265   PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
266   PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
267   PORT_DIPNAME( 0x0010, 0x0010, "BNA Stacker Exist" )
268   PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
269   PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
270   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
271   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
272   PORT_DIPNAME( 0x0002, 0x0002, "BNA Power" )
273   PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
274   PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
275   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED )
276
277   PORT_START("DSW")
278   PORT_DIPNAME( 0x80, 0x80, "Ram Clear" )
279   PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
280   PORT_DIPSETTING( 0x00, DEF_STR( On ) )
281   PORT_DIPNAME( 0x40, 0x00, "Logic Door" )
282   PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
283   PORT_DIPSETTING( 0x40, DEF_STR( On ) )
284167INPUT_PORTS_END
285168
286169
287170WRITE_LINE_MEMBER(konendev_state::gcu_interrupt)
288171{
289   m_maincpu->set_input_line(INPUT_LINE_IRQ1, state);
290   m_maincpu->set_input_line(INPUT_LINE_IRQ3, state);
172   m_maincpu->set_input_line(INPUT_LINE_IRQ0, state);
291173}
292174
293175
294INTERRUPT_GEN_MEMBER(konendev_state::vbl_interrupt)
295{
296   device.execute().set_input_line(INPUT_LINE_IRQ1, ASSERT_LINE);
297   device.execute().set_input_line(INPUT_LINE_IRQ3, ASSERT_LINE);
298}
299176
300177static MACHINE_CONFIG_START( konendev, konendev_state )
301178   /* basic machine hardware */
302179   MCFG_CPU_ADD("maincpu", PPC403GCX, 32000000) // Clock unknown
303180   MCFG_CPU_PROGRAM_MAP(konendev_map)
304   MCFG_CPU_VBLANK_INT_DRIVER("screen", konendev_state, vbl_interrupt)
305181
306182   /* video hardware */
307183   MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB("palette")
r249118r249119
482358DRIVER_INIT_MEMBER(konendev_state,enchlamp)
483359{
484360   UINT32 *rom = (UINT32*)memregion("program")->base();
485   rom[0x24/4] = 0x00002743;      // patch flash checksum for now
486   
487   // patch sound data checksums
488   rom[0x2d924/4] = 0x00000000;
489   rom[0x2d928/4] = 0x00000000;
490   rom[0x2d934/4] = 0x00000000;
491   rom[0x2d938/4] = 0x00000000;
361   rom[0x24/4] = 0x00002743;       // patch flash checksum for now
492362
493   rom[0] = 0x5782b930;               // new checksum for program rom
363   rom[0] = 0xd43eb930;                // new checksum for program rom
494364}
495365
496366// has a flash dump?
trunk/src/mame/drivers/seta.c
r249118r249119
80448044
80458045   /* video hardware */
80468046   MCFG_SCREEN_ADD("screen", RASTER)
8047   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
80488047   MCFG_SCREEN_REFRESH_RATE(60)
80498048   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
80508049   MCFG_SCREEN_SIZE(64*8, 32*8)
r249118r249119
80828081
80838082   /* video hardware */
80848083   MCFG_SCREEN_ADD("screen", RASTER)
8085   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
80868084   MCFG_SCREEN_REFRESH_RATE(60)
80878085   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
80888086   MCFG_SCREEN_SIZE(64*8, 32*8)
trunk/src/mame/drivers/suna8.c
r249118r249119
2727
2828- hardhea2: in test mode press P1&P2 button 2 to see a picture of each level
2929- Rough Ranger default dipswitch settings are based on the settings listed in
30  the Sharp Image licensed Rough Ranger manual / NOTICE sheet dated 8-5-88
31- rranger  video: http://www.nicovideo.jp/watch/sm15788808 (not perfect: fireball masking, lev. 5; masking/missing legs, lev. 10)
32- hardhead video: https://youtu.be/zamQvXr9_xs
33- starfigh video: http://youtu.be/SIwV7wjvnHM (missing starfield effect!)
30  the Sharp Image licensed Rough Ranger manaul / NOTICE sheet dated 8-5-88
31- starfigh video: http://youtu.be/SIwV7wjvnHM -> missing starfield effect!
3432- brickzn  video: http://youtu.be/yfU1C7A3iZI (recorded from v6.0, Joystick version)
3533
3634***************************************************************************/
r249118r249119
18871885   MCFG_PALETTE_FORMAT(RRRRGGGGBBBBxxxx)
18881886   MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG)
18891887
1890   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text)
1888   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_textdim12)
18911889
18921890   /* sound hardware */
18931891   MCFG_SPEAKER_STANDARD_MONO("mono")
r249118r249119
19411939   MCFG_PALETTE_FORMAT(RRRRGGGGBBBBxxxx)
19421940   MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG)
19431941
1944   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text)
1942   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_textdim8)
19451943
19461944   /* sound hardware */
19471945   MCFG_SPEAKER_STANDARD_MONO("mono")
r249118r249119
29232921   m_bank1->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000);
29242922}
29252923
2926GAME( 1988, sranger,   0,        rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA",                       "Super Ranger (v2.0)",                MACHINE_IMPERFECT_GRAPHICS )
2927GAME( 1988, rranger,   sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA (Sharp Image license)", "Rough Ranger (v2.0)",                MACHINE_IMPERFECT_GRAPHICS )
2928GAME( 1988, rrangerb,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "bootleg",                    "Rough Ranger (v2.0, bootleg)",       MACHINE_IMPERFECT_GRAPHICS )
2929GAME( 1988, srangero,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA",                       "Super Ranger (older)",               MACHINE_IMPERFECT_GRAPHICS )
2930GAME( 1988, srangern,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA (NOVA license)",        "Super Ranger (older, NOVA license)", MACHINE_IMPERFECT_GRAPHICS )
2931GAME( 1988, srangerw,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA (WDK license)",         "Super Ranger (older, WDK license)",  MACHINE_IMPERFECT_GRAPHICS )
2932GAME( 1988, srangerb,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "bootleg (NYWA)",             "Super Ranger (older, bootleg)",      MACHINE_IMPERFECT_GRAPHICS )
2924GAME( 1988, sranger,   0,        rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA",                       "Super Ranger (v2.0)",                0 )
2925GAME( 1988, rranger,   sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA (Sharp Image license)", "Rough Ranger (v2.0)",                0 )
2926GAME( 1988, rrangerb,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "bootleg",                    "Rough Ranger (v2.0, bootleg)",       0 )
2927GAME( 1988, srangero,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA",                       "Super Ranger (older)",               0 )
2928GAME( 1988, srangern,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA (NOVA license)",        "Super Ranger (older, NOVA license)", 0 )
2929GAME( 1988, srangerw,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA (WDK license)",         "Super Ranger (older, WDK license)",  0 )
2930GAME( 1988, srangerb,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "bootleg (NYWA)",             "Super Ranger (older, bootleg)",      0 )
29332931
29342932GAME( 1988, hardhead,  0,        hardhead, hardhead, suna8_state, hardhead,  ROT0,  "SunA",                       "Hard Head",                   0 )
29352933GAME( 1988, hardheadb, hardhead, hardhead, hardhead, suna8_state, hardhedb,  ROT0,  "bootleg",                    "Hard Head (bootleg)",         0 )
trunk/src/mame/includes/suna8.h
r249118r249119
6464   }   m_gfxbank_type;
6565   UINT8 m_gfxbank;
6666
67   bool m_has_text; // has text sprites (older games)
67   int m_text_dim; // vertical size of the text layer (0 = no text layer)
6868
6969   // samples
7070   INT16 *m_samplebuf;
r249118r249119
148148   DECLARE_DRIVER_INIT(hardhead);
149149   DECLARE_DRIVER_INIT(suna8);
150150
151   void suna8_vh_start_common(bool has_text, GFXBANK_TYPE_T gfxbank_type);
152   DECLARE_VIDEO_START(suna8_text);
151   void suna8_vh_start_common(int text_dim, GFXBANK_TYPE_T gfxbank_type);
152   DECLARE_VIDEO_START(suna8_textdim8);
153   DECLARE_VIDEO_START(suna8_textdim12);
153154   DECLARE_VIDEO_START(suna8_sparkman);
154155   DECLARE_VIDEO_START(suna8_brickzn);
155156   DECLARE_VIDEO_START(suna8_starfigh);
r249118r249119
167168   void play_sample(int index);
168169   SAMPLES_START_CB_MEMBER(sh_start);
169170
170   void draw_sprites     (screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int which);
171   void draw_text_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int ypos, bool write_mask);
171   void draw_normal_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect, int which);
172   void draw_text_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
172173   UINT8 *brickzn_decrypt();
173174};
trunk/src/mame/video/k057714.c
r249118r249119
332332      int li = ((j+y) * fb_pitch) + x;
333333      UINT32 fbaddr0 = m_frame[0].base + li;
334334      UINT32 fbaddr1 = m_frame[1].base + li;
335      UINT32 fbaddr2 = m_frame[2].base + li;
335//      UINT32 fbaddr2 = m_frame[2].base + li;
336336//      UINT32 fbaddr3 = m_frame[3].base + li;
337337
338338      for (int i=0; i < width; i++)
339339      {
340340         UINT16 pix0 = vram16[fbaddr0 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
341341         UINT16 pix1 = vram16[fbaddr1 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
342         UINT16 pix2 = vram16[fbaddr2 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
342//          UINT16 pix2 = vram16[fbaddr2 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
343343//          UINT16 pix3 = vram16[fbaddr3 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
344344
345         d[i] = 0;
346                     
347         if (pix2 & 0x8000)
345         if (pix0 & 0x8000)
348346         {
349            d[i] = pix2 & 0x7fff;
347            d[i] = pix0 & 0x7fff;
350348         }
351         if (pix1 & 0x8000)
349         else
352350         {
353351            d[i] = pix1 & 0x7fff;
354352         }
355         if (pix0 & 0x8000)
356         {
357            d[i] = pix0 & 0x7fff;
358         }
359353
360354         fbaddr0++;
361355         fbaddr1++;
362         fbaddr2++;
356//          fbaddr2++;
363357//          fbaddr3++;
364358      }
365359   }
r249118r249119
478472                  if (sg > 0x1f) sg = 0x1f;
479473                  if (sb > 0x1f) sb = 0x1f;
480474
481                  vram16[fbaddr ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)] = (sr << 10) | (sg << 5) | sb | (pix & 0x8000);
475                  vram16[fbaddr ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)] = (sr << 10) | (sg << 5) | sb | 0x8000;
482476               }
483477            }
484478         }
r249118r249119
486480         {
487481            if (draw)
488482            {
489               vram16[fbaddr ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)] = pix;
483               vram16[fbaddr ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)] = pix | 0x8000;
490484            }
491485         }
492486
r249118r249119
565559   // 0x00: -------- xxxxxxxx xxxxxxxx xxxxxxxx   character data address in vram
566560
567561   // 0x01: -------- -------- ------xx xxxxxxxx   character x
568   // 0x01: -------- xxxxxxxx xxxxxx-- --------   character y
562   // 0x01: -------- ----xxxx xxxxxx-- --------   character y
569563   // 0x01: -------x -------- -------- --------   double height
570   // 0x01: -x------ -------- -------- --------   transparency enable
571564
572565   // 0x02: xxxxxxxx xxxxxxxx -------- --------   color 0
573566   // 0x02: -------- -------- xxxxxxxx xxxxxxxx   color 1
r249118r249119
576569   // 0x03: -------- -------- xxxxxxxx xxxxxxxx   color 3
577570
578571   int x = cmd[1] & 0x3ff;
579   int y = (cmd[1] >> 10) & 0x3fff;
572   int y = (cmd[1] >> 10) & 0x3ff;
580573   UINT32 address = cmd[0] & 0xffffff;
581574   UINT16 color[4];
582575   bool relative_coords = (cmd[0] & 0x10000000) ? true : false;
583576   bool double_height = (cmd[1] & 0x01000000) ? true : false;
584   bool trans_enable = (cmd[1] & 0x40000000) ? true : false;
585577
586578   if (relative_coords)
587579   {
r249118r249119
612604      for (int i=0; i < 8; i++)
613605      {
614606         int p = (line >> ((7-i) * 2)) & 3;
615         bool draw = !trans_enable || (trans_enable && (color[p] & 0x8000));
616         if (draw)
617            vram16[(fbaddr+x+i) ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)] = color[p] | 0x8000;
607         vram16[(fbaddr+x+i) ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)] = color[p] | 0x8000;
618608      }
619609   }
620610}
trunk/src/mame/video/suna8.c
r249118r249119
1717    sent to the screen. Each sprite uses 4 bytes, held within the last
1818    page of tiles.
1919
20    * Note: later games use a more complex format than the following,
21            which is yet to be completely understood.
22
23                            [ Sprites Format ]
24
25    Offset:         Bits:               Value:
26
27        0.b                             Y (Bottom up)
28
29        1.b         7--- ----           Sprite Size (1 = 2x32 tiles; 0 = 2x2)
30
31                    2x2 Sprites:
32                    -65- ----           Tiles Row (height = 8 tiles)
33                    ---4 ----           Page
34
35                    2x32 Sprites:
36                    -6-- ----           Ignore X (Multisprite)
37                    --54 ----           Page
38
39                    ---- 3210           Tiles Column (width = 2 tiles)
40
41        2.b                             X
42
43        3.b         7--- ----
44                    -6-- ----           X (Sign Bit)
45                    --54 3---
46                    ---- -210           Tiles Bank
47
48
49                        [ Sprite's Tiles Format ]
50
51
52    Offset:         Bits:                   Value:
53
54        0.b                             Code (Low Bits)
55
56        1.b         7--- ----           Flip Y
57                    -6-- ----           Flip X
58                    --54 32--           Color
59                    ---- --10           Code (High Bits)
60
61
62
2063    Set TILEMAPS to 1 to debug.
2164    Press Z (you see the "tilemaps" in RAM) or
2265    Press X (you see the "tilemaps" in ROM) then
r249118r249119
2972
3073#include "emu.h"
3174#include "includes/suna8.h"
32#include "drawgfxm.h"
3375
3476/***************************************************************************
3577    For Debug: there's no tilemap, just sprites.
r249118r249119
138180
139181
140182
141void suna8_state::suna8_vh_start_common(bool has_text, GFXBANK_TYPE_T gfxbank_type)
183void suna8_state::suna8_vh_start_common(int text_dim, GFXBANK_TYPE_T gfxbank_type)
142184{
143   m_has_text      =   has_text;
185   m_text_dim      =   text_dim;
144186   m_spritebank    =   0;
145187   m_gfxbank       =   0;
146188   m_gfxbank_type  =   gfxbank_type;
147189   m_palettebank   =   0;
148190
149   if (!m_has_text)
191   if (!m_text_dim)
150192   {
151193      m_banked_paletteram.allocate(0x200 * 2);
152194
r249118r249119
157199#if TILEMAPS
158200   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(suna8_state::get_tile_info),this), TILEMAP_SCAN_COLS,
159201
160                        8, 8, 0x20*(m_has_text ? 4 : 16), 0x20);
202                        8, 8, 0x20*(m_text_dim ? 4 : 16), 0x20);
161203
162204   m_bg_tilemap->set_transparent_pen(15);
163205#endif
164206}
165207
166VIDEO_START_MEMBER(suna8_state,suna8_text)              { suna8_vh_start_common( true,  GFXBANK_TYPE_SPARKMAN); }
167VIDEO_START_MEMBER(suna8_state,suna8_sparkman)          { suna8_vh_start_common( false, GFXBANK_TYPE_SPARKMAN); }
168VIDEO_START_MEMBER(suna8_state,suna8_brickzn)           { suna8_vh_start_common( false, GFXBANK_TYPE_BRICKZN);  }
169VIDEO_START_MEMBER(suna8_state,suna8_starfigh)          { suna8_vh_start_common( false, GFXBANK_TYPE_STARFIGH); }
208VIDEO_START_MEMBER(suna8_state,suna8_textdim8)          { suna8_vh_start_common(  8, GFXBANK_TYPE_SPARKMAN); }
209VIDEO_START_MEMBER(suna8_state,suna8_textdim12)         { suna8_vh_start_common( 12, GFXBANK_TYPE_SPARKMAN); }
210VIDEO_START_MEMBER(suna8_state,suna8_sparkman)          { suna8_vh_start_common(  0, GFXBANK_TYPE_SPARKMAN); }
211VIDEO_START_MEMBER(suna8_state,suna8_brickzn)           { suna8_vh_start_common(  0, GFXBANK_TYPE_BRICKZN);  }
212VIDEO_START_MEMBER(suna8_state,suna8_starfigh)          { suna8_vh_start_common(  0, GFXBANK_TYPE_STARFIGH); }
170213
171214/***************************************************************************
172215
r249118r249119
176219
177220***************************************************************************/
178221
179#define PIXEL_OP_REBASE_TRANSPEN_PRIORITY_MASK(DEST, PRIORITY, SOURCE)              \
180do                                                                                  \
181{                                                                                   \
182   UINT32 srcdata = (SOURCE);                                                      \
183   if (srcdata != trans_pen)                                                       \
184   {                                                                               \
185      if ((PRIORITY) == 0)                                                        \
186         (DEST) = color + srcdata;                                               \
187   }                                                                               \
188}                                                                                   \
189while (0)
190
191class mygfx_element : public gfx_element
222void suna8_state::draw_normal_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect, int which)
192223{
193public:
194   void prio_mask_transpen(bitmap_ind16 &dest, const rectangle &cliprect,
195         UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
196         bitmap_ind8 &priority, UINT32 trans_pen)
197   {
198      color = colorbase() + granularity() * (color % colors());
199      code %= elements();
200      DRAWGFX_CORE(UINT16, PIXEL_OP_REBASE_TRANSPEN_PRIORITY_MASK, UINT8);
201   }
202};
203
204/***************************************************************************
205
206                          [ Sprites Format ]
207
208    * Note: later games use a more complex format than the following
209
210    Offset:         Bits:               Value:
211
212        0.b                             Y (Bottom up)
213
214        1.b         7--- ----           Sprite Size (1 = 2x32 tiles; 0 = 2x2)
215
216                    2x2 Sprites:
217                    -65- ----           Tiles Row (height = 8 tiles)
218                    ---4 ----           Page
219
220                    2x32 Sprites:
221                    -6-- ----           Ignore X (Multisprite)
222                    --54 ----           Page
223
224                    ---- 3210           Tiles Column (width = 2 tiles)
225
226        2.b                             X
227
228        3.b         7--- ----           Text Sprite
229                    -6-- ----           X (Sign Bit) <- Also Set For Text Sprites
230                    --54 3210           Tiles Bank ($400 tiles each)
231
232
233                        [ Sprite's Tiles Format ]
234
235
236    Offset:         Bits:                   Value:
237
238        0.b                             Code (Low Bits)
239
240        1.b         7--- ----           Flip Y
241                    -6-- ----           Flip X
242                    --54 32--           Color
243                    ---- --10           Code (High Bits)
244
245***************************************************************************/
246
247void suna8_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int which)
248{
249224   UINT8 *spriteram = m_spriteram + which * 0x2000 * 2;
250225
226   int i;
251227   int mx = 0; // multisprite x counter
252228
253229   int max_x = m_screen->width() - 8;
254230   int max_y = m_screen->height() - 8;
255231
256   if (m_has_text)
257      screen.priority().fill(0, cliprect);
258
259   for (int i = start; i < end; i += 4)
232   for (i = 0x1d00; i < 0x2000; i += 4)
260233   {
261234      int srcpg, srcx,srcy, dimx,dimy, tx, ty;
262235      int gfxbank, colorbank = 0, flipx,flipy, multisprite;
r249118r249119
266239      int x       =   spriteram[i + 2];
267240      int bank    =   spriteram[i + 3];
268241
269      bool read_mask = false;
270
271      if (m_has_text)
242      if (m_text_dim)
272243      {
273244         // Older, simpler hardware: hardhead, rranger
274
275         // rranger (20:18):
276         //   fireball (fe00: 19 00 28 07) not masked by text (fd48: e0 00 00 c0, fd4c: 10 00 00 c0), fire (fdb0: 30 00 00 c0, fdb4: 20 00 00 c0)
277         //   fireball (fe00: 20 00 ba 07) is masked!? But only by fire?
278         // rranger (33:04, 35:17):
279         //   generally no masking by fire, but there are missing legs on some enemies.
280         //   Could be a sprite limit hit, as there are many sprites on that line, and it's affected by the horizontal (dead) player
281         read_mask = true;
282
283         if ((bank & 0xc0) == 0xc0)
284         {
285            // hardhead: fd88/8c/90 -> f994..f9c0
286            // rranger:  fd48/4c    -> f980..f9ac
287            //           fdb0/b4    -> f9c0..f9fc
288            //           note: fireballs in level 5 (fe20/40) should go above flames and score (text sprites)
289            int text_list  = (i - start) & 0x20;
290            int text_start = text_list ? 0x19c0 : 0x1980;
291            bool write_mask = (text_list == 0);   // hack?
292            draw_text_sprites(screen, bitmap, cliprect, text_start, text_start + 0x80, y, write_mask);
293            continue;
294         }
295
296245         flipx = 0;
297246         flipy = 0;
298247         gfxbank = bank & 0x3f;
r249118r249119
314263      }
315264      else
316265      {
317         // Newer, more complex hardware: brickzn, hardhea2, sparkman, starfigh
266         // Newer, more complex hardware: brickzn, hardhea2, sparkman?, starfigh
318267         switch( code & 0xc0 )
319268         {
320269         case 0xc0:
r249118r249119
333282            gfxbank = bank & 0x1f;
334283            srcpg = (code >> 4) & 3;
335284            break;
285// hardhea2: fire code=52/54 bank=a4; player code=02/04/06 bank=08; arrow:code=16 bank=27
336286         case 0x40:
337            // hardhea2: fire code=52/54 bank=a4; player code=02/04/06 bank=08; arrow:code=16 bank=27
338287            dimx = 4;                   dimy = 4;
339288            srcx  = (code & 0xe) * 2;
340289            flipx = code & 0x01;
r249118r249119
398347      x = x - ((bank & 0x40) ? 0x100 : 0);
399348      y = (0x100 - y - dimy*8 ) & 0xff;
400349
401      // Multi Sprite
350      /* Multi Sprite */
402351      if ( multisprite )  {   mx += dimx*8;   x = mx; }
403352      else                    mx = x;
404353
r249118r249119
430379               sy = max_y - sy;    tile_flipy = !tile_flipy;
431380            }
432381
433            int code  = tile + (attr & 0x3)*0x100 + gfxbank;
434            int color = (((attr >> 2) & 0xf) ^ colorbank) + 0x10 * m_palettebank;    // player2 in hardhea2 and sparkman
435
436            if (read_mask)
437               ((mygfx_element*)(m_gfxdecode->gfx(which)))->prio_mask_transpen(bitmap, cliprect,
438                        code, color, tile_flipx, tile_flipy, sx, sy, screen.priority(), 0xf);
439            else
440               m_gfxdecode->gfx(which)->transpen(bitmap, cliprect,
441                        code, color, tile_flipx, tile_flipy, sx, sy, 0xf);
382            m_gfxdecode->gfx(which)->transpen(bitmap,cliprect,
383                     tile + (attr & 0x3)*0x100 + gfxbank,
384                     (((attr >> 2) & 0xf) ^ colorbank) + 0x10 * m_palettebank,    // player2 in hardhea2 and sparkman
385                     tile_flipx, tile_flipy,
386                     sx, sy, 0xf);
442387         }
443388      }
389
444390   }
445391}
446392
447/***************************************************************************
448
449                          [ Text Sprites Format ]
450
451    Offset:         Bits:               Value:
452
453        0.b                             Tiles Y (height = 2 tiles)
454
455        1.b         7--- ----           0 = Skip Sprite
456                    -6-- ----
457                    --54 ----           Page
458                    ---- 3210           Tiles Column (width = 2 tiles)
459
460        2.b                             X
461
462        3.b         7--- ----         0 = Last Sprite
463                    -6-- ----           X (Sign Bit)
464                    --54 3210           Tiles Bank ($400 tiles each)
465
466    Each text sprite is 2x2 tiles
467
468***************************************************************************/
469
470void suna8_state::draw_text_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int ypos, bool write_mask)
393void suna8_state::draw_text_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect)
471394{
472395   UINT8 *spriteram = m_spriteram;
396   int i;
473397
474398   int max_x = m_screen->width() - 8;
475399   int max_y = m_screen->height() - 8;
476400
477   bool last = false;
478   for (int i = start; i < end && !last; i += 4)
401   for (i = 0x1900; i < 0x19ff; i += 4)
479402   {
480403      int srcpg, srcx,srcy, dimx,dimy, tx, ty;
481404
r249118r249119
485408      int bank    =   spriteram[i + 3];
486409
487410      if (~code & 0x80)   continue;
488      last = !(bank & 0x80);
489411
490      dimx = 2;                   dimy = 2;
491      srcx  = (code & 0xf) * 2;   srcy = ((y & 0xf8) - (ypos & 0xf8) - 0x10) / 8;
412      dimx = 2;                   dimy = m_text_dim;
413      srcx  = (code & 0xf) * 2;   srcy = (y & 0xf0) / 8;
492414      srcpg = (code >> 4) & 3;
493415
494416      x = x - ((bank & 0x40) ? 0x100 : 0);
417      y = 0;
495418
496419      bank    =   (bank & 0x3f) * 0x400;
497420
r249118r249119
499422      {
500423         for (tx = 0; tx < dimx; tx ++)
501424         {
425            int real_ty =   (ty < (dimy/2)) ? ty : (ty + 0x20 - dimy);
426
502427            int addr    =   (srcpg * 0x20 * 0x20) +
503428                        ((srcx + tx) & 0x1f) * 0x20 +
504                        ((srcy + ty) & 0x1f);
429                        ((srcy + real_ty) & 0x1f);
505430
506431            int tile    =   spriteram[addr*2 + 0];
507432            int attr    =   spriteram[addr*2 + 1];
r249118r249119
510435            int flipy   =   attr & 0x80;
511436
512437            int sx      =    x + tx * 8;
513            int sy      =   (0xf0 - ypos + ty * 8) & 0xff;
438            int sy      =   (y + real_ty * 8) & 0xff;
514439
515440            if (flip_screen())
516441            {
r249118r249119
518443               sy = max_y - sy;    flipy = !flipy;
519444            }
520445
521            m_gfxdecode->gfx(0)->transpen(bitmap, cliprect,
446            m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
522447                     tile + (attr & 0x3)*0x100 + bank,
523448                     (attr >> 2) & 0xf,
524449                     flipx, flipy,
525                     sx, sy, 0xf );
450                     sx, sy, 0xf);
526451         }
527452      }
528   }
529453
530   if (write_mask)
531   {
532      // Fill the text sprites row with high priority for masking
533      int sy = (0xf0 - ypos) & 0xff;
534      if (flip_screen())
535         sy = max_y - sy - 8;
536      rectangle text_clip(cliprect.min_x, cliprect.max_x, sy, sy + 0x10 - 1);
537      text_clip &= cliprect;
538      screen.priority().fill(1, text_clip);
539454   }
540455}
541456
r249118r249119
549464
550465UINT32 suna8_state::screen_update_suna8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
551466{
552   // see hardhead, hardhea2 test mode (press button 2 for both players)
467   /* see hardhead, hardhea2 test mode (press button 2 for both players) */
553468   bitmap.fill(0xff, cliprect);
554469
555470#ifdef MAME_DEBUG
r249118r249119
566481      if (machine().input().code_pressed_once(KEYCODE_S)) { m_trombank++; machine().tilemap().mark_all_dirty();   }
567482
568483      m_trombank  &=  0xf;
569      m_page      &=  m_has_text ? 3 : (m_gfxdecode->gfx(1) ? 15 : 7);
484      m_page      &=  m_text_dim ? 3 : (m_gfxdecode->gfx(1) ? 15 : 7);
570485      m_tiles     %=  max_tiles;
571486      if (m_tiles < 0) m_tiles += max_tiles;
572487
r249118r249119
578493                  m_rombank, m_palettebank, m_spritebank,
579494                  m_page, m_tiles, m_trombank);
580495#endif
581      return 0;
582496   }
497   else
583498#endif
584499#endif
500   {
501      // Normal sprites
502      draw_normal_sprites(bitmap,cliprect, 0);
585503
586   // Sprites
587   draw_sprites(screen, bitmap, cliprect, 0x1d00, 0x2000, 0);
504      // More normal sprites (second sprite "chip" in sparkman)
505      if (m_gfxdecode->gfx(1))
506         draw_normal_sprites(bitmap,cliprect, 1);
588507
589   // More sprites (second sprite "chip" in sparkman)
590   if (m_gfxdecode->gfx(1))
591      draw_sprites(screen, bitmap, cliprect, 0x1d00, 0x2000, 1);
592
508      // Text sprites (earlier games only)
509      if (m_text_dim)
510         draw_text_sprites(bitmap,cliprect);
511   }
593512   return 0;
594513}
trunk/src/mess/drivers/apple2.c
r249118r249119
12661266   MCFG_DEVICE_ADD(A2_VIDEO_TAG, APPLE2_VIDEO, XTAL_14_31818MHz)
12671267
12681268   MCFG_SCREEN_ADD("screen", RASTER)
1269   MCFG_SCREEN_RAW_PARAMS(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192)
1269   MCFG_SCREEN_REFRESH_RATE(60)
1270   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
1271   MCFG_SCREEN_SIZE(280*2, 262)
1272   MCFG_SCREEN_VISIBLE_AREA(0, (280*2)-1,0,192-1)
12701273   MCFG_SCREEN_UPDATE_DRIVER(napple2_state, screen_update)
12711274   MCFG_SCREEN_PALETTE("palette")
12721275
trunk/src/mess/drivers/apple2e.c
r249118r249119
30373037   MCFG_DEVICE_ADD(A2_VIDEO_TAG, APPLE2_VIDEO, XTAL_14_31818MHz)
30383038
30393039   MCFG_SCREEN_ADD("screen", RASTER)
3040   MCFG_SCREEN_RAW_PARAMS(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192)
3040   MCFG_SCREEN_REFRESH_RATE(60)
3041   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
3042   MCFG_SCREEN_SIZE(280*2, 262)
3043   MCFG_SCREEN_VISIBLE_AREA(0, (280*2)-1,0,192-1)
30413044   MCFG_SCREEN_UPDATE_DRIVER(apple2e_state, screen_update)
30423045   MCFG_SCREEN_PALETTE("palette")
30433046
trunk/src/mess/drivers/ie15.c
r249118r249119
396396
397397static ADDRESS_MAP_START( ie15_io, AS_IO, 8, ie15_state )
398398   ADDRESS_MAP_UNMAP_HIGH
399   AM_RANGE(000, 000) AM_READWRITE(mem_r, mem_w)   // 00h W: memory request, R: memory data [6.1.2.2]
399   AM_RANGE(000, 000) AM_READ(mem_r) AM_WRITE(mem_w)   // 00h W: memory request, R: memory data [6.1.2.2]
400400   AM_RANGE(001, 001) AM_READ(serial_rx_ready_r) AM_WRITENOP   // 01h W: memory latch [6.1.2.2]
401401   AM_RANGE(002, 002) AM_WRITE(mem_addr_hi_w)      // 02h W: memory address high [6.1.2.2]
402402   AM_RANGE(003, 003) AM_WRITE(mem_addr_lo_w)      // 03h W: memory address low [6.1.2.2]
403403   AM_RANGE(004, 004) AM_WRITE(mem_addr_inc_w)     // 04h W: memory address counter + [6.1.2.2]
404404   AM_RANGE(005, 005) AM_WRITE(mem_addr_dec_w)     // 05h W: memory address counter - [6.1.2.2]
405   AM_RANGE(006, 006) AM_READWRITE(serial_r, serial_w)     // 06h W: serial port data [6.1.5.4]
405   AM_RANGE(006, 006) AM_READ(serial_r) AM_WRITE(serial_w)     // 06h W: serial port data [6.1.5.4]
406406// port 7 is handled in cpu core
407   AM_RANGE(010, 010) AM_READWRITE(serial_tx_ready_r, beep_w)  // 08h W: speaker control [6.1.5.4]
407   AM_RANGE(010, 010) AM_READ(serial_tx_ready_r) AM_WRITE(beep_w)  // 08h W: speaker control [6.1.5.4]
408408   AM_RANGE(011, 011) AM_READ(kb_r)            // 09h R: keyboard data [6.1.5.2]
409409   AM_RANGE(012, 012) AM_READ(kb_s_red_r)          // 0Ah I: keyboard mode "RED" [6.1.5.2]
410410   AM_RANGE(013, 013) AM_READ(kb_ready_r)          // 0Bh R: keyboard data ready [6.1.5.2]
411   AM_RANGE(014, 014) AM_READWRITE(kb_s_sdv_r, serial_speed_w) // 0Ch W: serial port speed [6.1.3.1], R: keyboard mode "SDV" [6.1.5.2]
412   AM_RANGE(015, 015) AM_READWRITE(kb_s_dk_r, kb_ready_w)  // 0Dh I: keyboard mode "DK" [6.1.5.2]
411   AM_RANGE(014, 014) AM_READ(kb_s_sdv_r) AM_WRITE(serial_speed_w) // 0Ch W: serial port speed [6.1.3.1], R: keyboard mode "SDV" [6.1.5.2]
412   AM_RANGE(015, 015) AM_READ(kb_s_dk_r) AM_WRITE(kb_ready_w)  // 0Dh I: keyboard mode "DK" [6.1.5.2]
413413   AM_RANGE(016, 016) AM_READ(kb_s_dupl_r)         // 0Eh I: keyboard mode "DUPL" [6.1.5.2]
414414   AM_RANGE(017, 017) AM_READ(kb_s_lin_r)          // 0Fh I: keyboard mode "LIN" [6.1.5.2]
415415// simulation of flag registers
416   AM_RANGE(020, 027) AM_READWRITE(flag_r, flag_w)
416   AM_RANGE(020, 027) AM_READ(flag_r) AM_WRITE(flag_w)
417417ADDRESS_MAP_END
418418
419419/* Input ports */
r249118r249119
454454   m_serial_tx_ready = m_serial_rx_ready = IE_TRUE;
455455   set_data_frame(1 /* start bits */, 8 /* data bits */, PARITY_NONE, STOP_BITS_1);
456456   // device supports rates from 150 to 9600 baud but null_modem has hardcoded 9600
457   set_rate(9600);
457   set_tra_rate(9600);
458   set_rcv_rate(9600);
458459}
459460
460461void ie15_state::video_start()


Previous 199869 Revisions Next


© 1997-2024 The MAME Team