mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-25 20:16:54 +01:00
Update to align with latest checkins
This commit is contained in:
parent
de2cb405f2
commit
8e41f33af9
2
Makefile
2
Makefile
@ -30,8 +30,8 @@ SRCS = \
|
|||||||
flashcart/64drive/64drive.c \
|
flashcart/64drive/64drive.c \
|
||||||
flashcart/flashcart_utils.c \
|
flashcart/flashcart_utils.c \
|
||||||
flashcart/ed64/ed64_vseries.c \
|
flashcart/ed64/ed64_vseries.c \
|
||||||
|
flashcart/ed64/ed64_xseries.c \
|
||||||
flashcart/flashcart.c \
|
flashcart/flashcart.c \
|
||||||
flashcart/ed64/ed64x.c \
|
|
||||||
flashcart/sc64/sc64_ll.c \
|
flashcart/sc64/sc64_ll.c \
|
||||||
flashcart/sc64/sc64.c \
|
flashcart/sc64/sc64.c \
|
||||||
libs/libspng/spng/spng.c \
|
libs/libspng/spng/spng.c \
|
||||||
|
@ -9,41 +9,37 @@
|
|||||||
#include "utils/utils.h"
|
#include "utils/utils.h"
|
||||||
|
|
||||||
#include "../flashcart_utils.h"
|
#include "../flashcart_utils.h"
|
||||||
#include "ed64x_ll.h"
|
#include "ed64_xseries_ll.h"
|
||||||
#include "ed64x.h"
|
#include "ed64_xseries.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// potentially handle if the firmware supports it...
|
// potentially handle if the firmware supports it...
|
||||||
// ED64_V1_0 = 110,
|
|
||||||
// ED64_V2_0 = 320,
|
|
||||||
// ED64_V2_5 = 325,
|
|
||||||
// ED64_V3_0 = 330,
|
|
||||||
ED64_X5_0 = 550,
|
ED64_X5_0 = 550,
|
||||||
ED64_X7_0 = 570,
|
ED64_X7_0 = 570,
|
||||||
ED64_UKNOWN = 0,
|
ED64_UKNOWN = 0,
|
||||||
} ed64x_device_variant_t;
|
} ed64_xseries_device_variant_t;
|
||||||
|
|
||||||
/* ED64 save location base address */
|
/* ED64 save location base address */
|
||||||
#define SRAM_ADDRESS (0xA8000000)
|
#define SRAM_ADDRESS (0xA8000000)
|
||||||
/* ED64 ROM location base address */
|
/* ED64 ROM location base address */
|
||||||
#define ROM_ADDRESS (0xB0000000)
|
#define ROM_ADDRESS (0xB0000000)
|
||||||
|
|
||||||
static flashcart_err_t ed64x_init (void) {
|
static flashcart_err_t ed64_xseries_init (void) {
|
||||||
|
|
||||||
return FLASHCART_OK;
|
return FLASHCART_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static flashcart_err_t ed64x_deinit (void) {
|
static flashcart_err_t ed64_xseries_deinit (void) {
|
||||||
|
|
||||||
return FLASHCART_OK;
|
return FLASHCART_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ed64x_device_variant_t get_cart_model() {
|
static ed64_xseries_device_variant_t get_cart_model() {
|
||||||
ed64x_device_variant_t variant = ED64_X7_0; // FIXME: check cart model from ll for better feature handling.
|
ed64_xseries_device_variant_t variant = ED64_X7_0; // FIXME: check cart model from ll for better feature handling.
|
||||||
return variant;
|
return variant;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ed64x_has_feature (flashcart_features_t feature) {
|
static bool ed64_xseries_has_feature (flashcart_features_t feature) {
|
||||||
bool is_model_x7 = (get_cart_model() == ED64_X7_0);
|
bool is_model_x7 = (get_cart_model() == ED64_X7_0);
|
||||||
switch (feature) {
|
switch (feature) {
|
||||||
case FLASHCART_FEATURE_RTC: return is_model_x7 ? true : false;
|
case FLASHCART_FEATURE_RTC: return is_model_x7 ? true : false;
|
||||||
@ -55,7 +51,7 @@ static bool ed64x_has_feature (flashcart_features_t feature) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static flashcart_err_t ed64x_load_rom (char *rom_path, flashcart_progress_callback_t *progress) {
|
static flashcart_err_t ed64_xseries_load_rom (char *rom_path, flashcart_progress_callback_t *progress) {
|
||||||
FIL fil;
|
FIL fil;
|
||||||
UINT br;
|
UINT br;
|
||||||
|
|
||||||
@ -97,7 +93,7 @@ static flashcart_err_t ed64x_load_rom (char *rom_path, flashcart_progress_callba
|
|||||||
return FLASHCART_OK;
|
return FLASHCART_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static flashcart_err_t ed64x_load_file (char *file_path, uint32_t rom_offset, uint32_t file_offset) {
|
static flashcart_err_t ed64_xseries_load_file (char *file_path, uint32_t rom_offset, uint32_t file_offset) {
|
||||||
FIL fil;
|
FIL fil;
|
||||||
UINT br;
|
UINT br;
|
||||||
|
|
||||||
@ -135,32 +131,32 @@ static flashcart_err_t ed64x_load_file (char *file_path, uint32_t rom_offset, ui
|
|||||||
return FLASHCART_OK;
|
return FLASHCART_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static flashcart_err_t ed64x_load_save (char *save_path) {
|
static flashcart_err_t ed64_xseries_load_save (char *save_path) {
|
||||||
|
|
||||||
|
|
||||||
return FLASHCART_OK;
|
return FLASHCART_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static flashcart_err_t ed64x_set_save_type (flashcart_save_type_t save_type) {
|
static flashcart_err_t ed64_xseries_set_save_type (flashcart_save_type_t save_type) {
|
||||||
|
|
||||||
|
|
||||||
return FLASHCART_OK;
|
return FLASHCART_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static flashcart_t flashcart_ed64x = {
|
static flashcart_t flashcart_ed64_xseries = {
|
||||||
.init = ed64x_init,
|
.init = ed64_xseries_init,
|
||||||
.deinit = ed64x_deinit,
|
.deinit = ed64_xseries_deinit,
|
||||||
.has_feature = ed64x_has_feature,
|
.has_feature = ed64_xseries_has_feature,
|
||||||
.load_rom = ed64x_load_rom,
|
.load_rom = ed64_xseries_load_rom,
|
||||||
.load_file = ed64x_load_file,
|
.load_file = ed64_xseries_load_file,
|
||||||
.load_save = ed64x_load_save,
|
.load_save = ed64_xseries_load_save,
|
||||||
.load_64dd_ipl = NULL,
|
.load_64dd_ipl = NULL,
|
||||||
.load_64dd_disk = NULL,
|
.load_64dd_disk = NULL,
|
||||||
.set_save_type = ed64x_set_save_type,
|
.set_save_type = ed64_xseries_set_save_type,
|
||||||
.set_save_writeback = NULL,
|
.set_save_writeback = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
flashcart_t *ed64x_get_flashcart (void) {
|
flashcart_t *ed64_xseries_get_flashcart (void) {
|
||||||
return &flashcart_ed64x;
|
return &flashcart_ed64_xseries;
|
||||||
}
|
}
|
@ -16,7 +16,7 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
flashcart_t *ed64xseries_get_flashcart (void);
|
flashcart_t *ed64_xseries_get_flashcart (void);
|
||||||
|
|
||||||
/** @} */ /* ED64_Xseries */
|
/** @} */ /* ED64_Xseries */
|
||||||
|
|
||||||
|
14
src/flashcart/ed64/ed64_xseries_ll.h
Normal file
14
src/flashcart/ed64/ed64_xseries_ll.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* @file ed64_xseries_ll.h
|
||||||
|
* @brief ed64x flashcart low level access
|
||||||
|
* @ingroup flashcart
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FLASHCART_ED64_XSERIES_LL_H__
|
||||||
|
#define FLASHCART_ED64_XSERIES_LL_H__
|
||||||
|
|
||||||
|
|
||||||
|
/** @} */ /* ed64_xseries_ll */
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -1,24 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file ed64x.h
|
|
||||||
* @brief ED64 Xseries flashcart support
|
|
||||||
* @ingroup flashcart
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FLASHCART_ED64X_H__
|
|
||||||
#define FLASHCART_ED64X_H__
|
|
||||||
|
|
||||||
|
|
||||||
#include "../flashcart.h"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @addtogroup ED64_Xseries
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
flashcart_t *ed64x_get_flashcart (void);
|
|
||||||
|
|
||||||
/** @} */ /* ed64x */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,14 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file ed64x_ll.h
|
|
||||||
* @brief ed64x flashcart low level access
|
|
||||||
* @ingroup flashcart
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FLASHCART_ED64X_LL_H__
|
|
||||||
#define FLASHCART_ED64X_LL_H__
|
|
||||||
|
|
||||||
|
|
||||||
/** @} */ /* ed64x */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -11,8 +11,8 @@
|
|||||||
#include "flashcart_utils.h"
|
#include "flashcart_utils.h"
|
||||||
|
|
||||||
#include "ed64/ed64_vseries.h"
|
#include "ed64/ed64_vseries.h"
|
||||||
|
#include "ed64/ed64_xseries.h"
|
||||||
#include "64drive/64drive.h"
|
#include "64drive/64drive.h"
|
||||||
#include "ed64/ed64x.h"
|
|
||||||
#include "sc64/sc64.h"
|
#include "sc64/sc64.h"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user