Fixed the third batch of problems.

This commit is contained in:
OBattler
2020-01-15 04:58:28 +01:00
parent af023ff5dd
commit 932ad5595a
39 changed files with 127 additions and 80 deletions

View File

@@ -384,7 +384,7 @@ void adgold_write(uint16_t addr, uint8_t val, void *p)
adgold->adgold_mma_regs[0][adgold->adgold_mma_addr] = val;
break;
case 7:
if (adgold->adgold_mma_addr >= 0xf) break;
if (adgold->adgold_mma_addr >= 0xe) break;
switch (adgold->adgold_mma_addr)
{
case 0x9:
@@ -503,8 +503,10 @@ uint8_t adgold_read(uint16_t addr, void *p)
}
break;
case 7:
if (adgold->adgold_mma_addr >= 0xf) temp = 0xff;
temp = adgold->adgold_mma_regs[1][adgold->adgold_mma_addr];
if (adgold->adgold_mma_addr >= 0xf)
temp = 0xff;
else
temp = adgold->adgold_mma_regs[1][adgold->adgold_mma_addr];
break;
}
return temp;

View File

@@ -2143,7 +2143,8 @@ void emu8k_init(emu8k_t *emu8k, uint16_t emu_addr, int onboard_ram)
fatal("AWE32.RAW not found\n");
emu8k->rom = malloc(1024 * 1024);
fread(emu8k->rom, 1024 * 1024, 1, f);
if (fread(emu8k->rom, 1, 1048576, f) != 1048576)
fatal("emu8k_init(): Error reading data\n");
fclose(f);
/*AWE-DUMP creates ROM images offset by 2 bytes, so if we detect this
then correct it*/