mirror of
https://github.com/wavemotion-dave/GimliDS.git
synced 2025-06-18 22:05:33 -04:00
Version 1.1a with some cleanup of rendering and other minor tweaks.
This commit is contained in:
parent
d69613aa62
commit
5f31e1b4cd
BIN
GimliDS.nds
BIN
GimliDS.nds
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
@ -601,7 +601,7 @@ void MOS6510::illegal_op(uint8 op, uint16 at)
|
|||||||
{
|
{
|
||||||
char illop_msg[40];
|
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");
|
ShowRequester(illop_msg, "Reset");
|
||||||
the_c64->Reset();
|
the_c64->Reset();
|
||||||
Reset();
|
Reset();
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (page_plus_cyc) {last_cycles++; page_plus_cyc=0;}
|
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;
|
borrowed_cycles = -cycles_left;
|
||||||
break;
|
break;
|
||||||
@ -147,7 +147,7 @@
|
|||||||
if (page_plus_cyc) {last_cycles++; page_plus_cyc=0;}
|
if (page_plus_cyc) {last_cycles++; page_plus_cyc=0;}
|
||||||
cycle_counter += last_cycles; // In case we have any initial interrupt cycles
|
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 ...
|
// If we are 1541CPU, we want to alternate running instructions with the main CPU ...
|
||||||
while (cpu_cycles > cycles_left)
|
while (cpu_cycles > cycles_left)
|
||||||
|
@ -1442,7 +1442,7 @@ int MOS6569::EmulateLine(void)
|
|||||||
u8 bSkipDraw = 0;
|
u8 bSkipDraw = 0;
|
||||||
// Our output goes here
|
// Our output goes here
|
||||||
uint8 *chunky_ptr = fast_line_buffer;
|
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
|
// Set video counter
|
||||||
vc = vc_base;
|
vc = vc_base;
|
||||||
@ -1683,10 +1683,10 @@ int MOS6569::EmulateLine(void)
|
|||||||
{
|
{
|
||||||
// Display border - directly to screen!
|
// Display border - directly to screen!
|
||||||
bSkipDraw = 1;
|
bSkipDraw = 1;
|
||||||
direct_scr_ptr+=4;
|
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.
|
||||||
uint32 c = ec_color_long;
|
{
|
||||||
for (int i=4; i<(DISPLAY_X/4)-5; i++)
|
*direct_scr_ptr++ = ec_color_long;
|
||||||
*++direct_scr_ptr = c;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increment row counter, go to idle state on overflow
|
// Increment row counter, go to idle state on overflow
|
||||||
|
@ -136,7 +136,6 @@ extern "C" {
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Frodo *the_app;
|
Frodo *the_app;
|
||||||
char *args[]={ (char*)"Gimli", NULL };
|
|
||||||
|
|
||||||
defaultExceptionHandler();
|
defaultExceptionHandler();
|
||||||
|
|
||||||
@ -149,11 +148,12 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
the_app = new Frodo();
|
the_app = new Frodo();
|
||||||
|
|
||||||
the_app->ArgvReceived(1, args);
|
the_app->ArgvReceived(argc, argv);
|
||||||
|
|
||||||
keysSetRepeat(15, 6);
|
keysSetRepeat(15, 6);
|
||||||
|
|
||||||
the_app->ReadyToRun();
|
the_app->ReadyToRun();
|
||||||
|
|
||||||
delete the_app;
|
delete the_app;
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
@ -173,9 +173,30 @@ Frodo::Frodo()
|
|||||||
/*
|
/*
|
||||||
* Process command line arguments
|
* Process command line arguments
|
||||||
*/
|
*/
|
||||||
|
char cmd_line_file[256];
|
||||||
void Frodo::ArgvReceived(int argc, char **argv)
|
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
|
* 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 short ucFade;
|
||||||
unsigned char ucBcl;
|
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)
|
void intro_logo(void)
|
||||||
{
|
{
|
||||||
@ -265,7 +287,7 @@ void intro_logo(void)
|
|||||||
init_maxmod();
|
init_maxmod();
|
||||||
mmEffect(SFX_MUS_INTRO);
|
mmEffect(SFX_MUS_INTRO);
|
||||||
|
|
||||||
// Show portabledev
|
// Show intro logo...
|
||||||
decompress(introTiles, bgGetGfxPtr(bg1), LZ77Vram);
|
decompress(introTiles, bgGetGfxPtr(bg1), LZ77Vram);
|
||||||
decompress(introMap, (void*) bgGetMapPtr(bg1), LZ77Vram);
|
decompress(introMap, (void*) bgGetMapPtr(bg1), LZ77Vram);
|
||||||
dmaCopy((void *) introPal,(u16*) BG_PALETTE,256*2);
|
dmaCopy((void *) introPal,(u16*) BG_PALETTE,256*2);
|
||||||
|
Loading…
Reference in New Issue
Block a user