Skip to content

Commit

Permalink
merged TomB changes up to PandTomB/uae4arm@e1907fe
Browse files Browse the repository at this point in the history
  • Loading branch information
lubomyr committed Mar 16, 2021
1 parent 197ea72 commit 5c8328b
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 583 deletions.
4 changes: 2 additions & 2 deletions AndroidAppSettings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ MultiABI='armeabi-v7a arm64-v8a'
AppMinimumRAM=256

# Application version code (integer)
AppVersionCode=010308
AppVersionCode=010410

# Application user-visible version name (string)
AppVersionName="1.0.4.0"
AppVersionName="1.0.4.1"

# Reset SDL config when updating application to the new version (y) / (n)
ResetSdlConfigForThisVersion=n
Expand Down
2 changes: 1 addition & 1 deletion src/akiko.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ uae_u8 *save_akiko (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 256);
save_u16 (0);
save_u16 (0xCAFE);
save_u32 (cdrom_intreq);
Expand Down
2 changes: 1 addition & 1 deletion src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ uae_u8 *save_audio (int nr, int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 100);
dstbak = dst = xmalloc (uae_u8, 32);
save_u8 (acd->state);
save_u8 (acd->data.audvol);
save_u8 (acd->intreq2);
Expand Down
2 changes: 1 addition & 1 deletion src/blitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ uae_u8 *save_blitter_new (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 256);

uae_u8 state;
save_u8 (blitter_cycle_exact ? 3 : 0);
Expand Down
2 changes: 1 addition & 1 deletion src/blkdev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ uae_u8 *save_cd (int num, int *len)
return NULL;
if (!currprefs.cs_cd32cd && !currprefs.scsi)
return NULL;
dstbak = dst = xmalloc (uae_u8, 4 + MAX_DPATH + 4 + 4 + 4 + 2 * MAX_DPATH);
dstbak = dst = xmalloc (uae_u8, 4 + MAX_DPATH + 4 + 4 + 4 + SUBQ_SIZE + 2 * MAX_DPATH);
save_u32 (4 | 8 | 16);
save_path (currprefs.cdslots[num].name, SAVESTATE_PATH_CD);
save_u32 (currprefs.cdslots[num].type);
Expand Down
3 changes: 2 additions & 1 deletion src/cia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,8 @@ uae_u8 *restore_cia (int num, uae_u8 *src)
div10 = CYCLE_UNIT * b;
b = restore_u8 ();
if (num) ciabsdr_cnt = b; else ciaasdr_cnt = b;
if (num) ciabsdr_buf = b;
b = restore_u8 ();
if (num) ciabsdr_buf = b; else ciaasdr_buf = b;
return src;
}

Expand Down
33 changes: 16 additions & 17 deletions src/custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7666,7 +7666,7 @@ void custom_prepare_savestate (void)

uae_u8 *restore_custom (uae_u8 *src)
{
uae_u16 dsklen, dskbytr, ru16;
uae_u16 dsklen, dskbytr;
int dskpt;
int i;

Expand Down Expand Up @@ -7709,30 +7709,30 @@ uae_u8 *restore_custom (uae_u8 *src)
BLTCON1(0, RW); /* 042 BLTCON1 */
BLTAFWM(0, RW); /* 044 BLTAFWM */
BLTALWM(0, RW); /* 046 BLTALWM */
bltcpt = RL; /* 048-04B BLTCPT */
bltbpt = RL; /* 04C-04F BLTBPT */
bltapt = RL; /* 050-053 BLTAPT */
bltdpt = RL; /* 054-057 BLTDPT */
BLTCPTH (0, RW);BLTCPTL(0, RW); /* 048-04B BLTCPT */
BLTBPTH (0, RW);BLTBPTL(0, RW); /* 04C-04F BLTBPT */
BLTAPTH (0, RW);BLTAPTL(0, RW); /* 050-053 BLTAPT */
BLTDPTH (0, RW);BLTDPTL(0, RW); /* 054-057 BLTDPT */
RW; /* 058 BLTSIZE */
RW; /* 05A BLTCON0L -> see 040 */
blt_info.vblitsize=RW; /* 05C BLTSIZV */
blt_info.hblitsize=RW; /* 05E BLTSIZH */
blt_info.bltcmod = RW; /* 060 BLTCMOD */
blt_info.bltbmod = RW; /* 062 BLTBMOD */
blt_info.bltamod = RW; /* 064 BLTAMOD */
blt_info.bltdmod = RW; /* 066 BLTDMOD */
BLTCMOD (0, RW); /* 060 BLTCMOD */
BLTBMOD (0, RW); /* 062 BLTBMOD */
BLTAMOD (0, RW); /* 064 BLTAMOD */
BLTDMOD (0, RW); /* 066 BLTDMOD */
RW; /* 068 ? */
RW; /* 06A ? */
RW; /* 06C ? */
RW; /* 06E ? */
blt_info.bltcdat =RW; /* 070 BLTCDAT */
BLTCDAT (0, RW); /* 070 BLTCDAT */
BLTBDAT(0, RW); /* 072 BLTBDAT */
blt_info.bltadat=RW; /* 074 BLTADAT */
BLTADAT (0, RW); /* 074 BLTADAT */
RW; /* 076 ? */
RW; /* 078 ? */
RW; /* 07A ? */
RW; /* 07C LISAID */
ru16=RW; DSKSYNC(-1, ru16); /* 07E DSKSYNC */
DSKSYNC (-1, RW); /* 07E DSKSYNC */
cop1lc = RL; /* 080/082 COP1LC */
cop2lc = RL; /* 084/086 COP2LC */
RW; /* 088 COPJMP1 */
Expand All @@ -7757,7 +7757,7 @@ uae_u8 *restore_custom (uae_u8 *src)
bpl1mod = RW; /* 108 BPL1MOD */
bpl2mod = RW; /* 10A BPL2MOD */
bplcon4 = RW; /* 10C BPLCON4 */
CLXCON2(RW); /* 10E CLXCON2* */
clxcon2 = RW; /* 10E CLXCON2* */
for(i = 0; i < 8; i++)
fetched[i] = RW; /* BPLXDAT */
/* 120 - 17E Sprite regs */
Expand Down Expand Up @@ -8130,7 +8130,7 @@ uae_u8 *save_custom_extra (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 32);

SL ((currprefs.cs_compatible << 24) | (&get_mem_bank (0) != &chipmem_bank ? 2 : 0) | 1);
SB (currprefs.cs_rtc);
Expand Down Expand Up @@ -8190,7 +8190,7 @@ uae_u8 *save_custom_event_delay (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 256);

save_u32 (1);
save_u8 (cnt);
Expand All @@ -8200,7 +8200,6 @@ uae_u8 *save_custom_event_delay (int *len, uae_u8 *dstptr)
save_u8 (1);
save_u64 (e->evtime - get_cycles ());
save_u32 (e->data);

}
}

