mirror of
https://github.com/wavemotion-dave/GimliDS.git
synced 2025-06-18 13:55:32 -04:00
Version 1.3 - see readme.md for details
This commit is contained in:
parent
674ed0c6a7
commit
353c093928
BIN
GimliDS.nds
BIN
GimliDS.nds
Binary file not shown.
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ include $(DEVKITARM)/ds_rules
|
||||
|
||||
export TARGET := GimliDS
|
||||
export TOPDIR := $(CURDIR)
|
||||
export VERSION := 1.2a
|
||||
export VERSION := 1.3
|
||||
|
||||
ICON := -b $(CURDIR)/C64_icon.bmp "GimliDS $(VERSION);wavemotion-dave;https://github.com/wavemotion-dave/GimliDS"
|
||||
|
||||
|
@ -158,6 +158,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
```
|
||||
## Change Log
|
||||
|
||||
Version 1.3 release 18-May-2025 by wavemotion-dave
|
||||
* New global options with a number of new configurations (dim screen, default buttons, etc).
|
||||
* Added ability to swap LCD screens on the main Commodore menu.
|
||||
* Slight extension of vertical pixel resolution for some games that utilize more raster lines (Gaplus, etc).
|
||||
* Minor cleanup and refactor under the hood for improved maintainability and slight performance tweaks.
|
||||
|
||||
Version 1.2 release 16-May-2025 by wavemotion-dave
|
||||
* Added new DIAGONALS joystick mode for a few Q-Bert clones.
|
||||
* Slide-n-Glide joystick mode made more responsive.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 41 KiB |
@ -32,6 +32,7 @@
|
||||
#include "Prefs.h"
|
||||
#include "C64.h"
|
||||
#include "main.h"
|
||||
#include "printf.h"
|
||||
|
||||
// Channel modes (IRC users listen up :-)
|
||||
enum {
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "lzav.h"
|
||||
#include <maxmod9.h>
|
||||
#include "soundbank.h"
|
||||
#include "printf.h"
|
||||
|
||||
// Slight speed improvement to have these in global memory where the address is fixed at linker time
|
||||
uint8 myRAM[C64_RAM_SIZE];
|
||||
@ -77,7 +78,6 @@ u8 CompressBuffer[300*1024]; //300K more than enough (might need to compress RDU
|
||||
*/
|
||||
C64::C64()
|
||||
{
|
||||
quit_thyself = false;
|
||||
have_a_break = false;
|
||||
|
||||
gTheC64 = this;
|
||||
@ -932,7 +932,6 @@ void C64::Run(void)
|
||||
orig_kernal_1d85 = Kernal[0x1d85];
|
||||
PatchKernal(ThePrefs.FastReset, ThePrefs.TrueDrive);
|
||||
|
||||
quit_thyself = false;
|
||||
main_loop();
|
||||
}
|
||||
|
||||
@ -1000,7 +999,7 @@ ITCM_CODE void C64::VBlank(bool draw_frame)
|
||||
if (DSIvBlanks >= 60)
|
||||
{
|
||||
DSIvBlanks = 0;
|
||||
TheDisplay->Speedometer((int)frames_per_sec);
|
||||
TheDisplay->DisplayStatusLine((int)frames_per_sec);
|
||||
frames_per_sec = 0;
|
||||
}
|
||||
|
||||
@ -1343,7 +1342,7 @@ void C64::RemoveCart(void)
|
||||
|
||||
void C64::main_loop(void)
|
||||
{
|
||||
while (!quit_thyself)
|
||||
while (true)
|
||||
{
|
||||
if(have_a_break)
|
||||
{
|
||||
|
@ -119,7 +119,6 @@ private:
|
||||
uint8 poll_joystick(int port);
|
||||
void main_loop(void);
|
||||
|
||||
bool quit_thyself; // Emulation thread shall quit
|
||||
bool have_a_break; // Emulation thread shall pause
|
||||
|
||||
uint8 joykey; // Joystick keyboard emulation mask value
|
||||
|
@ -98,6 +98,7 @@
|
||||
#include "CIA.h"
|
||||
#include "Display.h"
|
||||
#include "mainmenu.h"
|
||||
#include "printf.h"
|
||||
|
||||
extern uint8 myRAM1541[DRIVE_RAM_SIZE];
|
||||
|
||||
@ -665,10 +666,9 @@ void MOS6502_1541::Reset(void)
|
||||
* Illegal opcode encountered
|
||||
*/
|
||||
|
||||
static char illop_msg[80];
|
||||
void MOS6502_1541::illegal_op(uint8 op, uint16 at)
|
||||
{
|
||||
char illop_msg[80];
|
||||
|
||||
sprintf(illop_msg, "1541: Illegal opcode %02x at %04x.", op, at);
|
||||
if (ShowRequester(illop_msg, "Reset 1541", "Reset C64"))
|
||||
the_c64->Reset();
|
||||
|
@ -79,6 +79,7 @@
|
||||
#include "Display.h"
|
||||
#include "Cartridge.h"
|
||||
#include "mainmenu.h"
|
||||
#include "printf.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -130,14 +130,14 @@
|
||||
|
||||
#ifndef IS_CPU_1541 // If main C64 CPU we handle borrowed cycles
|
||||
// Main opcode fetch/execute loop
|
||||
if (cycles_left != 1) cycles_left -= borrowed_cycles;
|
||||
if (cycles_left != 1) cycles_left += borrowed_cycles;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (page_plus_cyc) {last_cycles++; page_plus_cyc=0;}
|
||||
if ((cycles_left -= last_cycles) <= 0)
|
||||
{
|
||||
borrowed_cycles = -cycles_left;
|
||||
borrowed_cycles = cycles_left;
|
||||
break;
|
||||
}
|
||||
#else // CPU is 1541
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "C64.h"
|
||||
#include "CPUC64.h"
|
||||
#include "Cartridge.h"
|
||||
|
||||
#include "printf.h"
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "mainmenu.h"
|
||||
#include <maxmod9.h>
|
||||
#include "soundbank.h"
|
||||
#include "printf.h"
|
||||
|
||||
u8 floppy_sound_counter __attribute__((section(".dtcm"))) = 0;
|
||||
u8 bDebugDisplay __attribute__((section(".dtcm"))) = 0;
|
||||
@ -228,7 +229,7 @@ void ShowKeyboard(void)
|
||||
|
||||
|
||||
/*
|
||||
* Display constructor: Draw Speedometer/LEDs in window
|
||||
* Display constructor
|
||||
*/
|
||||
|
||||
C64Display::C64Display(C64 *the_c64) : TheC64(the_c64)
|
||||
@ -410,7 +411,7 @@ int init_graphics(void)
|
||||
irqSet(IRQ_VBLANK, vblankDS);
|
||||
irqEnable(IRQ_VBLANK);
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
@ -429,11 +430,6 @@ __attribute__ ((noinline)) ITCM_CODE void C64Display::UpdateRasterLine(int raste
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Draw speedometer
|
||||
*/
|
||||
|
||||
//*****************************************************************************
|
||||
// Displays a message on the screen
|
||||
//*****************************************************************************
|
||||
@ -536,7 +532,7 @@ int getMemFree() { // returns the amount of free memory in bytes
|
||||
|
||||
int i = 0;
|
||||
int debug[16]={0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0};
|
||||
void C64Display::Speedometer(int speed)
|
||||
void C64Display::DisplayStatusLine(int speed)
|
||||
{
|
||||
char tmp[34];
|
||||
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
~C64Display();
|
||||
void UpdateRasterLine(int raster, u8 *src);
|
||||
void UpdateLEDs(int l0, int l1);
|
||||
void Speedometer(int speed);
|
||||
void DisplayStatusLine(int speed);
|
||||
void KeyPress(int key, uint8 *key_matrix, uint8 *rev_matrix);
|
||||
void KeyRelease(int key, uint8 *key_matrix, uint8 *rev_matrix);
|
||||
void PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick);
|
||||
|
@ -64,6 +64,7 @@
|
||||
#include "Prefs.h"
|
||||
#include "Display.h"
|
||||
#include "main.h"
|
||||
#include "printf.h"
|
||||
|
||||
// IEC command codes
|
||||
enum {
|
||||
|
@ -82,25 +82,6 @@
|
||||
#include "Prefs.h"
|
||||
#include "CIA.h"
|
||||
|
||||
// First and last displayed line
|
||||
const unsigned FIRST_DISP_LINE = 0x20;
|
||||
const unsigned LAST_DISP_LINE = 0x114;
|
||||
|
||||
// First and last possible line for Bad Lines
|
||||
const unsigned FIRST_DMA_LINE = 0x30;
|
||||
const unsigned LAST_DMA_LINE = 0xf7;
|
||||
|
||||
// Display window coordinates
|
||||
const int ROW25_YSTART = 0x33;
|
||||
const int ROW25_YSTOP = 0xfb;
|
||||
const int ROW24_YSTART = 0x37;
|
||||
const int ROW24_YSTOP = 0xf7;
|
||||
|
||||
const int COL40_XSTART = 0x20;
|
||||
const int COL40_XSTOP = 0x160;
|
||||
const int COL38_XSTART = 0x27;
|
||||
const int COL38_XSTOP = 0x157;
|
||||
|
||||
uint8 fast_line_buffer[512] __attribute__((section(".dtcm"))) = {0};
|
||||
|
||||
// Tables for sprite X expansion
|
||||
@ -1496,12 +1477,10 @@ int MOS6569::EmulateLine(void)
|
||||
uint8 *r = fore_mask_buf + COL40_XSTART/8; // Pointer in foreground mask buffer
|
||||
if (x_scroll)
|
||||
{
|
||||
p--;
|
||||
uint8 b0cc = b0c_color;
|
||||
int limit = x_scroll;
|
||||
for (int i=0; i<limit; i++) // Background on the left if XScroll>0
|
||||
*++p = b0cc;
|
||||
p++;
|
||||
*p++ = b0cc;
|
||||
}
|
||||
|
||||
if (display_state)
|
||||
|
@ -39,14 +39,30 @@
|
||||
#define _VIC_H
|
||||
#include <nds.h>
|
||||
|
||||
extern const unsigned FIRST_DISP_LINE;
|
||||
|
||||
// Total number of raster lines (PAL)
|
||||
const unsigned TOTAL_RASTERS = 0x138;
|
||||
#define TOTAL_RASTERS 0x138
|
||||
|
||||
// Screen refresh frequency (PAL)
|
||||
const unsigned SCREEN_FREQ = 50;
|
||||
#define SCREEN_FREQ 50
|
||||
|
||||
// First and last displayed line
|
||||
#define FIRST_DISP_LINE 0x20
|
||||
#define LAST_DISP_LINE 0x114
|
||||
|
||||
// First and last possible line for Bad Lines
|
||||
#define FIRST_DMA_LINE 0x30
|
||||
#define LAST_DMA_LINE 0xf7
|
||||
|
||||
// Display window coordinates
|
||||
#define ROW25_YSTART 0x33
|
||||
#define ROW25_YSTOP 0xfb
|
||||
#define ROW24_YSTART 0x37
|
||||
#define ROW24_YSTOP 0xf7
|
||||
|
||||
#define COL40_XSTART 0x20
|
||||
#define COL40_XSTOP 0x160
|
||||
#define COL38_XSTART 0x27
|
||||
#define COL38_XSTOP 0x157
|
||||
|
||||
class MOS6510;
|
||||
class C64Display;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "cartmenu_bg.h"
|
||||
#include "Prefs.h"
|
||||
#include "C64.h"
|
||||
#include "printf.h"
|
||||
|
||||
char Drive8File[MAX_FILENAME_LEN];
|
||||
char Drive9File[MAX_FILENAME_LEN];
|
||||
|
@ -44,6 +44,7 @@
|
||||
|
||||
#include "mainmenu.h"
|
||||
#include "intro.h"
|
||||
#include "printf.h"
|
||||
#include <nds.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "mainmenu_bg.h"
|
||||
#include "Prefs.h"
|
||||
#include "Display.h"
|
||||
#include "printf.h"
|
||||
|
||||
extern C64 *TheC64;
|
||||
extern int bg0b, bg1b;
|
||||
|
@ -116,3 +116,4 @@ using std::vector;
|
||||
#include <nds.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user