Previous 15994 Revisions Next

r8975 Tuesday 31st August, 2010 at 12:33:12 UTC by Angelo Salese
[MZ-2500]: Hooked up dictionary and phone roms
[src/mess/drivers]mz2500.c

src/mess/drivers/mz2500.c
r8974r8975
1/***************************************************************************
1/********************************************************************************************************************************
22
33    Sharp MZ-2500 (c) 1985 Sharp Corporation
44
55    driver by Angelo Salese
66
77   TODO:
8   - 4096 color mode;
9   - Kanji text is cutted in half when font_size is 1, different data used?
10     (check Back to the Future);
11   - Implement unlatched ROMs (Phone and Dictionary);
8   - Kanji text is cutted in half when font_size is 1 / interlace is disabled, different data used? (check Back to the Future);
129   - Find real CRTC registers
1310   - Some games doesn't set proper registers if you have interlace enabled, is there any real reason?
1411   - Implement external ROM hook-up;
r8974r8975
3027   - Multiplan: hangs after you set the RTC;
3128   - Murder Club: has lots of CG artifacts;
3229   - Penguin Kun Wars: has a bug with window effects ("Push space or trigger" msg on the bottom"), needs investigation;
33   - Relics: doesn't boot, bad dump?
30   - Relics: doesn't boot, sets fdc register 0xdc bit 2 to 1
3431   - Super MZ Demo 1: Hangs at the logo "roar".
3532   - Telephone Soft: shows garbage with the CG layer;
3633   - The Black Onyx: hangs at the title screen, background should also animate;
r8974r8975
4946    0x76000-0x77fff NOP (0x3b)
5047    0x78000-0x7ffff Phone ROM (0x3c-0x3f)
5148
52****************************************************************************/
49********************************************************************************************************************************/
5350
5451#include "emu.h"
5552#include "cpu/z80/z80.h"
r8974r8975
6764/* machine stuff */
6865static UINT8 bank_val[8],bank_addr;
6966static UINT8 irq_sel,irq_vector[4],irq_mask[4];
70static UINT8 kanji_bank;
67static UINT8 kanji_bank,dic_bank;
7168static UINT8 fdc_reverse;
7269static UINT8 key_mux;
73static UINT8 cg_reg_index;
74static UINT8 cg_reg[0x20];
75static UINT8 clut16[0x10];
76static UINT16 clut256[0x100];
77static UINT8 cg_mask;
78static UINT8 wid_40;
79static UINT16 cg_vs,cg_ve,cg_hs,cg_he; //CG window parameters
80static UINT8 cg_latch[4];
8170
8271#define WRAM_RESET 0
8372#define IPL_RESET 1
r8974r8975
9382static UINT8 text_reg[0x100], text_reg_index;
9483static UINT8 text_col_size, text_font_reg;
9584static UINT8 pal_select;
85static UINT8 wid_40;
86static UINT16 cg_vs,cg_ve,cg_hs,cg_he; //CG window parameters
87static UINT8 cg_latch[4];
88static UINT8 cg_reg_index;
89static UINT8 cg_reg[0x20];
90static UINT8 clut16[0x10];
91static UINT16 clut256[0x100];
92static UINT8 cg_mask;
9693
9794static VIDEO_START( mz2500 )
9895{
r8974r8975
337334   cg_interlace = text_font_reg ? 1 : 2;
338335
339336   //popmessage("%d %d %d %d",cg_hs,cg_he,cg_vs,cg_ve);
340   popmessage("%d %d",cg_vs,cg_ve);
341337
342338   for(y=0;y<200;y++)
343339   {
r8974r8975
543539         }
544540      }
545541      break;
542      case 0x3a:
543      {
544         UINT8 *dic_rom = memory_region(machine, "dictionary");
545
546         return dic_rom[(offset & 0x1fff) + ((dic_bank & 0x1f)*0x2000)];
547      }
548      break;
549      case 0x3c:
550      case 0x3d:
551      case 0x3e:
552      case 0x3f:
553      {
554         UINT8 *phone_rom = memory_region(machine, "phone");
555
556         return phone_rom[offset+(cur_bank & 3)*0x2000];
557      }
558      break;
546559      default: return ram[offset+cur_bank*0x2000];
547560   }
548561
r8974r8975
653666         }
654667      }
655668      break;
669      case 0x3a:
670      {
671         // DIC ROM, WRITENOP
672         break;
673      }
674      case 0x3c:
675      case 0x3d:
676      case 0x3e:
677      case 0x3f:
678      {
679         // PHONE ROM, WRITENOP
680         break;
681      }
656682      default: ram[offset+cur_bank*0x2000] = data; break;
657683   }
658684}
r8974r8975
719745   kanji_bank = data;
720746}
721747
748static WRITE8_HANDLER( mz2500_dictionary_bank_w )
749{
750   dic_bank = data;
751}
752
722753/* 0xf4 - 0xf7 all returns vblank / hblank states */
723754static READ8_HANDLER( mz2500_crtc_hvblank_r )
724755{
r8974r8975
12131244//  AM_RANGE(0xca, 0xca) AM_READWRITE(voice_r,voice_w)
12141245//  AM_RANGE(0xcc, 0xcc) AM_READWRITE(calendar_r,calendar_w)
12151246   AM_RANGE(0xcc, 0xcd) AM_NOP
1216//  AM_RANGE(0xce, 0xce) AM_WRITE(mz2500_dictionary_bank_w)
1217   AM_RANGE(0xce, 0xce) AM_NOP
1247   AM_RANGE(0xce, 0xce) AM_WRITE(mz2500_dictionary_bank_w)
12181248   AM_RANGE(0xcf, 0xcf) AM_WRITE(mz2500_kanji_bank_w)
12191249   AM_RANGE(0xd8, 0xdb) AM_DEVREADWRITE("mb8877a", mz2500_wd17xx_r, mz2500_wd17xx_w)
12201250   AM_RANGE(0xdc, 0xdd) AM_WRITE(mz2500_fdc_w)
r8974r8975
17401770ROM_START( mz2500 )
17411771   ROM_REGION( 0x80000, "maincpu", ROMREGION_ERASEFF )
17421772
1773   ROM_REGION( 0x2000, "pcg", ROMREGION_ERASEFF )
1774
17431775   ROM_REGION( 0x08000, "ipl", 0 )
17441776   ROM_LOAD( "ipl.rom", 0x00000, 0x8000, CRC(7a659f20) SHA1(ccb3cfdf461feea9db8d8d3a8815f7e345d274f7) )
17451777
r8974r8975
17561788   ROM_REGION( 0x40000, "dictionary", 0 )
17571789   ROM_LOAD( "dict.rom", 0x00000, 0x40000, CRC(aa957c2b) SHA1(19a5ba85055f048a84ed4e8d471aaff70fcf0374) )
17581790
1759   ROM_REGION( 0x2000, "pcg", ROMREGION_ERASEFF )
1791   ROM_REGION( 0x8000, "rom", ROMREGION_ERASEFF ) //iplpro
1792   ROM_LOAD( "sasi.rom", 0x00000, 0x8000, CRC(a7bf39ce) SHA1(3f4a237fc4f34bac6fe2bbda4ce4d16d42400081) )
17601793
1761   ROM_REGION( 0x8000, "rom", ROMREGION_ERASEFF )
1762   ROM_LOAD( "file.rom", 0x00000, 0x8000, CRC(a7bf39ce) SHA1(3f4a237fc4f34bac6fe2bbda4ce4d16d42400081) ) //optional?
1794   ROM_REGION( 0x8000, "phone", ROMREGION_ERASEFF )
1795   ROM_LOAD( "phone.rom", 0x00000, 0x4000, CRC(8e49e4dc) SHA1(2589f0c95028037a41ca32a8fd799c5f085dab51) )
17631796ROM_END
17641797
17651798/* Driver */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team