(MESS) apple3: improved save states, fixed double-hi-res drawing [R. Belmont]

This commit is contained in:
R. Belmont 2014-02-16 04:22:38 +00:00
parent 10519dead7
commit 5dc3ebae07
3 changed files with 24 additions and 5 deletions

View file

@ -115,7 +115,7 @@ private:
int m_via_1_irq;
offs_t m_zpa;
UINT8 m_last_n;
UINT8 *m_char_mem;
UINT8 m_char_mem[0x800];
UINT32 *m_hgr_map;
bool m_sync;

View file

@ -110,13 +110,19 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
m_strobe = 0;
break;
case 0x20: case 0x21: case 0x22: case 0x23:
case 0x24: case 0x25: case 0x26: case 0x27:
case 0x28: case 0x29: case 0x2A: case 0x2B:
case 0x2C: case 0x2D: case 0x2E: case 0x2F:
m_cnxx_slot = -1;
break;
case 0x30: case 0x31: case 0x32: case 0x33:
case 0x34: case 0x35: case 0x36: case 0x37:
case 0x38: case 0x39: case 0x3A: case 0x3B:
case 0x3C: case 0x3D: case 0x3E: case 0x3F:
m_speaker_state ^= 1;
m_speaker->level_w(m_speaker_state);
result = 0xff;
break;
case 0x40: case 0x41: case 0x42: case 0x43:
@ -124,7 +130,6 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
case 0x48: case 0x49: case 0x4A: case 0x4B:
case 0x4C: case 0x4D: case 0x4E: case 0x4F:
m_c040_time = 200;
result = 0xff;
break;
case 0x50: case 0x51: case 0x52: case 0x53:
@ -235,6 +240,13 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
m_strobe = 0;
break;
case 0x20: case 0x21: case 0x22: case 0x23:
case 0x24: case 0x25: case 0x26: case 0x27:
case 0x28: case 0x29: case 0x2A: case 0x2B:
case 0x2C: case 0x2D: case 0x2E: case 0x2F:
m_cnxx_slot = -1;
break;
case 0x30: case 0x31: case 0x32: case 0x33:
case 0x34: case 0x35: case 0x36: case 0x37:
case 0x38: case 0x39: case 0x3A: case 0x3B:
@ -717,6 +729,8 @@ DRIVER_INIT_MEMBER(apple3_state,apple3)
save_item(NAME(m_lastchar));
save_item(NAME(m_strobe));
save_item(NAME(m_transchar));
save_item(NAME(m_flags));
save_item(NAME(m_char_mem));
machine().save().register_postload(save_prepost_delegate(FUNC(apple3_state::apple3_postload), this));
}

View file

@ -102,7 +102,6 @@ VIDEO_START_MEMBER(apple3_state,apple3)
int i, j;
UINT32 v;
m_char_mem = auto_alloc_array(machine(), UINT8, 0x800);
memset(m_char_mem, 0, 0x800);
m_hgr_map = auto_alloc_array(machine(), UINT32, 192);
@ -348,8 +347,12 @@ void apple3_state::apple3_video_graphics_shgr(bitmap_ind16 &bitmap)
for (x = 0; x < 7; x++)
{
*(ptr++) = (b1 & 0x01) ? WHITE : BLACK;
*(ptr++) = (b2 & 0x01) ? WHITE : BLACK;
b1 >>= 1;
}
for (x = 0; x < 7; x++)
{
*(ptr++) = (b2 & 0x01) ? WHITE : BLACK;
b2 >>= 1;
}
}
@ -391,6 +394,8 @@ void apple3_state::apple3_video_graphics_chires(bitmap_ind16 &bitmap)
UINT32 apple3_state::screen_update_apple3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// printf("gfx mode %x\n", m_flags & (VAR_VM3|VAR_VM1|VAR_VM0));
switch(m_flags & (VAR_VM3|VAR_VM1|VAR_VM0))
{
case 0: