mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
jupace: fixed bug that crashes messui when snapshot used.
This commit is contained in:
parent
6fbe508236
commit
976e707ffe
@ -170,11 +170,12 @@ private:
|
||||
|
||||
SNAPSHOT_LOAD_MEMBER(ace_state::snapshot_cb)
|
||||
{
|
||||
std::vector<uint8_t> RAM(0x10000);
|
||||
cpu_device *cpu = m_maincpu;
|
||||
uint8_t *RAM = memregion(cpu->tag())->base();
|
||||
address_space &space = cpu->space(AS_PROGRAM);
|
||||
unsigned char ace_repeat, ace_byte, loop;
|
||||
int done=0, ace_index=0x2000;
|
||||
unsigned char ace_repeat, ace_byte;
|
||||
u16 ace_index=0x2000;
|
||||
bool done = false;
|
||||
|
||||
if (m_ram->size() < 16*1024)
|
||||
{
|
||||
@ -194,7 +195,7 @@ SNAPSHOT_LOAD_MEMBER(ace_state::snapshot_cb)
|
||||
{
|
||||
case 0x00:
|
||||
logerror("File loaded!\r\n");
|
||||
done = 1;
|
||||
done = true;
|
||||
break;
|
||||
case 0x01:
|
||||
image.fread(&ace_byte, 1);
|
||||
@ -202,7 +203,7 @@ SNAPSHOT_LOAD_MEMBER(ace_state::snapshot_cb)
|
||||
break;
|
||||
default:
|
||||
image.fread(&ace_repeat, 1);
|
||||
for (loop = 0; loop < ace_byte; loop++)
|
||||
for (u8 loop = 0; loop < ace_byte; loop++)
|
||||
RAM[ace_index++] = ace_repeat;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user