Previous 199869 Revisions Next

r35116 Wednesday 18th February, 2015 at 17:24:57 UTC by Vasantha Crabb
Disable decrease bytes per line menu items when only one chunk per line is displayed
[src/mame/drivers]gluck2.c iqblock.c progolf.c quizo.c scotrsht.c
[src/mame/includes]iqblock.h scotrsht.h
[src/mame/video]iqblock.c scotrsht.c
[src/osd/modules/debugger/osx]deviceinfoviewer.m memoryview.m

trunk/src/mame/drivers/gluck2.c
r243627r243628
204204public:
205205   gluck2_state(const machine_config &mconfig, device_type type, const char *tag)
206206      : driver_device(mconfig, type, tag) ,
207      m_maincpu(*this, "maincpu"),
208      m_gfxdecode(*this, "gfxdecode"),
209207      m_videoram(*this, "videoram"),
210      m_colorram(*this, "colorram") { }
208      m_colorram(*this, "colorram"),
209      m_maincpu(*this, "maincpu"),
210      m_gfxdecode(*this, "gfxdecode"){ }
211211
212   required_device<cpu_device> m_maincpu;
213   required_device<gfxdecode_device> m_gfxdecode;
214   
215212   required_shared_ptr<UINT8> m_videoram;
216213   required_shared_ptr<UINT8> m_colorram;
217   
218214   tilemap_t *m_bg_tilemap;
219   
220   DECLARE_WRITE8_MEMBER(videoram_w);
221   DECLARE_WRITE8_MEMBER(colorram_w);
215   DECLARE_WRITE8_MEMBER(gluck2_videoram_w);
216   DECLARE_WRITE8_MEMBER(gluck2_colorram_w);
222217   DECLARE_WRITE8_MEMBER(counters_w);
223   TILE_GET_INFO_MEMBER(get_tile_info);
224   
218   TILE_GET_INFO_MEMBER(get_gluck2_tile_info);
225219   virtual void video_start();
226220   DECLARE_PALETTE_INIT(gluck2);
227   
228   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
221   UINT32 screen_update_gluck2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
222   required_device<cpu_device> m_maincpu;
223   required_device<gfxdecode_device> m_gfxdecode;
229224};
230225
231226
r243627r243628
234229*********************************************/
235230
236231
237WRITE8_MEMBER(gluck2_state::videoram_w)
232WRITE8_MEMBER(gluck2_state::gluck2_videoram_w)
238233{
239234   m_videoram[offset] = data;
240235   m_bg_tilemap->mark_tile_dirty(offset);
241236}
242237
243WRITE8_MEMBER(gluck2_state::colorram_w)
238WRITE8_MEMBER(gluck2_state::gluck2_colorram_w)
244239{
245240   m_colorram[offset] = data;
246241   m_bg_tilemap->mark_tile_dirty(offset);
247242}
248243
249244
250TILE_GET_INFO_MEMBER(gluck2_state::get_tile_info)
245TILE_GET_INFO_MEMBER(gluck2_state::get_gluck2_tile_info)
251246{
252247/*  - bits -
253248    7654 3210
r243627r243628
266261
267262void gluck2_state::video_start()
268263{
269   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(gluck2_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
264   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(gluck2_state::get_gluck2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
270265}
271266
272267
273UINT32 gluck2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
268UINT32 gluck2_state::screen_update_gluck2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
274269{
275270   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
276271   return 0;
r243627r243628
345340   AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_device, address_w)
346341   AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
347342   AM_RANGE(0x0844, 0x084b) AM_NOP /* see below */
348   AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") /* 6116 #1 (2K x 8) RAM (only 1st half used) */
349   AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") /* 6116 #2 (2K x 8) RAM (only 1st half used) */
343   AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(gluck2_videoram_w) AM_SHARE("videoram") /* 6116 #1 (2K x 8) RAM (only 1st half used) */
344   AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(gluck2_colorram_w) AM_SHARE("colorram") /* 6116 #2 (2K x 8) RAM (only 1st half used) */
350345   AM_RANGE(0x2000, 0x2000) AM_READ_PORT("SW1")
351346   AM_RANGE(0x2d00, 0x2d01) AM_DEVWRITE("ymsnd", ym2413_device, write)
352347   AM_RANGE(0x3400, 0x3400) AM_READ_PORT("IN0")
r243627r243628
530525*/
531526   MCFG_SCREEN_SIZE((39+1)*8, (38+1)*8)                /* from MC6845 init, registers 00 & 04. (value - 1) */
532527   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)  /* from MC6845 init, registers 01 & 06. */
533   MCFG_SCREEN_UPDATE_DRIVER(gluck2_state, screen_update)
528   MCFG_SCREEN_UPDATE_DRIVER(gluck2_state, screen_update_gluck2)
534529   MCFG_SCREEN_PALETTE("palette")
535530
536531   MCFG_GFXDECODE_ADD("gfxdecode", "palette", gluck2)
r243627r243628
583578*********************************************/
584579
585580/*    YEAR  NAME      PARENT  MACHINE   INPUT     STATE          INIT   ROT    COMPANY          FULLNAME       FLAGS... */
586GAME( 1992, gluck2,   0,      gluck2,   gluck2,   driver_device, 0,     ROT0, "Yung Yu / CYE", "Good Luck II", GAME_SUPPORTS_SAVE )
581GAME( 1992, gluck2,   0,      gluck2,   gluck2,   driver_device, 0,     ROT0, "Yung Yu / CYE", "Good Luck II", 0 )
trunk/src/mame/drivers/iqblock.c
r243627r243628
2525Stephh's notes :
2626
2727  - Coin 2 as well as buttons 2 to 4 for each player are only read in "test mode".
28    Same issue for Dip Switches 0-7 and 1-2 to 1-6.
28    Same issue for Dip Siwtches 0-7 and 1-2 to 1-6.
2929    Some other games on the same hardware might use them.
3030  - Dip Switch 0 is stored at 0xf0ac and Dip Switch 1 is stored at 0xf0ad.
3131    However they are both read back at the same time with "ld   hl,($F0AC)" instructions.
r243627r243628
7373}
7474
7575
76TIMER_DEVICE_CALLBACK_MEMBER(iqblock_state::irq)
76TIMER_DEVICE_CALLBACK_MEMBER(iqblock_state::iqblock_irq)
7777{
7878   int scanline = param;
7979
r243627r243628
8787}
8888
8989
90WRITE8_MEMBER(iqblock_state::irqack_w)
90WRITE8_MEMBER(iqblock_state::iqblock_irqack_w)
9191{
9292   m_maincpu->set_input_line(0, CLEAR_LINE);
9393}
r243627r243628
119119   AM_RANGE(0x5090, 0x5090) AM_READ_PORT("SW0")
120120   AM_RANGE(0x50a0, 0x50a0) AM_READ_PORT("SW1")
121121   AM_RANGE(0x50b0, 0x50b1) AM_DEVWRITE("ymsnd", ym2413_device, write) // UM3567_data_port_0_w
122   AM_RANGE(0x50c0, 0x50c0) AM_WRITE(irqack_w)
123   AM_RANGE(0x6000, 0x603f) AM_WRITE(fgscroll_w)
124   AM_RANGE(0x6800, 0x69ff) AM_WRITE(fgvideoram_w) AM_SHARE("fgvideoram") /* initialized up to 6fff... bug or larger tilemap? */
125   AM_RANGE(0x7000, 0x7fff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram")
122   AM_RANGE(0x50c0, 0x50c0) AM_WRITE(iqblock_irqack_w)
123   AM_RANGE(0x6000, 0x603f) AM_WRITE(iqblock_fgscroll_w)
124   AM_RANGE(0x6800, 0x69ff) AM_WRITE(iqblock_fgvideoram_w) AM_SHARE("fgvideoram") /* initialized up to 6fff... bug or larger tilemap? */
125   AM_RANGE(0x7000, 0x7fff) AM_RAM_WRITE(iqblock_bgvideoram_w) AM_SHARE("bgvideoram")
126126   AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("user1", 0)
127127ADDRESS_MAP_END
128128
r243627r243628
340340   MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz */
341341   MCFG_CPU_PROGRAM_MAP(main_map)
342342   MCFG_CPU_IO_MAP(main_portmap)
343   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", iqblock_state, irq, "screen", 0, 1)
343   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", iqblock_state, iqblock_irq, "screen", 0, 1)
344344
345345   MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
346346   MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
r243627r243628
354354   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
355355   MCFG_SCREEN_SIZE(64*8, 32*8)
356356   MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 30*8-1)
357   MCFG_SCREEN_UPDATE_DRIVER(iqblock_state, screen_update)
357   MCFG_SCREEN_UPDATE_DRIVER(iqblock_state, screen_update_iqblock)
358358   MCFG_SCREEN_PALETTE("palette")
359359
360360   MCFG_GFXDECODE_ADD("gfxdecode", "palette", iqblock)
r243627r243628
531531
532532
533533
534GAME( 1993, iqblock,  0, iqblock,  iqblock, iqblock_state, iqblock,  ROT0, "IGS", "IQ-Block", GAME_SUPPORTS_SAVE )
535GAME( 1993, grndtour, 0, iqblock,  grndtour,iqblock_state, grndtour, ROT0, "IGS", "Grand Tour", GAME_SUPPORTS_SAVE )
534GAME( 1993, iqblock,  0, iqblock,  iqblock, iqblock_state, iqblock,  ROT0, "IGS", "IQ-Block", 0 )
535GAME( 1993, grndtour, 0, iqblock,  grndtour,iqblock_state, grndtour, ROT0, "IGS", "Grand Tour", 0 )
trunk/src/mame/drivers/progolf.c
r243627r243628
6464public:
6565   progolf_state(const machine_config &mconfig, device_type type, const char *tag)
6666      : driver_device(mconfig, type, tag),
67      m_fbram(*this, "fbram"),
6768      m_maincpu(*this, "maincpu"),
6869      m_audiocpu(*this, "audiocpu"),
6970      m_gfxdecode(*this, "gfxdecode"),
70      m_palette(*this, "palette"),
71      m_videoram(*this, "videoram"),
72      m_fbram(*this, "fbram")  { }
71      m_palette(*this, "palette")  { }
7372
74   required_device<cpu_device> m_maincpu;
75   required_device<cpu_device> m_audiocpu;
76   required_device<gfxdecode_device> m_gfxdecode;
77   required_device<palette_device> m_palette;
78
79   required_shared_ptr<UINT8> m_videoram;
80   required_shared_ptr<UINT8> m_fbram;
81   
73   UINT8 *m_videoram;
8274   UINT8 m_char_pen;
8375   UINT8 m_char_pen_vreg;
8476   UINT8 *m_fg_fb;
77   required_shared_ptr<UINT8> m_fbram;
8578   UINT8 m_scrollx_hi;
8679   UINT8 m_scrollx_lo;
8780   UINT8 m_gfx_switch;
8881   UINT8 m_sound_cmd;
89   
90   DECLARE_WRITE8_MEMBER(charram_w);
91   DECLARE_WRITE8_MEMBER(char_vregs_w);
92   DECLARE_WRITE8_MEMBER(scrollx_lo_w);
93   DECLARE_WRITE8_MEMBER(scrollx_hi_w);
94   DECLARE_WRITE8_MEMBER(flip_screen_w);
82   DECLARE_WRITE8_MEMBER(progolf_charram_w);
83   DECLARE_WRITE8_MEMBER(progolf_char_vregs_w);
84   DECLARE_WRITE8_MEMBER(progolf_scrollx_lo_w);
85   DECLARE_WRITE8_MEMBER(progolf_scrollx_hi_w);
86   DECLARE_WRITE8_MEMBER(progolf_flip_screen_w);
9587   DECLARE_WRITE8_MEMBER(audio_command_w);
9688   DECLARE_READ8_MEMBER(audio_command_r);
97   DECLARE_READ8_MEMBER(videoram_r);
98   DECLARE_WRITE8_MEMBER(videoram_w);
99   
89   DECLARE_READ8_MEMBER(progolf_videoram_r);
90   DECLARE_WRITE8_MEMBER(progolf_videoram_w);
10091   DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
101   
102   virtual void machine_start();
10392   virtual void video_start();
10493   DECLARE_PALETTE_INIT(progolf);
105   
106   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
94   UINT32 screen_update_progolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
95   required_device<cpu_device> m_maincpu;
96   required_device<cpu_device> m_audiocpu;
97   required_device<gfxdecode_device> m_gfxdecode;
98   required_device<palette_device> m_palette;
10799};
108100
109101
110void progolf_state::machine_start()
111{
112   save_item(NAME(m_sound_cmd));
113}
114102
103
115104void progolf_state::video_start()
116105{
117106   m_scrollx_hi = 0;
118107   m_scrollx_lo = 0;
119108
120109   m_fg_fb = auto_alloc_array(machine(), UINT8, 0x2000*8);
121   
122   save_item(NAME(m_char_pen));
123   save_item(NAME(m_char_pen_vreg));
124   save_pointer(NAME(m_fg_fb), 0x2000*8);
125   save_item(NAME(m_scrollx_hi));
126   save_item(NAME(m_scrollx_lo));
127   save_item(NAME(m_gfx_switch));
110   m_videoram = auto_alloc_array(machine(), UINT8, 0x1000);
128111}
129112
130113
131UINT32 progolf_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
114UINT32 progolf_state::screen_update_progolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
132115{
116   UINT8 *videoram = m_videoram;
133117   int count,color,x,y,xi,yi;
134118
135119   {
r243627r243628
141125      {
142126         for(y=0;y<32;y++)
143127         {
144            int tile = m_videoram[count];
128            int tile = videoram[count];
145129
146130            m_gfxdecode->gfx(0)->opaque(bitmap,cliprect,tile,1,0,0,(256-x*8)+scroll,y*8);
147131            /* wrap-around */
r243627r243628
179163   return 0;
180164}
181165
182WRITE8_MEMBER(progolf_state::charram_w)
166WRITE8_MEMBER(progolf_state::progolf_charram_w)
183167{
184168   int i;
185169   m_fbram[offset] = data;
r243627r243628
201185   }
202186}
203187
204WRITE8_MEMBER(progolf_state::char_vregs_w)
188WRITE8_MEMBER(progolf_state::progolf_char_vregs_w)
205189{
206190   m_char_pen = data & 0x07;
207191   m_gfx_switch = data & 0xf0;
208192   m_char_pen_vreg = data & 0x30;
209193}
210194
211WRITE8_MEMBER(progolf_state::scrollx_lo_w)
195WRITE8_MEMBER(progolf_state::progolf_scrollx_lo_w)
212196{
213197   m_scrollx_lo = data;
214198}
215199
216WRITE8_MEMBER(progolf_state::scrollx_hi_w)
200WRITE8_MEMBER(progolf_state::progolf_scrollx_hi_w)
217201{
218202   m_scrollx_hi = data;
219203}
220204
221WRITE8_MEMBER(progolf_state::flip_screen_w)
205WRITE8_MEMBER(progolf_state::progolf_flip_screen_w)
222206{
223207   flip_screen_set(data & 1);
224208   if(data & 0xfe)
r243627r243628
237221   return m_sound_cmd;
238222}
239223
240READ8_MEMBER(progolf_state::videoram_r)
224READ8_MEMBER(progolf_state::progolf_videoram_r)
241225{
226   UINT8 *videoram = m_videoram;
242227   UINT8 *gfx_rom = memregion("gfx1")->base();
243228
244229   if (offset >= 0x0800)
r243627r243628
250235      else if (m_gfx_switch == 0x70)
251236         return gfx_rom[offset + 0x2000];
252237      else
253         return m_videoram[offset];
238         return videoram[offset];
254239   } else {
255240      if      (m_gfx_switch == 0x10)
256241         return gfx_rom[offset];
r243627r243628
259244      else if (m_gfx_switch == 0x30)
260245         return gfx_rom[offset + 0x2000];
261246      else
262         return m_videoram[offset];
247         return videoram[offset];
263248   }
264249}
265250
266WRITE8_MEMBER(progolf_state::videoram_w)
251WRITE8_MEMBER(progolf_state::progolf_videoram_w)
267252{
253   UINT8 *videoram = m_videoram;
268254   //if(m_gfx_switch & 0x40)
269   m_videoram[offset] = data;
255   videoram[offset] = data;
270256}
271257
272258static ADDRESS_MAP_START( main_cpu, AS_PROGRAM, 8, progolf_state )
273259   AM_RANGE(0x0000, 0x5fff) AM_RAM
274   AM_RANGE(0x6000, 0x7fff) AM_RAM_WRITE(charram_w) AM_SHARE("fbram")
275   AM_RANGE(0x8000, 0x8fff) AM_READWRITE(videoram_r, videoram_w) AM_SHARE("videoram")
276   AM_RANGE(0x9000, 0x9000) AM_READ_PORT("IN2") AM_WRITE(char_vregs_w)
277   AM_RANGE(0x9200, 0x9200) AM_READ_PORT("P1") AM_WRITE(scrollx_hi_w) //p1 inputs
278   AM_RANGE(0x9400, 0x9400) AM_READ_PORT("P2") AM_WRITE(scrollx_lo_w) //p2 inputs
279   AM_RANGE(0x9600, 0x9600) AM_READ_PORT("IN0") AM_WRITE(flip_screen_w)   /* VBLANK */
260   AM_RANGE(0x6000, 0x7fff) AM_RAM_WRITE(progolf_charram_w) AM_SHARE("fbram")
261   AM_RANGE(0x8000, 0x8fff) AM_READWRITE(progolf_videoram_r,progolf_videoram_w)
262   AM_RANGE(0x9000, 0x9000) AM_READ_PORT("IN2") AM_WRITE(progolf_char_vregs_w)
263   AM_RANGE(0x9200, 0x9200) AM_READ_PORT("P1") AM_WRITE(progolf_scrollx_hi_w) //p1 inputs
264   AM_RANGE(0x9400, 0x9400) AM_READ_PORT("P2") AM_WRITE(progolf_scrollx_lo_w) //p2 inputs
265   AM_RANGE(0x9600, 0x9600) AM_READ_PORT("IN0") AM_WRITE(progolf_flip_screen_w)   /* VBLANK */
280266   AM_RANGE(0x9800, 0x9800) AM_READ_PORT("DSW1")
281267   AM_RANGE(0x9800, 0x9800) AM_DEVWRITE("crtc", mc6845_device, address_w)
282268   AM_RANGE(0x9801, 0x9801) AM_DEVWRITE("crtc", mc6845_device, register_w)
r243627r243628
376362   PORT_DIPUNUSED( 0x80, IP_ACTIVE_HIGH )
377363INPUT_PORTS_END
378364
379static const gfx_layout charlayout =
365static const gfx_layout progolf_charlayout =
380366{
381367   8,8,            /* 8*8 characters */
382368   RGN_FRAC(1,3),  /* 512 characters */
r243627r243628
388374};
389375
390376static GFXDECODE_START( progolf )
391   GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 8 ) /* sprites */
377   GFXDECODE_ENTRY( "gfx1", 0x0000, progolf_charlayout, 0, 8 ) /* sprites */
392378GFXDECODE_END
393379
394380
r243627r243628
437423   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(3072))
438424   MCFG_SCREEN_SIZE(256, 256)
439425   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
440   MCFG_SCREEN_UPDATE_DRIVER(progolf_state, screen_update)
426   MCFG_SCREEN_UPDATE_DRIVER(progolf_state, screen_update_progolf)
441427   MCFG_SCREEN_PALETTE("palette")
442428
443429   MCFG_GFXDECODE_ADD("gfxdecode", "palette", progolf)
r243627r243628
514500
515501
516502// this uses DECO222 style encryption
517GAME( 1981, progolf,  0,       progolf, progolf, driver_device, 0,       ROT270, "Data East Corporation", "18 Holes Pro Golf (set 1)", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
503GAME( 1981, progolf,  0,       progolf, progolf, driver_device, 0,       ROT270, "Data East Corporation", "18 Holes Pro Golf (set 1)", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL )
518504// this uses DECO CPU-6 as custom module CPU (the same as Zoar, are we sure? our Zoar has different encryption, CPU-7 style)
519GAME( 1981, progolfa, progolf, progolfa,progolf, driver_device, 0,       ROT270, "Data East Corporation", "18 Holes Pro Golf (set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
505GAME( 1981, progolfa, progolf, progolfa,progolf, driver_device, 0,       ROT270, "Data East Corporation", "18 Holes Pro Golf (set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL )
trunk/src/mame/drivers/quizo.c
r243627r243628
3535      : driver_device(mconfig, type, tag),
3636      m_maincpu(*this, "maincpu") { }
3737
38   required_device<cpu_device> m_maincpu;
39
4038   UINT8 *m_videoram;
4139   UINT8 m_port60;
4240   UINT8 m_port70;
43
4441   DECLARE_WRITE8_MEMBER(vram_w);
4542   DECLARE_WRITE8_MEMBER(port70_w);
4643   DECLARE_WRITE8_MEMBER(port60_w);
47
4844   DECLARE_DRIVER_INIT(quizo);
4945   DECLARE_PALETTE_INIT(quizo);
50
51   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
46   UINT32 screen_update_quizo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
47   required_device<cpu_device> m_maincpu;
5248};
5349
5450
r243627r243628
8682   }
8783}
8884
89UINT32 quizo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
85UINT32 quizo_state::screen_update_quizo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
9086{
87   UINT8 *videoram = m_videoram;
9188   int x,y;
9289   for(y=0;y<200;y++)
9390   {
9491      for(x=0;x<80;x++)
9592      {
96         int data=m_videoram[y*80+x];
97         int data1=m_videoram[y*80+x+0x4000];
93         int data=videoram[y*80+x];
94         int data1=videoram[y*80+x+0x4000];
9895         int pix;
9996
10097         pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
r243627r243628
118115
119116WRITE8_MEMBER(quizo_state::vram_w)
120117{
118   UINT8 *videoram = m_videoram;
121119   int bank=(m_port70&8)?1:0;
122   m_videoram[offset+bank*0x4000]=data;
120   videoram[offset+bank*0x4000]=data;
123121}
124122
125123WRITE8_MEMBER(quizo_state::port70_w)
r243627r243628
135133      data=0;
136134   }
137135   m_port60=data;
138   membank("bank1")->set_entry(rombankLookup[data]);
136   membank("bank1")->set_base(&memregion("user1")->base()[rombankLookup[data]*0x4000] );
139137}
140138
141139static ADDRESS_MAP_START( memmap, AS_PROGRAM, 8, quizo_state )
r243627r243628
220218   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
221219   MCFG_SCREEN_SIZE(320, 200)
222220   MCFG_SCREEN_VISIBLE_AREA(0*8, 320-1, 0*8, 200-1)
223   MCFG_SCREEN_UPDATE_DRIVER(quizo_state, screen_update)
221   MCFG_SCREEN_UPDATE_DRIVER(quizo_state, screen_update_quizo)
224222   MCFG_SCREEN_PALETTE("palette")
225223
226224   MCFG_PALETTE_ADD("palette", 16)
r243627r243628
267265DRIVER_INIT_MEMBER(quizo_state,quizo)
268266{
269267   m_videoram=auto_alloc_array(machine(), UINT8, 0x4000*2);
270   membank("bank1")->configure_entries(0, 6, memregion("user1")->base(), 0x4000);
271   
272   save_pointer(NAME(m_videoram), 0x4000*2);
273   //save_item(NAME(m_port60));
274   save_item(NAME(m_port70));
275268}
276269
277GAME( 1985, quizo,  0,       quizo,  quizo, quizo_state,  quizo, ROT0, "Seoul Coin Corp.", "Quiz Olympic (set 1)", GAME_SUPPORTS_SAVE )
278GAME( 1985, quizoa, quizo,   quizo,  quizo, quizo_state,  quizo, ROT0, "Seoul Coin Corp.", "Quiz Olympic (set 2)", GAME_SUPPORTS_SAVE )
270GAME( 1985, quizo,  0,       quizo,  quizo, quizo_state,  quizo, ROT0, "Seoul Coin Corp.", "Quiz Olympic (set 1)", 0 )
271GAME( 1985, quizoa, quizo,   quizo,  quizo, quizo_state,  quizo, ROT0, "Seoul Coin Corp.", "Quiz Olympic (set 2)", 0 )
trunk/src/mame/drivers/scotrsht.c
r243627r243628
4545   flip_screen_set(data & 0x08);
4646}
4747
48INTERRUPT_GEN_MEMBER(scotrsht_state::interrupt)
48INTERRUPT_GEN_MEMBER(scotrsht_state::scotrsht_interrupt)
4949{
5050   if (m_irq_enable)
51      m_maincpu->set_input_line(0, HOLD_LINE);
51      device.execute().set_input_line(0, HOLD_LINE);
5252}
5353
54WRITE8_MEMBER(scotrsht_state::soundlatch_w)
54WRITE8_MEMBER(scotrsht_state::scotrsht_soundlatch_w)
5555{
5656   soundlatch_byte_w(space, 0, data);
5757   m_audiocpu->set_input_line(0, HOLD_LINE);
5858}
5959
6060static ADDRESS_MAP_START( scotrsht_map, AS_PROGRAM, 8, scotrsht_state )
61   AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
62   AM_RANGE(0x0800, 0x0fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
61   AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(scotrsht_colorram_w) AM_SHARE("colorram")
62   AM_RANGE(0x0800, 0x0fff) AM_RAM_WRITE(scotrsht_videoram_w) AM_SHARE("videoram")
6363   AM_RANGE(0x1000, 0x10bf) AM_RAM AM_SHARE("spriteram") /* sprites */
6464   AM_RANGE(0x10c0, 0x1fff) AM_RAM /* work ram */
6565   AM_RANGE(0x2000, 0x201f) AM_RAM AM_SHARE("scroll") /* scroll registers */
6666   AM_RANGE(0x2040, 0x2040) AM_WRITENOP
6767   AM_RANGE(0x2041, 0x2041) AM_WRITENOP
6868   AM_RANGE(0x2042, 0x2042) AM_WRITENOP  /* it should be -> bit 2 = scroll direction like in jailbrek, but it's not used */
69   AM_RANGE(0x2043, 0x2043) AM_WRITE(charbank_w)
69   AM_RANGE(0x2043, 0x2043) AM_WRITE(scotrsht_charbank_w)
7070   AM_RANGE(0x2044, 0x2044) AM_WRITE(ctrl_w)
71   AM_RANGE(0x3000, 0x3000) AM_WRITE(palettebank_w)
72   AM_RANGE(0x3100, 0x3100) AM_WRITE(soundlatch_w)
71   AM_RANGE(0x3000, 0x3000) AM_WRITE(scotrsht_palettebank_w)
72   AM_RANGE(0x3100, 0x3100) AM_WRITE(scotrsht_soundlatch_w)
7373   AM_RANGE(0x3200, 0x3200) AM_WRITENOP /* it writes 0, 1 */
7474   AM_RANGE(0x3100, 0x3100) AM_READ_PORT("DSW2")
7575   AM_RANGE(0x3200, 0x3200) AM_READ_PORT("DSW3")
r243627r243628
182182   /* basic machine hardware */
183183   MCFG_CPU_ADD("maincpu", M6809, 18432000/6)        /* 3.072 MHz */
184184   MCFG_CPU_PROGRAM_MAP(scotrsht_map)
185   MCFG_CPU_VBLANK_INT_DRIVER("screen", scotrsht_state, interrupt)
185   MCFG_CPU_VBLANK_INT_DRIVER("screen", scotrsht_state, scotrsht_interrupt)
186186
187187   MCFG_CPU_ADD("audiocpu", Z80, 18432000/6)        /* 3.072 MHz */
188188   MCFG_CPU_PROGRAM_MAP(scotrsht_sound_map)
r243627r243628
194194   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
195195   MCFG_SCREEN_SIZE(32*8, 32*8)
196196   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
197   MCFG_SCREEN_UPDATE_DRIVER(scotrsht_state, screen_update)
197   MCFG_SCREEN_UPDATE_DRIVER(scotrsht_state, screen_update_scotrsht)
198198   MCFG_SCREEN_PALETTE("palette")
199199
200200   MCFG_GFXDECODE_ADD("gfxdecode", "palette", scotrsht)
r243627r243628
240240   ROM_LOAD( "gx545_6301_8f.bin", 0x0400, 0x0100, CRC(c1c7cf58) SHA1(08452228bf13e43ce4a05806f79e9cd1542416f1) ) /* sprites lookup */
241241ROM_END
242242
243GAME( 1985, scotrsht, 0, scotrsht, scotrsht, driver_device, 0, ROT90,"Konami", "Scooter Shooter", GAME_SUPPORTS_SAVE )
243GAME( 1985, scotrsht, 0, scotrsht, scotrsht, driver_device, 0, ROT90,"Konami", "Scooter Shooter", 0 )
trunk/src/mame/includes/iqblock.h
r243627r243628
1111
1212   required_device<cpu_device> m_maincpu;
1313   required_device<gfxdecode_device> m_gfxdecode;
14
1514   required_shared_ptr<UINT8> m_rambase;
1615   required_shared_ptr<UINT8> m_bgvideoram;
1716   required_shared_ptr<UINT8> m_fgvideoram;
r243627r243628
2322
2423   DECLARE_WRITE8_MEMBER(iqblock_prot_w);
2524   DECLARE_WRITE8_MEMBER(grndtour_prot_w);
26   DECLARE_WRITE8_MEMBER(irqack_w);
27   DECLARE_WRITE8_MEMBER(fgvideoram_w);
28   DECLARE_WRITE8_MEMBER(bgvideoram_w);
29   DECLARE_WRITE8_MEMBER(fgscroll_w);
25   DECLARE_WRITE8_MEMBER(iqblock_irqack_w);
26   DECLARE_WRITE8_MEMBER(iqblock_fgvideoram_w);
27   DECLARE_WRITE8_MEMBER(iqblock_bgvideoram_w);
28   DECLARE_WRITE8_MEMBER(iqblock_fgscroll_w);
3029   DECLARE_WRITE8_MEMBER(port_C_w);
31
32   TIMER_DEVICE_CALLBACK_MEMBER(irq);
33
3430   DECLARE_DRIVER_INIT(grndtour);
3531   DECLARE_DRIVER_INIT(iqblock);
36   virtual void video_start();
37
3832   TILE_GET_INFO_MEMBER(get_bg_tile_info);
3933   TILE_GET_INFO_MEMBER(get_fg_tile_info);
40   
41   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
34   virtual void video_start();
35   UINT32 screen_update_iqblock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
36   TIMER_DEVICE_CALLBACK_MEMBER(iqblock_irq);
4237};
trunk/src/mame/includes/scotrsht.h
r243627r243628
33public:
44   scotrsht_state(const machine_config &mconfig, device_type type, const char *tag)
55      : driver_device(mconfig, type, tag),
6      m_maincpu(*this, "maincpu"),
7      m_audiocpu(*this, "audiocpu"),
8      m_gfxdecode(*this, "gfxdecode"),
9      m_palette(*this, "palette"),
106      m_colorram(*this, "colorram"),
117      m_videoram(*this, "videoram"),
128      m_spriteram(*this, "spriteram"),
13      m_scroll(*this, "scroll")  { }
9      m_scroll(*this, "scroll"),
10      m_maincpu(*this, "maincpu"),
11      m_audiocpu(*this, "audiocpu"),
12      m_gfxdecode(*this, "gfxdecode"),
13      m_palette(*this, "palette")  { }
1414
15   required_device<cpu_device> m_maincpu;
16   required_device<cpu_device> m_audiocpu;
17   required_device<gfxdecode_device> m_gfxdecode;
18   required_device<palette_device> m_palette;
19
15   int m_irq_enable;
2016   required_shared_ptr<UINT8> m_colorram;
2117   required_shared_ptr<UINT8> m_videoram;
2218   required_shared_ptr<UINT8> m_spriteram;
2319   required_shared_ptr<UINT8> m_scroll;
24
2520   tilemap_t *m_bg_tilemap;
26
27   int m_irq_enable;
2821   int m_charbank;
2922   int m_palette_bank;
30
3123   DECLARE_WRITE8_MEMBER(ctrl_w);
32   DECLARE_WRITE8_MEMBER(soundlatch_w);
33   DECLARE_WRITE8_MEMBER(videoram_w);
34   DECLARE_WRITE8_MEMBER(colorram_w);
35   DECLARE_WRITE8_MEMBER(charbank_w);
36   DECLARE_WRITE8_MEMBER(palettebank_w);
37
38   TILE_GET_INFO_MEMBER(get_bg_tile_info);
39   
40   INTERRUPT_GEN_MEMBER(interrupt);
41
24   DECLARE_WRITE8_MEMBER(scotrsht_soundlatch_w);
25   DECLARE_WRITE8_MEMBER(scotrsht_videoram_w);
26   DECLARE_WRITE8_MEMBER(scotrsht_colorram_w);
27   DECLARE_WRITE8_MEMBER(scotrsht_charbank_w);
28   DECLARE_WRITE8_MEMBER(scotrsht_palettebank_w);
29   TILE_GET_INFO_MEMBER(scotrsht_get_bg_tile_info);
4230   virtual void video_start();
4331   DECLARE_PALETTE_INIT(scotrsht);
44
45   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
32   UINT32 screen_update_scotrsht(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
33   INTERRUPT_GEN_MEMBER(scotrsht_interrupt);
4634   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
35   required_device<cpu_device> m_maincpu;
36   required_device<cpu_device> m_audiocpu;
37   required_device<gfxdecode_device> m_gfxdecode;
38   required_device<palette_device> m_palette;
4739};
trunk/src/mame/video/iqblock.c
r243627r243628
4141
4242   m_bg_tilemap->set_transparent_pen(0);
4343   m_fg_tilemap->set_scroll_cols(64);
44   
45   save_item(NAME(m_videoenable));
4644}
4745
4846
r243627r243628
5351
5452***************************************************************************/
5553
56WRITE8_MEMBER(iqblock_state::fgvideoram_w)
54WRITE8_MEMBER(iqblock_state::iqblock_fgvideoram_w)
5755{
5856   m_fgvideoram[offset] = data;
5957   m_fg_tilemap->mark_tile_dirty(offset);
6058}
6159
62WRITE8_MEMBER(iqblock_state::bgvideoram_w)
60WRITE8_MEMBER(iqblock_state::iqblock_bgvideoram_w)
6361{
6462   m_bgvideoram[offset] = data;
6563   m_bg_tilemap->mark_tile_dirty(offset & 0x7ff);
6664}
6765
68WRITE8_MEMBER(iqblock_state::fgscroll_w)
66WRITE8_MEMBER(iqblock_state::iqblock_fgscroll_w)
6967{
7068   m_fg_tilemap->set_scrolly(offset,data);
7169}
r243627r243628
7876
7977***************************************************************************/
8078
81UINT32 iqblock_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
79UINT32 iqblock_state::screen_update_iqblock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
8280{
8381   if (!m_videoenable) return 0;
8482   m_fg_tilemap->draw(screen, bitmap, cliprect, 0,0);
trunk/src/mame/video/scotrsht.c
r243627r243628
3434   }
3535}
3636
37WRITE8_MEMBER(scotrsht_state::videoram_w)
37WRITE8_MEMBER(scotrsht_state::scotrsht_videoram_w)
3838{
3939   m_videoram[offset] = data;
4040   m_bg_tilemap->mark_tile_dirty(offset);
4141}
4242
43WRITE8_MEMBER(scotrsht_state::colorram_w)
43WRITE8_MEMBER(scotrsht_state::scotrsht_colorram_w)
4444{
4545   m_colorram[offset] = data;
4646   m_bg_tilemap->mark_tile_dirty(offset);
4747}
4848
49WRITE8_MEMBER(scotrsht_state::charbank_w)
49WRITE8_MEMBER(scotrsht_state::scotrsht_charbank_w)
5050{
5151   if (m_charbank != (data & 0x01))
5252   {
r243627r243628
5757   /* other bits unknown */
5858}
5959
60WRITE8_MEMBER(scotrsht_state::palettebank_w)
60WRITE8_MEMBER(scotrsht_state::scotrsht_palettebank_w)
6161{
6262   if (m_palette_bank != ((data & 0x70) >> 4))
6363   {
r243627r243628
7272}
7373
7474
75TILE_GET_INFO_MEMBER(scotrsht_state::get_bg_tile_info)
75TILE_GET_INFO_MEMBER(scotrsht_state::scotrsht_get_bg_tile_info)
7676{
7777   int attr = m_colorram[tile_index];
7878   int code = m_videoram[tile_index] + (m_charbank << 9) + ((attr & 0x40) << 2);
r243627r243628
9090/* Same as Jailbreak + palette bank */
9191void scotrsht_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
9292{
93   for (int i = 0; i < m_spriteram.bytes(); i += 4)
93   UINT8 *spriteram = m_spriteram;
94   int i;
95
96   for (i = 0; i < m_spriteram.bytes(); i += 4)
9497   {
95      int attr = m_spriteram[i + 1];    // attributes = ?tyxcccc
96      int code = m_spriteram[i] + ((attr & 0x40) << 2);
98      int attr = spriteram[i + 1];    // attributes = ?tyxcccc
99      int code = spriteram[i] + ((attr & 0x40) << 2);
97100      int color = (attr & 0x0f) + m_palette_bank * 16;
98101      int flipx = attr & 0x10;
99102      int flipy = attr & 0x20;
100      int sx = m_spriteram[i + 2] - ((attr & 0x80) << 1);
101      int sy = m_spriteram[i + 3];
103      int sx = spriteram[i + 2] - ((attr & 0x80) << 1);
104      int sy = spriteram[i + 3];
102105
103106      if (flip_screen())
104107      {
r243627r243628
116119
117120void scotrsht_state::video_start()
118121{
119   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(scotrsht_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
122   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(scotrsht_state::scotrsht_get_bg_tile_info),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
120123
121124   m_bg_tilemap->set_scroll_cols(64);
122   
123   save_item(NAME(m_irq_enable));
124   save_item(NAME(m_charbank));
125   save_item(NAME(m_palette_bank));
126125}
127126
128UINT32 scotrsht_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
127UINT32 scotrsht_state::screen_update_scotrsht(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
129128{
130   for (int col = 0; col < 32; col++)
129   int col;
130
131   for (col = 0; col < 32; col++)
131132      m_bg_tilemap->set_scrolly(col, m_scroll[col]);
132133
133134   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
trunk/src/osd/modules/debugger/osx/deviceinfoviewer.m
r243627r243628
233233   return self;
234234}
235235
236@end
No newline at end of file
236@end
trunk/src/osd/modules/debugger/osx/memoryview.m
r243627r243628
3737   if (action == @selector(showChunkSize:))
3838   {
3939      [item setState:((tag == memview->bytes_per_chunk()) ? NSOnState : NSOffState)];
40      return YES;
4041   }
4142   else if (action == @selector(showPhysicalAddresses:))
4243   {
4344      [item setState:((tag == memview->physical()) ? NSOnState : NSOffState)];
45      return YES;
4446   }
4547   else if (action == @selector(showReverseView:))
4648   {
4749      [item setState:((tag == memview->reverse()) ? NSOnState : NSOffState)];
50      return YES;
4851   }
4952   else if (action == @selector(showReverseViewToggle:))
5053   {
5154      [item setState:(memview->reverse() ? NSOnState : NSOffState)];
55      return YES;
5256   }
53   return [super validateMenuItem:item];
57   else if (action == @selector(changeBytesPerLine:))
58   {
59      return (memview->chunks_per_row() + [item tag]) > 0;
60   }
61   else
62   {
63      return [super validateMenuItem:item];
64   }
5465}
5566
5667


Previous 199869 Revisions Next


© 1997-2024 The MAME Team