Skip to content

Commit

Permalink
- Rewritten FDS support and added support to Quick Disk format.
Browse files Browse the repository at this point in the history
Furthermore, an option has been added to select the mode for write operations. Until now, all writes were stored on an external file (to preserve the integrity of the disk image), now it's possible to choose to write them directly to the FDS/QD file (making it portable to other emulators as well).
  • Loading branch information
punesemu committed Dec 3, 2023
1 parent 98d13f6 commit fd482aa
Show file tree
Hide file tree
Showing 14 changed files with 970 additions and 622 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ Changelog:
0.111 (Bug fixes release)
- Rewritten mappers : All.
- Rewritten WRAM, VRAM, PRGROM, CHROM and Nametebles management.
- Rewritten FDS support.
Furthermore, an option has been added to select the mode for write operations. Until now, all writes were stored on an external file (to preserve the integrity of the disk image), now it's possible to choose to write them directly to the FDS/QD file (making it portable to other emulators as well).
- Rewritten the format and management of save states.
WARNING save states of version 0.110 or earlier are no longer compatible.
- Added support to Quick Disk format.
- Added an option for RAM initialization (#276).
It's possible to choose between three values:
* 0x00
Expand Down
2 changes: 1 addition & 1 deletion src/core/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ enum _nes_chips_info {
/* le dimesioni dello screen da renderizzare */
enum screen_dimension { SCR_ROWS = 240, SCR_COLUMNS = 256 };
enum type_of_system_info { HEADER, DATABASE };
enum header_type { iNES_1_0, NES_2_0, UNIF_FORMAT, FDS_FORMAT, NSF_FORMAT, NSFE_FORMAT, HEADER_UNKOWN };
enum header_type { iNES_1_0, NES_2_0, UNIF_FORMAT, FDS_FORMAT, QD_FORMAT, NSF_FORMAT, NSFE_FORMAT, HEADER_UNKOWN };
enum length_file_name_type {
LENGTH_FILE_NAME = 512,
LENGTH_FILE_NAME_MID = 1024,
Expand Down
1 change: 1 addition & 0 deletions src/core/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ typedef struct _config {
BYTE input_display;
BYTE disable_tv_noise;
BYTE disable_sepia_color;
BYTE fds_write_mode;
BYTE fds_disk1sideA_at_reset;
BYTE fds_switch_side_automatically;
BYTE fds_fast_forward;
Expand Down
13 changes: 12 additions & 1 deletion src/core/emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,14 @@ BYTE emu_load_rom(void) {
uTCHAR *ext = emu_ctrl_rom_ext(info.rom.file);

if (!ustrcasecmp(ext, uL(".fds"))) {
if (fds_load_rom() == EXIT_ERROR) {
if (fds_load_rom(FDS_FORMAT) == EXIT_ERROR) {
info.rom.file[0] = 0;
info.rom.change_rom[0] = 0;
goto elaborate_rom_file;
}
emu_recent_roms_add(&recent_roms_permit_add, info.rom.file);
} else if (!ustrcasecmp(ext, uL(".qd"))) {
if (fds_load_rom(QD_FORMAT) == EXIT_ERROR) {
info.rom.file[0] = 0;
info.rom.change_rom[0] = 0;
goto elaborate_rom_file;
Expand Down Expand Up @@ -969,6 +976,10 @@ void emu_info_rom(void) {
log_close_box(uL("FDS"));
fds_info();
return;
} else if (info.header.format == QD_FORMAT) {
log_close_box(uL("Quick Disk"));
fds_info();
return;
} else {
log_close_box(uL("Unknow"));
return;
Expand Down
Loading

0 comments on commit fd482aa

Please sign in to comment.