Skip to content

Commit

Permalink
Version 9.4b - see readme.md file for details.
Browse files Browse the repository at this point in the history
  • Loading branch information
wavemotion-dave committed Mar 18, 2024
1 parent 066aa61 commit edb22e5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
Binary file modified ColecoDS.nds
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include $(DEVKITARM)/ds_rules

export TARGET := ColecoDS
export TOPDIR := $(CURDIR)
export VERSION := 9.4a
export VERSION := 9.4b

ICON := -b $(CURDIR)/logo.bmp "ColecoDS $(VERSION);wavemotion-dave;/~https://github.com/wavemotion-dave/ColecoDS"

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ Versions :
V9.4: 16-Mar-2024 by wavemotion-dave
* Tatung Einstein improvements - more games run more correctly.
* Other minor tweaks and cleanup as time permitted.
* 9.4b - Einstein RAMDISK now unified in /data/ directory (rather than have one for each directory of .dsk files)
* 9.4b - Tweaks to the CTC timer engine for Einstein JSW2

V9.3: 10-Mar-2024 by wavemotion-dave
* Fixed TMS9918 VDP 5th Sprite Flag handling and slight optmization to the VDP driver.
Expand Down
16 changes: 11 additions & 5 deletions arm9/source/einstein.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ unsigned char RAMDisk_TrackInfo[] = {

void einstein_init_ramdisk(void)
{
FILE *fp = fopen("einstein.ramd", "wb+");
FILE *fp = fopen("/data/einstein.ramd", "wb+");
fwrite(RAMDisk_Header, 1, sizeof(RAMDisk_Header), fp);
for (u8 track=0; track<40; track++)
{
Expand Down Expand Up @@ -756,11 +756,17 @@ void einstein_init_ramdisk(void)

void einstein_load_ramdisk(void)
{
FILE *fp = fopen("einstein.ramd", "rb");
if (fp == NULL)
FILE *fp = fopen("/data/einstein.ramd", "rb");

if (fp == NULL) // See if there is one in the local directory
{
fp = fopen("einstein.ramd", "rb"); // This will get written back to /data/einstein.ramd
}

if (fp == NULL) // If we didn't find one... we create a blank one
{
einstein_init_ramdisk();
fp = fopen("einstein.ramd", "rb");
fp = fopen("/data/einstein.ramd", "rb");
}

if (fp != NULL)
Expand Down Expand Up @@ -839,7 +845,7 @@ void einstein_save_ramdisk(void)
}
}

FILE *fp = fopen("einstein.ramd", "wb");
FILE *fp = fopen("/data/einstein.ramd", "wb");
if (fp != NULL)
{
fwrite(ROM_Memory + (256*1024), 1, ramdisk_len, fp);
Expand Down

0 comments on commit edb22e5

Please sign in to comment.