Previous 15994 Revisions Next

r5743 Wednesday 16th September, 2009 at 14:04:56 UTC by Angelo Salese
[X1]: Hooked up kanji ports, basically demostrates that the current kanji rom is bad
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r5742r5743
10531053   turbo_reg.gfx_pal = data;
10541054}
10551055
1056static UINT8 kanji_addr_l,kanji_addr_h,kanji_count;
1057static UINT32 kanji_addr;
1058
1059/*
1060 *   FIXME: recheck this once that the kanji rom is redumped, it's confirmed bad for the following reasons:
1061 *   - A game lets you type stuff that's typed with this function, the index doesn't match with the typed char;
1062 *   - It search for chars that are out of the rom range;
1063 */
1064static READ8_HANDLER( x1_kanji_r )
1065{
1066   UINT8 *kanji_rom = memory_region(space->machine, "cgrom");
1067   UINT8 res;
1068
1069   //res = 0;
1070
1071   //printf("%08x\n",kanji_addr*0x20);
1072
1073   res = kanji_rom[(kanji_addr*0x20)+(kanji_count)+0x2800];
1074   kanji_count++;
1075   kanji_count&=0x1f;
1076
1077   //printf("%04x R\n",offset);
1078
1079   return res;
1080}
1081
1082static WRITE8_HANDLER( x1_kanji_w )
1083{
1084   //printf("%04x %02x W\n",offset,data);
1085   switch(offset)
1086   {
1087      case 0: kanji_addr_l = (data & 0xff); break;
1088      case 1: kanji_addr_h = (data & 0xff); kanji_count = 0; break;
1089      case 2:
1090         if(data)
1091         {
1092            kanji_addr = (kanji_addr_h<<8) | (kanji_addr_l);
1093            kanji_addr &= 0x3fff; //<- temp kludge until the rom is redumped.
1094            //printf("%08x\n",kanji_addr);
1095            //kanji_addr+= kanji_count;
1096         }
1097         break;
1098   }
1099}
1100
10561101/*************************************
10571102 *
10581103 *  Memory maps
r5742r5743
11341179   if(offset == 0x0700 || offset == 0x0701)      { return ym2151_r(devtag_get_device(space->machine, "ym"), offset-0x0700); }
11351180   else if(offset >= 0x0704 && offset <= 0x0707)   { return z80ctc_r(devtag_get_device(space->machine, "ctc"), offset-0x0704); }
11361181   else if(offset == 0x0e03)                       { return x1_rom_r(space, 0); }
1182   else if(offset >= 0x0e80 && offset <= 0x0e83)   { return x1_kanji_r(space, offset-0xe80); }
11371183   else if(offset >= 0x0ff8 && offset <= 0x0fff)   { return x1_fdc_r(space, offset-0xff8); }
11381184   else if(offset >= 0x1400 && offset <= 0x17ff)   { return x1_pcg_r(space, offset-0x1400); }
11391185   else if(offset >= 0x1900 && offset <= 0x19ff)   { return sub_io_r(space, 0); }
r5742r5743
11551201   else if(offset >= 0x4000 && offset <= 0xffff)   { return gfx_bitmap_ram[offset-0x4000+(scrn_reg.gfx_bank*0xc000)]; }
11561202   else
11571203   {
1204      //0xfd0-0xfd7: FDC extended area?
1205      //0x1ff0: if 0, game screen is interlaced
11581206      logerror("(PC=%06x) Read i/o address %04x\n",cpu_get_pc(space->cpu),offset);
11591207   }
11601208   return 0xff;
r5742r5743
11671215   else if(offset >= 0x0704 && offset <= 0x0707)   { z80ctc_w(devtag_get_device(space->machine, "ctc"), offset-0x0704,data); }
11681216//   else if(offset >= 0x0c00 && offset <= 0x0cff)   { x1_rs232c_w(space->machine, 0, data); }
11691217   else if(offset >= 0x0e00 && offset <= 0x0e02)     { x1_rom_w(space, offset-0xe00,data); }
1170//   else if(offset >= 0x0e80 && offset <= 0x0e82)   { x1_kanji_w(space->machine, offset-0xe80,data); }
1218   else if(offset >= 0x0e80 && offset <= 0x0e83)   { x1_kanji_w(space, offset-0xe80,data); }
11711219   else if(offset >= 0x0ff8 && offset <= 0x0fff)   { x1_fdc_w(space, offset-0xff8,data); }
11721220   else if(offset >= 0x1000 && offset <= 0x10ff)   { x1_pal_b_w(space, 0,data); }
11731221   else if(offset >= 0x1100 && offset <= 0x11ff)   { x1_pal_r_w(space, 0,data); }
r5742r5743
16791727   GFXDECODE_ENTRY( "cgrom",   0x00000, x1_chars_8x8,    0x200, 0x20 )
16801728   GFXDECODE_ENTRY( "pcg",     0x00000, x1_pcg_8x8,      0x000, 1 )
16811729   GFXDECODE_ENTRY( "cgrom",   0x01800, x1_chars_8x16,   0x200, 0x20 )
1682   GFXDECODE_ENTRY( "kanji",   0x27000, x1_chars_16x16,  0, 0x20 ) //needs to be checked when the ROM will be redumped
1730//   GFXDECODE_ENTRY( "kanji",   0x27000, x1_chars_16x16,  0, 0x20 ) //needs to be checked when the ROM will be redumped
1731   GFXDECODE_ENTRY( "cgrom",   0x02800, x1_chars_16x16,  0, 0x20 ) //needs to be checked when the ROM will be redumped
16831732GFXDECODE_END
16841733
16851734/*************************************
r5742r5743
19652014
19662015   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
19672016
1968   ROM_REGION(0x4c600, "cgrom", 0)
2017   ROM_REGION(0x4d600, "cgrom", 0)
19692018   ROM_LOAD("fnt0808.x1", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) )
19702019   ROM_RELOAD(            0x00800, 0x00800)
19712020   ROM_RELOAD(            0x01000, 0x00800)
r5742r5743
19862035
19872036   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
19882037
1989   ROM_REGION(0x2800, "cgrom", 0)
2038   ROM_REGION(0x4d600, "cgrom", 0)
19902039   ROM_LOAD("fnt0808.x1", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) )
19912040   ROM_RELOAD(            0x00800, 0x00800)
19922041   ROM_RELOAD(            0x01000, 0x00800)
r5742r5743
20062055
20072056   ROM_REGION(0x1800, "pcg", ROMREGION_ERASEFF)
20082057
2009   ROM_REGION(0x2800, "cgrom", 0)
2058   ROM_REGION(0x4d600, "cgrom", 0)
20102059   /* This should be larger... hence, we are missing something (maybe part of the other fnt roms?) */
20112060   ROM_LOAD("fnt0808_turbo.x1", 0x00000, 0x00800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) )
20122061   ROM_RELOAD(            0x00800, 0x00800)
20132062   ROM_RELOAD(            0x01000, 0x00800)
20142063   ROM_LOAD("fnt0816.x1", 0x01800, 0x01000, BAD_DUMP CRC(34818d54) SHA1(2c5fdd73249421af5509e48a94c52c4e423402bf) )
2064   ROM_LOAD("fnt1616.x1", 0x02800, 0x4ac00, BAD_DUMP CRC(46826745) SHA1(b9e6c320611f0842df6f45673c47c3e23bc14272) )
20152065
20162066   ROM_REGION(0x4ac00, "kanji", 0)
20172067   /* This is clearly a bad dump: size does not make sense and from 0x28000 on there are only 0xff */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team