Version 1.1a with some cleanup of rendering and other minor tweaks.

This commit is contained in:
Dave Bernazzani 2025-05-12 07:10:12 -04:00
parent d69613aa62
commit 5f31e1b4cd
6 changed files with 36 additions and 14 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -601,7 +601,7 @@ void MOS6510::illegal_op(uint8 op, uint16 at)
{
char illop_msg[40];
sprintf(illop_msg, "Illegal opcode %02x at %04x", op, at);
sprintf(illop_msg, "Illegal opcode %02X at %04X", op, at);
ShowRequester(illop_msg, "Reset");
the_c64->Reset();
Reset();

View File

@ -135,7 +135,7 @@
while (true)
{
if (page_plus_cyc) {last_cycles++; page_plus_cyc=0;}
if ((cycles_left -= last_cycles) <= 0)
if ((cycles_left -= last_cycles) < 0)
{
borrowed_cycles = -cycles_left;
break;
@ -147,7 +147,7 @@
if (page_plus_cyc) {last_cycles++; page_plus_cyc=0;}
cycle_counter += last_cycles; // In case we have any initial interrupt cycles
while ((cycles_left -= last_cycles) > 0)
while ((cycles_left -= last_cycles) >= 0)
{
// If we are 1541CPU, we want to alternate running instructions with the main CPU ...
while (cpu_cycles > cycles_left)

View File

@ -1442,7 +1442,7 @@ int MOS6569::EmulateLine(void)
u8 bSkipDraw = 0;
// Our output goes here
uint8 *chunky_ptr = fast_line_buffer;
uint32 *direct_scr_ptr = (uint32*)((u32)0x06000000 + (512*(raster-FIRST_DISP_LINE)));
uint32 *direct_scr_ptr = (uint32*)((u32)0x06000014 + (512*(raster-FIRST_DISP_LINE)));
// Set video counter
vc = vc_base;
@ -1683,10 +1683,10 @@ int MOS6569::EmulateLine(void)
{
// Display border - directly to screen!
bSkipDraw = 1;
direct_scr_ptr+=4;
uint32 c = ec_color_long;
for (int i=4; i<(DISPLAY_X/4)-5; i++)
*++direct_scr_ptr = c;
for (int i=0; i<87; i++) // 352 pixels is 320 main pixels and 16 pixel borders. Good enough for DS since we can't really show much of the border anyway.
{
*direct_scr_ptr++ = ec_color_long;
}
}
// Increment row counter, go to idle state on overflow

View File

@ -136,7 +136,6 @@ extern "C" {
int main(int argc, char **argv)
{
Frodo *the_app;
char *args[]={ (char*)"Gimli", NULL };
defaultExceptionHandler();
@ -149,11 +148,12 @@ int main(int argc, char **argv)
the_app = new Frodo();
the_app->ArgvReceived(1, args);
the_app->ArgvReceived(argc, argv);
keysSetRepeat(15, 6);
the_app->ReadyToRun();
delete the_app;
return (1);
@ -173,9 +173,30 @@ Frodo::Frodo()
/*
* Process command line arguments
*/
char cmd_line_file[256];
void Frodo::ArgvReceived(int argc, char **argv)
{
if (argc > 1)
{
// We want to start in the directory where the file is being launched...
if (strchr(argv[1], '/') != NULL)
{
static char path[128];
strcpy(path, argv[1]);
char *ptr = &path[strlen(path)-1];
while (*ptr != '/') ptr--;
ptr++;
strcpy(cmd_line_file, ptr);
*ptr=0;
chdir(path);
}
else
{
strcpy(cmd_line_file, argv[1]);
}
///TODO: Unsure what do do here... we could auto-load and auto-launch the disk/CRT file I guess...
}
}
@ -214,7 +235,8 @@ void vblankIntro()
/******************************************************************************
* Routine FadeToColor : Fade from background to black or white
******************************************************************************/
void FadeToColor(unsigned char ucSens, unsigned short ucBG, unsigned char ucScr, unsigned char valEnd, unsigned char uWait) {
void FadeToColor(unsigned char ucSens, unsigned short ucBG, unsigned char ucScr, unsigned char valEnd, unsigned char uWait)
{
unsigned short ucFade;
unsigned char ucBcl;
@ -244,7 +266,7 @@ void FadeToColor(unsigned char ucSens, unsigned short ucBG, unsigned char ucScr,
// --------------------------------------------------------------
// Intro with portabledev logo and new PHEONIX-EDITION version
// Intro with GimliDS logo and wavemotion github banner...
// --------------------------------------------------------------
void intro_logo(void)
{
@ -265,7 +287,7 @@ void intro_logo(void)
init_maxmod();
mmEffect(SFX_MUS_INTRO);
// Show portabledev
// Show intro logo...
decompress(introTiles, bgGetGfxPtr(bg1), LZ77Vram);
decompress(introMap, (void*) bgGetMapPtr(bg1), LZ77Vram);
dmaCopy((void *) introPal,(u16*) BG_PALETTE,256*2);