Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imcremental improvements #35

Merged
merged 21 commits into from
Jul 21, 2024
28 changes: 16 additions & 12 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions buildall
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build_uf2()
board=$1"board .."
uf2="picozx81_"$1".uf2"

cmake -DHDMI_SOUND=OFF -DCMAKE_BUILD_TYPE=Release -DTIME_SPARE=OFF -DPICO_BOARD=${board}
cmake -DHDMI_SOUND=OFF -DPICOZX_LCD=OFF -DCMAKE_BUILD_TYPE=Release -DTIME_SPARE=OFF -DPICO_BOARD=${board}
make -j4
cp ./${uf2} ../uf2/${uf2}
}
Expand All @@ -16,7 +16,7 @@ build_uf2_hdmi()
board=$1"board .."
uf2="picozx81_"$1"_hdmi_sound.uf2"

cmake -DHDMI_SOUND=ON -DCMAKE_BUILD_TYPE=Release -DTIME_SPARE=OFF -DPICO_BOARD=${board}
cmake -DHDMI_SOUND=ON -DPICOZX_LCD=OFF -DCMAKE_BUILD_TYPE=Release -DTIME_SPARE=OFF -DPICO_BOARD=${board}
make -j4
cp ./${uf2} ../uf2/${uf2}
}
Expand All @@ -26,7 +26,7 @@ build_uf2_lcd()
board=$1"board .."
uf2="picozx81_"$1"_lcd.uf2"

cmake -DPICOZX_LCD=ON -DCMAKE_BUILD_TYPE=Release -DTIME_SPARE=OFF -DPICO_BOARD=${board}
cmake -DHDMI_SOUND=OFF -DPICOZX_LCD=ON -DCMAKE_BUILD_TYPE=Release -DTIME_SPARE=OFF -DPICO_BOARD=${board}
make -j4
cp ./${uf2} ../uf2/${uf2}
}
Expand Down
5 changes: 3 additions & 2 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ extern unsigned char mem[MEMORYRAM_SIZE];
extern unsigned char *memptr[64];
extern int memattr[64];
extern int sound_type;
extern unsigned long tstates,tsmax;
extern unsigned long tstates;
extern const unsigned long tsmax;
extern int ramsize;
extern int autoload;
extern int zx80;
Expand Down Expand Up @@ -77,7 +78,7 @@ extern "C" {
#endif

extern unsigned int in(int h, int l);
extern unsigned int out(int h, int l, int a);
extern void out(int h, int l, int a);
extern bool save_p(int name_addr, bool defer_rom);
extern bool load_p(int name_addr, bool defer_rom);

Expand Down
24 changes: 12 additions & 12 deletions src/edops.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ instr(0x40,8);
endinstr;

instr(0x41,8);
tstates+=out(b,c,b);
out(b,c,b);
endinstr;

instr(0x42,11);
Expand Down Expand Up @@ -90,7 +90,7 @@ instr(0x48,8);
endinstr;

instr(0x49,8);
tstates+=out(b,c,c);
out(b,c,c);
endinstr;

instr(0x4a,11);
Expand Down Expand Up @@ -127,7 +127,7 @@ instr(0x50,8);
endinstr;

instr(0x51,8);
tstates+=out(b,c,d);
out(b,c,d);
endinstr;

instr(0x52,11);
Expand Down Expand Up @@ -163,7 +163,7 @@ instr(0x58,8);
endinstr;

instr(0x59,8);
tstates+=out(b,c,e);
out(b,c,e);
endinstr;

instr(0x5a,11);
Expand Down Expand Up @@ -201,7 +201,7 @@ instr(0x60,8);
endinstr;

instr(0x61,8);
tstates+=out(b,c,h);
out(b,c,h);
endinstr;

instr(0x62,11);
Expand Down Expand Up @@ -241,7 +241,7 @@ instr(0x68,8);
endinstr;

instr(0x69,8);
tstates+=out(b,c,l);
out(b,c,l);
endinstr;

instr(0x6a,11);
Expand Down Expand Up @@ -282,7 +282,7 @@ instr(0x70,8);
endinstr;

instr(0x71,8);
tstates+=out(b,c,0);
out(b,c,0);
endinstr;

instr(0x72,11);
Expand Down Expand Up @@ -313,7 +313,7 @@ instr(0x78,8);
endinstr;

instr(0x79,8);
tstates+=out(b,c,a);
out(b,c,a);
endinstr;

instr(0x7a,11);
Expand Down Expand Up @@ -373,7 +373,7 @@ instr(0xa3,12); /* I can't determine the correct flags outcome for the
flag is left unchanged and N is set to 1, but that
doesn't seem to be the case... */
{unsigned char x=fetch(hl);
tstates+=out(b,c,x);
out(b,c,x);
if(!++l)h++;
b--;
f=(f&1)|0x12|(b&0xa8)|((b==0)<<6);
Expand Down Expand Up @@ -411,7 +411,7 @@ endinstr;

instr(0xab,12);
{unsigned char x=fetch(hl);
tstates+=out(b,c,x);
out(b,c,x);
if(!l--)h--;
b--;
f=(f&1)|0x12|(b&0xa8)|((b==0)<<6);
Expand Down Expand Up @@ -455,7 +455,7 @@ endinstr;

instr(0xb3,12);
{unsigned char x=fetch(hl);
tstates+=out(b,c,x);
out(b,c,x);
if(!++l)h++;
b--;
f=(f&1)|0x12|(b&0xa8)|((b==0)<<6);
Expand Down Expand Up @@ -497,7 +497,7 @@ endinstr;

instr(0xbb,12);
{unsigned char x=fetch(hl);
tstates+=out(b,c,x);
out(b,c,x);
if(!l--)h--;
b--;
f=(f&1)|0x12|(b&0xa8)|((b==0)<<6);
Expand Down
4 changes: 2 additions & 2 deletions src/emuapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,8 +1235,8 @@ void emu_WaitFor50HzTimer(void)
int32_t sound = sound_count + sound_prev;
sound_prev = -sound_count;

printf("Spare ms in 10sec: %lld Under: %lu\n", total_time / 1000, underrun);
printf("int: %lld sound: %ld\n", ints, sound);
printf("ms spare: %lld U: %lu\n", total_time / 1000, underrun);
printf("I: %lld S: %ld\n", ints, sound);
total_time = 0;
underrun = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/loadp.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static BitState_t bit_state = ZERO_BIT;

static PulseState_t pulse_state = SILENCE_PULSE;
static uint32_t pulse_length_max = LOADP_SILENCE_INTRO_LENGTH;
static uint pulse_count = 0;
static uint32_t pulse_count = 0;
static char byte_to_send = 0;

static void moveToNextByte(void);
Expand Down Expand Up @@ -250,7 +250,7 @@ EMU_LOCK_SDCARD
{
ret = getNextByte(&read_buffer);
} while (ret && ((read_buffer & 0x80) == 0));

EMU_UNLOCK_SDCARD
return ret;
}
38 changes: 0 additions & 38 deletions src/todo.txt

This file was deleted.

Loading