rearrange globals

scripted find/replace
gives slightly better code on ARM, less unnecessary asm,
~400 bytes saved
This commit is contained in:
notaz 2017-10-19 02:38:20 +03:00
parent 759c9d3846
commit 93f9619ed8
47 changed files with 532 additions and 573 deletions

View file

@ -201,7 +201,7 @@ void PDebugShowPalette(unsigned short *screen, int stride)
int x, y;
Pico.m.dirtyPal = 1;
if (PicoAHW & PAHW_SMS)
if (PicoIn.AHW & PAHW_SMS)
PicoDoHighPal555M4();
else
PicoDoHighPal555(1, 0, est);
@ -328,7 +328,7 @@ void PDebugDumpMem(void)
dump_ram_noswab(PicoMem.zram, "dumps/zram.bin");
dump_ram(PicoMem.cram, "dumps/cram.bin");
if (PicoAHW & PAHW_SMS)
if (PicoIn.AHW & PAHW_SMS)
{
dump_ram_noswab(PicoMem.vramb, "dumps/vram.bin");
}
@ -339,7 +339,7 @@ void PDebugDumpMem(void)
dump_ram(PicoMem.vsram,"dumps/vsram.bin");
}
if (PicoAHW & PAHW_MCD)
if (PicoIn.AHW & PAHW_MCD)
{
dump_ram(Pico_mcd->prg_ram, "dumps/prg_ram.bin");
if (Pico_mcd->s68k_regs[3]&4) // 1M mode?
@ -355,7 +355,7 @@ void PDebugDumpMem(void)
}
#ifndef NO_32X
if (PicoAHW & PAHW_32X)
if (PicoIn.AHW & PAHW_32X)
{
dump_ram(Pico32xMem->sdram, "dumps/sdram.bin");
dump_ram(Pico32xMem->dram[0], "dumps/dram0.bin");
@ -371,7 +371,7 @@ void PDebugZ80Frame(void)
{
int lines, line_sample;
if (PicoAHW & PAHW_SMS)
if (PicoIn.AHW & PAHW_SMS)
return;
if (Pico.m.pal) {
@ -385,12 +385,12 @@ void PDebugZ80Frame(void)
z80_resetCycles();
PsndStartFrame();
if (/*Pico.m.z80Run &&*/ !Pico.m.z80_reset && (PicoOpt&POPT_EN_Z80))
if (/*Pico.m.z80Run &&*/ !Pico.m.z80_reset && (PicoIn.opt&POPT_EN_Z80))
PicoSyncZ80(Pico.t.m68c_cnt + line_sample * 488);
if (PsndOut)
PsndGetSamples(line_sample);
if (/*Pico.m.z80Run &&*/ !Pico.m.z80_reset && (PicoOpt&POPT_EN_Z80)) {
if (/*Pico.m.z80Run &&*/ !Pico.m.z80_reset && (PicoIn.opt&POPT_EN_Z80)) {
PicoSyncZ80(Pico.t.m68c_cnt + 224 * 488);
z80_int();
}
@ -398,7 +398,7 @@ void PDebugZ80Frame(void)
PsndGetSamples(224);
// sync z80
if (/*Pico.m.z80Run &&*/ !Pico.m.z80_reset && (PicoOpt&POPT_EN_Z80)) {
if (/*Pico.m.z80Run &&*/ !Pico.m.z80_reset && (PicoIn.opt&POPT_EN_Z80)) {
Pico.t.m68c_cnt += Pico.m.pal ? 151809 : 127671; // cycles adjusted for converter
PicoSyncZ80(Pico.t.m68c_cnt);
}
@ -412,7 +412,7 @@ void PDebugZ80Frame(void)
void PDebugCPUStep(void)
{
if (PicoAHW & PAHW_SMS)
if (PicoIn.AHW & PAHW_SMS)
z80_run_nr(1);
else
SekStepM68k();