Previous 199869 Revisions Next

r20286 Tuesday 15th January, 2013 at 23:14:05 UTC by Angelo Salese
Cleaned-up Sharp X1
[src/mess/drivers]mz2500.c x1.c
[src/mess/includes]x1.h

trunk/src/mess/includes/x1.h
r20285r20286
8282   m_ctc(*this, "ctc")
8383   { }
8484
85   DECLARE_READ8_MEMBER(x1_mem_r);
86   DECLARE_WRITE8_MEMBER(x1_mem_w);
87   DECLARE_READ8_MEMBER(x1_io_r);
88   DECLARE_WRITE8_MEMBER(x1_io_w);
89   DECLARE_READ8_MEMBER(x1_sub_io_r);
90   DECLARE_WRITE8_MEMBER(x1_sub_io_w);
91   DECLARE_READ8_MEMBER(x1_rom_r);
92   DECLARE_WRITE8_MEMBER(x1_rom_w);
93   DECLARE_WRITE8_MEMBER(x1_rom_bank_0_w);
94   DECLARE_WRITE8_MEMBER(x1_rom_bank_1_w);
95   DECLARE_READ8_MEMBER(x1_fdc_r);
96   DECLARE_WRITE8_MEMBER(x1_fdc_w);
97   DECLARE_READ8_MEMBER(x1_pcg_r);
98   DECLARE_WRITE8_MEMBER(x1_pcg_w);
99   DECLARE_WRITE8_MEMBER(x1_pal_r_w);
100   DECLARE_WRITE8_MEMBER(x1_pal_g_w);
101   DECLARE_WRITE8_MEMBER(x1_pal_b_w);
102   DECLARE_WRITE8_MEMBER(x1_ex_gfxram_w);
103   DECLARE_WRITE8_MEMBER(x1_scrn_w);
104   DECLARE_WRITE8_MEMBER(x1_pri_w);
105   DECLARE_WRITE8_MEMBER(x1_6845_w);
106   DECLARE_READ8_MEMBER(x1_kanji_r);
107   DECLARE_WRITE8_MEMBER(x1_kanji_w);
108   DECLARE_READ8_MEMBER(x1_emm_r);
109   DECLARE_WRITE8_MEMBER(x1_emm_w);
110   DECLARE_READ8_MEMBER(x1turbo_pal_r);
111   DECLARE_READ8_MEMBER(x1turbo_txpal_r);
112   DECLARE_READ8_MEMBER(x1turbo_txdisp_r);
113   DECLARE_READ8_MEMBER(x1turbo_gfxpal_r);
114   DECLARE_WRITE8_MEMBER(x1turbo_pal_w);
115   DECLARE_WRITE8_MEMBER(x1turbo_txpal_w);
116   DECLARE_WRITE8_MEMBER(x1turbo_txdisp_w);
117   DECLARE_WRITE8_MEMBER(x1turbo_gfxpal_w);
118   DECLARE_WRITE8_MEMBER(x1turbo_blackclip_w);
119   DECLARE_READ8_MEMBER(x1turbo_mem_r);
120   DECLARE_WRITE8_MEMBER(x1turbo_mem_w);
121   DECLARE_READ8_MEMBER(x1turbo_io_r);
122   DECLARE_WRITE8_MEMBER(x1turbo_io_w);
123   DECLARE_WRITE8_MEMBER(x1turboz_4096_palette_w);
124   DECLARE_READ8_MEMBER(x1turboz_blackclip_r);
125   DECLARE_READ8_MEMBER(x1turbo_bank_r);
126   DECLARE_WRITE8_MEMBER(x1turbo_bank_w);
127   DECLARE_READ8_MEMBER(x1_porta_r);
128   DECLARE_READ8_MEMBER(x1_portb_r);
129   DECLARE_READ8_MEMBER(x1_portc_r);
130   DECLARE_WRITE8_MEMBER(x1_porta_w);
131   DECLARE_WRITE8_MEMBER(x1_portb_w);
132   DECLARE_WRITE8_MEMBER(x1_portc_w);
85   required_device<cpu_device> m_x1_cpu;
86   required_device<cassette_image_device> m_cass;
87   required_device<mb8877_device> m_fdc;
88   required_device<mc6845_device> m_crtc;
89   required_device<z80ctc_device> m_ctc;
13390
13491   UINT8 *m_tvram;
13592   UINT8 *m_avram;
13693   UINT8 *m_kvram;
94   UINT8 *m_ipl_rom;
95   UINT8 *m_work_ram;
96   UINT8 *m_emm_ram;
97   UINT8 *m_pcg_ram;
98   UINT8 *m_cg_rom;
99   UINT8 *m_kanji_rom;
137100   int m_xstart,m_ystart;
138101   UINT8 m_hres_320;
139102   UINT8 m_io_switch;
r20285r20286
189152   UINT8 check_keyboard_shift();
190153   UINT16 check_keyboard_press();
191154
192   required_device<cpu_device> m_x1_cpu;
193   required_device<cassette_image_device> m_cass;
194   required_device<mb8877_device> m_fdc;
195   required_device<mc6845_device> m_crtc;
196   required_device<z80ctc_device> m_ctc;
155   DECLARE_READ8_MEMBER(x1_mem_r);
156   DECLARE_WRITE8_MEMBER(x1_mem_w);
157   DECLARE_READ8_MEMBER(x1_io_r);
158   DECLARE_WRITE8_MEMBER(x1_io_w);
159   DECLARE_READ8_MEMBER(x1_sub_io_r);
160   DECLARE_WRITE8_MEMBER(x1_sub_io_w);
161   DECLARE_READ8_MEMBER(x1_rom_r);
162   DECLARE_WRITE8_MEMBER(x1_rom_w);
163   DECLARE_WRITE8_MEMBER(x1_rom_bank_0_w);
164   DECLARE_WRITE8_MEMBER(x1_rom_bank_1_w);
165   DECLARE_READ8_MEMBER(x1_fdc_r);
166   DECLARE_WRITE8_MEMBER(x1_fdc_w);
167   DECLARE_READ8_MEMBER(x1_pcg_r);
168   DECLARE_WRITE8_MEMBER(x1_pcg_w);
169   DECLARE_WRITE8_MEMBER(x1_pal_r_w);
170   DECLARE_WRITE8_MEMBER(x1_pal_g_w);
171   DECLARE_WRITE8_MEMBER(x1_pal_b_w);
172   DECLARE_WRITE8_MEMBER(x1_ex_gfxram_w);
173   DECLARE_WRITE8_MEMBER(x1_scrn_w);
174   DECLARE_WRITE8_MEMBER(x1_pri_w);
175   DECLARE_WRITE8_MEMBER(x1_6845_w);
176   DECLARE_READ8_MEMBER(x1_kanji_r);
177   DECLARE_WRITE8_MEMBER(x1_kanji_w);
178   DECLARE_READ8_MEMBER(x1_emm_r);
179   DECLARE_WRITE8_MEMBER(x1_emm_w);
180   DECLARE_READ8_MEMBER(x1turbo_pal_r);
181   DECLARE_READ8_MEMBER(x1turbo_txpal_r);
182   DECLARE_READ8_MEMBER(x1turbo_txdisp_r);
183   DECLARE_READ8_MEMBER(x1turbo_gfxpal_r);
184   DECLARE_WRITE8_MEMBER(x1turbo_pal_w);
185   DECLARE_WRITE8_MEMBER(x1turbo_txpal_w);
186   DECLARE_WRITE8_MEMBER(x1turbo_txdisp_w);
187   DECLARE_WRITE8_MEMBER(x1turbo_gfxpal_w);
188   DECLARE_WRITE8_MEMBER(x1turbo_blackclip_w);
189   DECLARE_READ8_MEMBER(x1turbo_mem_r);
190   DECLARE_WRITE8_MEMBER(x1turbo_mem_w);
191   DECLARE_READ8_MEMBER(x1turbo_io_r);
192   DECLARE_WRITE8_MEMBER(x1turbo_io_w);
193   DECLARE_WRITE8_MEMBER(x1turboz_4096_palette_w);
194   DECLARE_READ8_MEMBER(x1turboz_blackclip_r);
195   DECLARE_READ8_MEMBER(x1turbo_bank_r);
196   DECLARE_WRITE8_MEMBER(x1turbo_bank_w);
197   DECLARE_READ8_MEMBER(x1_porta_r);
198   DECLARE_READ8_MEMBER(x1_portb_r);
199   DECLARE_READ8_MEMBER(x1_portc_r);
200   DECLARE_WRITE8_MEMBER(x1_porta_w);
201   DECLARE_WRITE8_MEMBER(x1_portb_w);
202   DECLARE_WRITE8_MEMBER(x1_portc_w);
197203   DECLARE_DRIVER_INIT(x1_kanji);
198204   DECLARE_MACHINE_START(x1);
199205   DECLARE_MACHINE_RESET(x1);
trunk/src/mess/drivers/x1.c
r20285r20286
338338         int width = BIT(m_avram[((x+y*x_size)+mc6845_start_addr) & 0x7ff], 7);
339339         int height = BIT(m_avram[((x+y*x_size)+mc6845_start_addr) & 0x7ff], 6);
340340         int pcg_bank = BIT(m_avram[((x+y*x_size)+mc6845_start_addr) & 0x7ff], 5);
341         UINT8 *gfx_data = machine.root_device().memregion(pcg_bank ? "pcg" : "cgrom")->base();
341         UINT8 *gfx_data = pcg_bank ? m_pcg_ram : m_cg_rom; //machine.root_device().memregion(pcg_bank ? "pcg" : "cgrom")->base();
342342         int knj_enable = 0;
343343         int knj_side = 0;
344344         int knj_bank = 0;
r20285r20286
352352            knj_bank = m_kvram[((x+y*x_size)+mc6845_start_addr) & 0x7ff] & 0x0f;
353353            if(knj_enable)
354354            {
355               gfx_data = memregion("kanji")->base();
355               gfx_data = m_kanji_rom;
356356               tile = ((tile + (knj_bank << 8)) << 1) + (knj_side & 1);
357357            }
358358         }
r20285r20286
11191119
11201120   if(addr == 0 && m_scrn_reg.pcg_mode) // Kanji ROM read, X1Turbo only
11211121   {
1122      gfx_data = memregion("kanji")->base();
1122      gfx_data = m_kanji_rom;
11231123      pcg_offset = (m_tvram[check_chr_addr()]+(m_kvram[check_chr_addr()]<<8)) & 0xfff;
11241124      pcg_offset*=0x20;
11251125      pcg_offset+=(offset & 0x0f);
r20285r20286
11321132      UINT8 y_char_size;
11331133
11341134      /* addr == 0 reads from the ANK rom */
1135      gfx_data = memregion((addr == 0) ? "cgrom" : "pcg")->base();
1135      gfx_data = addr == 0 ? m_cg_rom : m_pcg_ram;
11361136      y_char_size = ((m_crtc_vreg[9]+1) > 8) ? 8 : m_crtc_vreg[9]+1;
11371137      if(y_char_size == 0) { y_char_size = 1; }
11381138      pcg_offset = m_tvram[get_pcg_addr(m_crtc_vreg[1], y_char_size)]*8;
r20285r20286
11471147WRITE8_MEMBER( x1_state::x1_pcg_w )
11481148{
11491149   int addr,pcg_offset;
1150   UINT8 *PCG_RAM = memregion("pcg")->base();
11511150
11521151   addr = (offset & 0x300) >> 8;
11531152
r20285r20286
11631162         pcg_offset = m_tvram[check_pcg_addr()]*8;
11641163         pcg_offset+= (offset & 0xe) >> 1;
11651164         pcg_offset+=((addr-1)*0x800);
1166         PCG_RAM[pcg_offset] = data;
1165         m_pcg_ram[pcg_offset] = data;
11671166
11681167         pcg_offset &= 0x7ff;
11691168
1170         machine().gfx[1]->mark_dirty(pcg_offset >> 3);
1169         machine().gfx[3]->mark_dirty(pcg_offset >> 3);
11711170      }
11721171      else // Compatible Mode
11731172      {
r20285r20286
11801179         pcg_offset+= machine().primary_screen->vpos() & (y_char_size-1);
11811180         pcg_offset+= ((addr-1)*0x800);
11821181
1183         PCG_RAM[pcg_offset] = data;
1182         m_pcg_ram[pcg_offset] = data;
11841183
11851184         pcg_offset &= 0x7ff;
11861185
1187         machine().gfx[1]->mark_dirty(pcg_offset >> 3);
1186         machine().gfx[3]->mark_dirty(pcg_offset >> 3);
11881187      }
11891188   }
11901189}
r20285r20286
14421441
14431442READ8_MEMBER( x1_state::x1_kanji_r )
14441443{
1445   UINT8 *kanji_rom = memregion("kanji")->base();
14461444   UINT8 res;
14471445
1448   res = kanji_rom[jis_convert(m_kanji_addr & 0xfff0)+(offset*0x10)+(m_kanji_addr & 0xf)];
1446   res = m_kanji_rom[jis_convert(m_kanji_addr & 0xfff0)+(offset*0x10)+(m_kanji_addr & 0xf)];
14491447
14501448   if(offset == 1)
14511449      m_kanji_addr_latch++;
r20285r20286
14851483
14861484READ8_MEMBER( x1_state::x1_emm_r )
14871485{
1488   UINT8 *emm_ram = memregion("emm")->base();
14891486   UINT8 res;
14901487
14911488   if(offset & ~3)
r20285r20286
15011498
15021499   if(offset == 3)
15031500   {
1504      res = emm_ram[m_emm_addr];
1501      res = m_emm_ram[m_emm_addr];
15051502      m_emm_addr++;
15061503   }
15071504
r20285r20286
15101507
15111508WRITE8_MEMBER( x1_state::x1_emm_w )
15121509{
1513   UINT8 *emm_ram = memregion("emm")->base();
1514
15151510   if(offset & ~3)
15161511   {
15171512      printf("Warning: write EMM BASIC area [%02x] %02x\n",offset & 0xff,data);
r20285r20286
15241519      case 1: m_emm_addr = (m_emm_addr & 0xff00ff) | (data << 8);   break;
15251520      case 2: m_emm_addr = (m_emm_addr & 0x00ffff) | (data << 16);  break; //TODO: this has a max size limit, check exactly how much
15261521      case 3:
1527         emm_ram[m_emm_addr] = data;
1522         m_emm_ram[m_emm_addr] = data;
15281523         m_emm_addr++;
15291524         break;
15301525   }
r20285r20286
15551550/* TODO: waitstate penalties */
15561551READ8_MEMBER( x1_state::x1_mem_r )
15571552{
1558   UINT8 *wram = memregion("wram")->base();
1559
15601553   if((offset & 0x8000) == 0 && (m_ram_bank == 0))
15611554   {
1562      UINT8 *ipl = memregion("ipl")->base();
1563      return ipl[offset]; //ROM
1555      return m_ipl_rom[offset]; //ROM
15641556   }
15651557
1566   return wram[offset]; //RAM
1558   return m_work_ram[offset]; //RAM
15671559}
15681560
15691561WRITE8_MEMBER( x1_state::x1_mem_w )
15701562{
1571   UINT8 *wram = memregion("wram")->base();
1572
1573   wram[offset] = data; //RAM
1563   m_work_ram[offset] = data; //RAM
15741564}
15751565
15761566READ8_MEMBER( x1_state::x1turbo_mem_r )
15771567{
15781568   if((m_ex_bank & 0x10) == 0)
1579   {
1580      UINT8 *wram = memregion("wram")->base();
1569      return m_work_ram[offset+((m_ex_bank & 0xf)*0x10000)];
15811570
1582      return wram[offset+((m_ex_bank & 0xf)*0x10000)];
1583   }
1584
15851571   return x1_mem_r(space,offset);
15861572}
15871573
15881574WRITE8_MEMBER( x1_state::x1turbo_mem_w )
15891575{
15901576   if((m_ex_bank & 0x10) == 0)
1591   {
1592      UINT8 *wram = memregion("wram")->base();
1593
1594      wram[offset+((m_ex_bank & 0xf)*0x10000)] = data; //RAM
1595   }
1577      m_work_ram[offset+((m_ex_bank & 0xf)*0x10000)] = data; //RAM
15961578   else
15971579      x1_mem_w(space,offset,data);
15981580}
r20285r20286
22412223   8*16
22422224};
22432225
2244static const gfx_layout x1_pcg_8x8 =
2245{
2246   8,8,
2247   RGN_FRAC(1,3),
2248   3,
2249   { RGN_FRAC(2,3),RGN_FRAC(1,3),RGN_FRAC(0,3) },
2250   { 0, 1, 2, 3, 4, 5, 6, 7 },
2251   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
2252   8*8
2253};
2254
22552226static const gfx_layout x1_chars_16x16 =
22562227{
22572228   8,16,
r20285r20286
22662237/* decoded for debugging purpose, this will be nuked in the end... */
22672238static GFXDECODE_START( x1 )
22682239   GFXDECODE_ENTRY( "cgrom",   0x00000, x1_chars_8x8,    0, 1 )
2269   GFXDECODE_ENTRY( "pcg",     0x00000, x1_pcg_8x8,      0, 1 )
22702240   GFXDECODE_ENTRY( "font",    0x00000, x1_chars_8x16,   0, 1 )
22712241   GFXDECODE_ENTRY( "kanji",   0x00000, x1_chars_16x16,  0, 1 )
2242//   GFXDECODE_ENTRY( "pcg",     0x00000, x1_pcg_8x8,      0, 1 )
22722243GFXDECODE_END
22732244
22742245/*************************************
r20285r20286
24572428MACHINE_RESET_MEMBER(x1_state,x1)
24582429{
24592430   //UINT8 *ROM = machine().root_device().memregion("x1_cpu")->base();
2460   UINT8 *PCG_RAM = memregion("pcg")->base();
24612431   int i;
24622432
24632433   memset(m_gfx_bitmap_ram,0x00,0xc000*2);
24642434
24652435   for(i=0;i<0x1800;i++)
24662436   {
2467      PCG_RAM[i] = 0;
2468      machine().gfx[1]->mark_dirty(i >> 3);
2437      m_pcg_ram[i] = 0;
2438      machine().gfx[3]->mark_dirty(i >> 3);
24692439   }
24702440
24712441   m_is_turbo = 0;
r20285r20286
25082478   m_scrn_reg.blackclip = 0;
25092479}
25102480
2481static const gfx_layout x1_pcg_8x8 =
2482{
2483   8,8,
2484   0x100,
2485   3,
2486   { 0x1000*8,0x800*8, 0 },
2487   { 0, 1, 2, 3, 4, 5, 6, 7 },
2488   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
2489   8*8
2490};
2491
25112492MACHINE_START_MEMBER(x1_state,x1)
25122493{
25132494   /* set up RTC */
r20285r20286
25252506
25262507      m_rtc_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x1_state::x1_rtc_increment),this));
25272508   }
2509
2510   m_ipl_rom = memregion("ipl")->base();
2511   m_work_ram = auto_alloc_array_clear(machine(), UINT8, 0x10000*0x10);
2512   m_emm_ram = auto_alloc_array_clear(machine(), UINT8, 0x1000000);
2513   m_pcg_ram = auto_alloc_array_clear(machine(), UINT8, 0x1800);
2514   m_cg_rom = memregion("cgrom")->base();
2515   m_kanji_rom = memregion("kanji")->base();
2516
2517   state_save_register_global_pointer(machine(), m_work_ram, 0x10000*0x10);
2518   state_save_register_global_pointer(machine(), m_emm_ram, 0x1000000);
2519   state_save_register_global_pointer(machine(), m_pcg_ram, 0x1800);
2520
2521   machine().gfx[3] = auto_alloc(machine(), gfx_element(machine(), x1_pcg_8x8, (UINT8 *)m_pcg_ram, 1, 0));
25282522}
25292523
25302524PALETTE_INIT_MEMBER(x1_state,x1)
r20285r20286
26442638 *************************************/
26452639
26462640   ROM_START( x1 )
2647   ROM_REGION( 0x10000, "x1_cpu", ROMREGION_ERASEFF )
2648
26492641   ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF )
26502642   ROM_LOAD( "ipl.x1", 0x0000, 0x1000, CRC(7b28d9de) SHA1(c4db9a6e99873808c8022afd1c50fef556a8b44d) )
26512643
2652   ROM_REGION( 0x10000, "wram", ROMREGION_ERASE00 )
2653
26542644   ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu"
26552645   ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP )
26562646
2657   ROM_REGION( 0x1000000, "emm", ROMREGION_ERASEFF )
2658
2659   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
2660
26612647   ROM_REGION(0x2000, "font", 0) //TODO: this contains 8x16 charset only, maybe it's possible that it derivates a 8x8 charset by skipping gfx lines?
26622648   ROM_LOAD( "ank.fnt", 0x0000, 0x2000, BAD_DUMP CRC(19689fbd) SHA1(0d4e072cd6195a24a1a9b68f1d37500caa60e599) )
26632649
r20285r20286
26742660ROM_END
26752661
26762662ROM_START( x1turbo )
2677   ROM_REGION( 0x10000, "x1_cpu", ROMREGION_ERASEFF )
2678
26792663   ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF )
26802664   ROM_LOAD( "ipl.x1t", 0x0000, 0x8000, CRC(2e8b767c) SHA1(44620f57a25f0bcac2b57ca2b0f1ebad3bf305d3) )
26812665
2682   ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASE00 )
2683
26842666   ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu"
26852667   ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP )
26862668
2687   ROM_REGION( 0x1000000, "emm", ROMREGION_ERASEFF )
2688
2689   ROM_REGION( 0x10000*2, "bank_ram", ROMREGION_ERASEFF )
2690
2691   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
2692
26932669   ROM_REGION(0x2000, "font", 0) //TODO: this contains 8x16 charset only, maybe it's possible that it derivates a 8x8 charset by skipping gfx lines?
26942670   ROM_LOAD( "ank.fnt", 0x0000, 0x2000, CRC(19689fbd) SHA1(0d4e072cd6195a24a1a9b68f1d37500caa60e599) )
26952671
r20285r20286
27102686ROM_END
27112687
27122688ROM_START( x1turbo40 )
2713   ROM_REGION( 0x10000, "x1_cpu", ROMREGION_ERASEFF )
2714
27152689   ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF )
27162690   ROM_LOAD( "ipl.bin", 0x0000, 0x8000, CRC(112f80a2) SHA1(646cc3fb5d2d24ff4caa5167b0892a4196e9f843) )
27172691
2718   ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASE00 )
2719
27202692   ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu"
27212693   ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP )
27222694
2723   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
2724
2725   ROM_REGION( 0x1000000, "emm", ROMREGION_ERASEFF )
2726
27272695   ROM_REGION(0x2000, "font", 0) //TODO: this contains 8x16 charset only, maybe it's possible that it derivates a 8x8 charset by skipping gfx lines?
27282696   ROM_LOAD( "ank.fnt", 0x0000, 0x2000, CRC(19689fbd) SHA1(0d4e072cd6195a24a1a9b68f1d37500caa60e599) )
27292697
trunk/src/mess/drivers/mz2500.c
r20285r20286
925925         else //PCG RAM
926926         {
927927            m_pcg_ram[offset] = data;
928            //if((offset & 0x1800) == 0x0000)
929            //   machine().gfx[3]->mark_dirty((offset) >> 3);
930            //else
931            //   machine().gfx[4]->mark_dirty((offset & 0x7ff) >> 3);
928            if((offset & 0x1800) == 0x0000)
929               machine().gfx[3]->mark_dirty((offset) >> 3);
930            else
931               machine().gfx[4]->mark_dirty((offset & 0x7ff) >> 3);
932932         }
933933         break;
934934      }
r20285r20286
17461746   8, 8,
17471747   0x100,
17481748   3,
1749   { RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4) },
1749   { 0x1800*8, 0x1000*8, 0x800*8 },
17501750   { 0, 1, 2, 3, 4, 5, 6, 7 },
17511751   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
17521752   8 * 8
r20285r20286
17701770   state_save_register_global_pointer(machine(), m_emm_ram, 0x100000);
17711771
17721772   /* TODO: gfx[4] crashes as per now */
1773//   machine().gfx[3] = auto_alloc(machine(), gfx_element(machine(), mz2500_pcg_layout_1bpp, (UINT8 *)m_pcg_ram, 0x10, 0));
1774//   machine().gfx[4] = auto_alloc(machine(), gfx_element(machine(), mz2500_pcg_layout_3bpp, (UINT8 *)m_pcg_ram, 4, 0));
1773   machine().gfx[3] = auto_alloc(machine(), gfx_element(machine(), mz2500_pcg_layout_1bpp, (UINT8 *)m_pcg_ram, 0x10, 0));
1774   machine().gfx[4] = auto_alloc(machine(), gfx_element(machine(), mz2500_pcg_layout_3bpp, (UINT8 *)m_pcg_ram, 4, 0));
17751775}
17761776
17771777void mz2500_state::machine_reset()

Previous 199869 Revisions Next


© 1997-2024 The MAME Team