Expand All @@ -8214,7 +8213,7 @@ uae_u8 *save_cycles (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 32);
save_u32 (1);
save_u32 (CYCLE_UNIT);
save_u64 (get_cycles ());
Expand Down
2 changes: 1 addition & 1 deletion src/disk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4242,7 +4242,7 @@ uae_u8 *save_disk (int num, int *len, uae_u8 *dstptr, bool usepath)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 2 + 1 + 1 + 1 + 1 + 4 + 4 + MAX_DPATH + 2 + 2 + 4 + 2 * MAX_DPATH);
dstbak = dst = xmalloc (uae_u8, 4 + 1 + 1 + 1 + 1 + 4 + 4 + MAX_DPATH + 2 + 2 + 4 + 2 * MAX_DPATH);
save_u32 (drv->drive_id); /* drive type ID */
save_u8 ((drv->motoroff ? 0 : 1) | ((disabled & (1 << num)) ? 2 : 0) | (drv->idbit ? 4 : 0) | (drv->dskchange ? 8 : 0) | (side ? 16 : 0) | (drv->wrprot ? 32 : 0));
save_u8 (drv->cyl); /* cylinder */
Expand Down
1 change: 1 addition & 0 deletions src/expansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2556,6 +2556,7 @@ void restore_expansion_finish(void)
ec->aci.doinit = true;
}
}
restore_cardno = 0;
}

#endif /* SAVESTATE */
Expand Down
2 changes: 1 addition & 1 deletion src/filesys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8234,7 +8234,7 @@ uae_u8 *save_filesys_common (int *len)
uae_u8 *dstbak, *dst;
if (nr_units() == 0)
return NULL;
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 32);
save_u32 (2);
save_u64 (a_uniq);
save_u64 (key_uniq);
Expand Down
2 changes: 1 addition & 1 deletion src/fpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2815,7 +2815,7 @@ uae_u8 *save_fpu (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 4+4+8*10+4+4+4+4+4+2*10+3*(4+2));
dstbak = dst = xmalloc (uae_u8, 4+4+8*10+4+4+4+4+4+4+2+4+4*4+20*4+16);
save_u32 (currprefs.fpu_model);
save_u32 (0x80000000 | 0x20000000 | (regs.fp_ea_set ? 0x00000001 : 0x00000000));
for (i = 0; i < 8; i++) {
Expand Down
4 changes: 2 additions & 2 deletions src/gayle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ uae_u8 *save_gayle (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 32);
save_u8 (currprefs.cs_ide);
save_u8 (gayle_int);
save_u8 (gayle_irq);
Expand All @@ -868,7 +868,7 @@ uae_u8 *save_gayle_ide (int num, int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 1000);
dstbak = dst = xmalloc (uae_u8, 32);
save_u32 (num);
dst = ide_save_state(dst, ide);
*len = dst - dstbak;
Expand Down
Loading

0 comments on commit 5c8328b

Please sign in to comment.