From d3b5e84c86f8a33bc93f3ab973b88961b446763b Mon Sep 17 00:00:00 2001 From: Artemio Date: Mon, 6 Nov 2023 18:53:42 -0600 Subject: [PATCH] == DC == - Updated source so it compiles under latest KOS - Fixed issue with wrong message being displayed when VMU test was present bit not a save file while auto loading on boot - removed inline functions - Fixed missing breaks --- 240psuite/Dreamcast/PVR/image.h | 4 ++-- 240psuite/Dreamcast/PVR/vmodes.h | 4 ++-- 240psuite/Dreamcast/PVR/vmu.c | 2 ++ 240psuite/Dreamcast/PVR/vmu_print.c | 4 ++-- 240psuite/Dreamcast/PVR/vmu_print.h | 4 ++-- 240psuite/Dreamcast/PVR/vmufs.c | 3 ++- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/240psuite/Dreamcast/PVR/image.h b/240psuite/Dreamcast/PVR/image.h index 41857e9d..45ca56f3 100644 --- a/240psuite/Dreamcast/PVR/image.h +++ b/240psuite/Dreamcast/PVR/image.h @@ -97,8 +97,8 @@ void FlipV(ImagePtr image, uint16 flip); void FlipHV(ImagePtr image, uint16 flip); void DrawImage(ImagePtr image); void DrawImageRotate(ImagePtr image, float angle); -inline void StartScene(); -inline void EndScene(); +void StartScene(); +void EndScene(); typedef struct dpallette_st { uint32_t numcolors; diff --git a/240psuite/Dreamcast/PVR/vmodes.h b/240psuite/Dreamcast/PVR/vmodes.h index 5ae79aa4..5075de7e 100644 --- a/240psuite/Dreamcast/PVR/vmodes.h +++ b/240psuite/Dreamcast/PVR/vmodes.h @@ -73,8 +73,8 @@ extern vid_mode_t custom_576; void GetVideoModeStr(char *res, int shortdesc); void AdjustVideoModes(); void LoadScanlines(); -inline void ReleaseScanlines(); -inline void DrawScanlines(); +void ReleaseScanlines(); +void DrawScanlines(); float GetScanlineIntensity(); void SetScanlineIntensity(float value); int ScanlinesEven(); diff --git a/240psuite/Dreamcast/PVR/vmu.c b/240psuite/Dreamcast/PVR/vmu.c index edcfbf82..5c592bcb 100644 --- a/240psuite/Dreamcast/PVR/vmu.c +++ b/240psuite/Dreamcast/PVR/vmu.c @@ -93,8 +93,10 @@ void internal_vmu_draw_lcd(maple_device_t *dev, void *bitmap) { case MAPLE_EAGAIN: dbglog(DBG_ERROR, "VMU LCD could not be updated, got MAPLE_EAGAIN\n"); + break; case MAPLE_ETIMEOUT: dbglog(DBG_ERROR, "VMU LCD could not be updated, got MAPLE_ETIMEOUT\n"); + break; default: disableVMU_LCD_val = 1; break; diff --git a/240psuite/Dreamcast/PVR/vmu_print.c b/240psuite/Dreamcast/PVR/vmu_print.c index ab208e64..cbec816b 100644 --- a/240psuite/Dreamcast/PVR/vmu_print.c +++ b/240psuite/Dreamcast/PVR/vmu_print.c @@ -29,7 +29,7 @@ void vmu_clear_bitmap(uint8 bitmap[192]) bitmap[i] = 0x00; } -inline void vmu_flip_bit(uint8 bitmap[192], uint8 x, uint8 y) +void vmu_flip_bit(uint8 bitmap[192], uint8 x, uint8 y) /* (0, 0) is upper-left corner */ { if (x < 48 && y < 32) @@ -45,7 +45,7 @@ void vmu_invert_bitmap(uint8 bitmap[192]) vmu_flip_bit(bitmap, x, y); } -inline void vmu_set_bit(uint8 bitmap[192], uint8 x, uint8 y) +void vmu_set_bit(uint8 bitmap[192], uint8 x, uint8 y) /* (0, 0) is upper-left corner */ { if (x < 48 && y < 32) diff --git a/240psuite/Dreamcast/PVR/vmu_print.h b/240psuite/Dreamcast/PVR/vmu_print.h index d2633368..7592e006 100644 --- a/240psuite/Dreamcast/PVR/vmu_print.h +++ b/240psuite/Dreamcast/PVR/vmu_print.h @@ -25,10 +25,10 @@ void vmu_clear_bitmap(uint8 bitmap[192]); void vmu_invert_bitmap(uint8 bitmap[192]); -inline void vmu_flip_bit(uint8 bitmap[192], uint8 x, uint8 y); +void vmu_flip_bit(uint8 bitmap[192], uint8 x, uint8 y); /* (0, 0) is upper-left corner */ -inline void vmu_set_bit(uint8 bitmap[192], uint8 x, uint8 y); +void vmu_set_bit(uint8 bitmap[192], uint8 x, uint8 y); /* (0, 0) is upper-left corner */ void vmu_draw_char(uint8 bitmap[192], unsigned char c, int x, int y); diff --git a/240psuite/Dreamcast/PVR/vmufs.c b/240psuite/Dreamcast/PVR/vmufs.c index bb93ddec..f655feec 100644 --- a/240psuite/Dreamcast/PVR/vmufs.c +++ b/240psuite/Dreamcast/PVR/vmufs.c @@ -557,7 +557,8 @@ int MemcardSaveExists(char *filename, int *blocks, int *port, int *unit) for(file = 0; file < numfiles; file++) { - if(strncmp(filename, vmufiles[file].filename, VMU_NAME_LEN) == 0) + if(vmufiles[file].filetype == 0x33 && + strncmp(filename, vmufiles[file].filename, VMU_NAME_LEN) == 0) { if(blocks) *blocks = vmufiles[file].filesize;