Previous 199869 Revisions Next

r19291 Monday 3rd December, 2012 at 21:54:16 UTC by Angelo Salese
Fixed a bug with non-zero base SAD register in upd7220, fixes vertical position in Tokimeki Sports Gal 3
[src/mess/drivers]pc9801.c
[src/mess/video]upd7220.c

trunk/src/mess/video/upd7220.c
r19290r19291
15911591      if((sx << 3) < m_aw * 16 && y < m_al)
15921592         m_display_cb(this, bitmap, y, sx << 3, addr);
15931593
1594      if (wd) addr += 2; else addr++;
1594      addr+= wd + 1;
15951595   }
15961596}
15971597
r19290r19291
16201620
16211621         for (y = 0; y < len; y++)
16221622         {
1623            addr = (sad & 0x3ffff) + (y * m_pitch * 2);
1623            addr = ((sad << 1) & 0x3ffff) + (y * m_pitch * 2);
16241624
16251625            if (m_display_cb)
16261626               draw_graphics_line(bitmap, addr, y + bsy, wd);
trunk/src/mess/drivers/pc9801.c
r19290r19291
544544      res_x = x + xi;
545545      res_y = y;
546546
547      pen = ((state->m_video_ram_2[address + (0x08000) + (state->m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 1 : 0;
548      pen|= ((state->m_video_ram_2[address + (0x10000) + (state->m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 2 : 0;
549      pen|= ((state->m_video_ram_2[address + (0x18000) + (state->m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 4 : 0;
547      pen = ((state->m_video_ram_2[(address & 0x7fff) + (0x08000) + (state->m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 1 : 0;
548      pen|= ((state->m_video_ram_2[(address & 0x7fff) + (0x10000) + (state->m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 2 : 0;
549      pen|= ((state->m_video_ram_2[(address & 0x7fff) + (0x18000) + (state->m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 4 : 0;
550550
551551      if(interlace_on)
552552      {
r19290r19291
12761276   m_video_ram_1[offset] = data; //TODO: check me
12771277}
12781278
1279/* +0x8000 is trusted (bank 0 is actually used by 16 colors mode) */
12791280READ8_MEMBER(pc9801_state::pc9801_gvram_r)
12801281{
1281
1282   return m_video_ram_2[offset+0x8000+m_vram_bank*0x20000];
1282   return m_video_ram_2[offset+0x08000+m_vram_bank*0x20000];
12831283}
12841284
12851285WRITE8_MEMBER(pc9801_state::pc9801_gvram_w)
12861286{
1287
1288   m_video_ram_2[offset+0x8000+m_vram_bank*0x20000] = data;
1287   m_video_ram_2[offset+0x08000+m_vram_bank*0x20000] = data;
12891288}
12901289
12911290READ8_MEMBER(pc9801_state::pc9801_opn_r)
r19290r19291
23812380****************************************/
23822381
23832382/*
2384irq assignment:
2383irq assignment (PC-9801F):
23852384
238623858259 master:
23872386ir0 PIT
r19290r19291
23982397ir1
23992398ir2 2dd floppy irq
24002399ir3 2hd floppy irq
2401ir4
2400ir4 opn
24022401ir5
24032402ir6
24042403ir7
r19290r19291
29112910//      pic8259_ir2_w(machine().device("pic8259_master"), 0);
29122911}
29132912
2913static void pc9801_sound_irq( device_t *device, int irq )
2914{
2915//   pc9801_state *state = device->machine().driver_data<pc9801_state>();
29142916
2917   pic8259_ir4_w(device->machine().device("pic8259_slave"), irq);
2918}
29152919
2920static const ym2203_interface pc98_ym2203_intf =
2921{
2922   {
2923      AY8910_LEGACY_OUTPUT,
2924      AY8910_DEFAULT_LOADS,
2925      DEVCB_NULL,//(pc8801_state,opn_porta_r),
2926      DEVCB_NULL,//(pc8801_state,opn_portb_r),
2927      DEVCB_NULL,
2928      DEVCB_NULL
2929   },
2930   DEVCB_LINE(pc9801_sound_irq)
2931};
2932
29162933static MACHINE_CONFIG_START( pc9801, pc9801_state )
29172934   MCFG_CPU_ADD("maincpu", I8086, 5000000) //unknown clock
29182935   MCFG_CPU_PROGRAM_MAP(pc9801_map)
r19290r19291
29652982   MCFG_SPEAKER_STANDARD_MONO("mono")
29662983
29672984   MCFG_SOUND_ADD("opn", YM2203, 4000000) // unknown clock / divider
2985   MCFG_SOUND_CONFIG(pc98_ym2203_intf)
29682986   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
29692987
29702988   MCFG_SOUND_ADD(BEEPER_TAG, BEEP, 0)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team