Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into actions-test
Browse files Browse the repository at this point in the history
  • Loading branch information
angelo-wf committed Aug 19, 2023
2 parents 583fed5 + 81c74be commit 3eb843e
Show file tree
Hide file tree
Showing 24 changed files with 827 additions and 113 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ appsdlflags = -framework SDL2 -F sdl2 -rpath @executable_path/../Frameworks

winexecname = lakesnes.exe

cfiles = snes/spc.c snes/dsp.c snes/apu.c snes/cpu.c snes/dma.c snes/ppu.c snes/cart.c snes/input.c snes/snes.c snes/snes_other.c \
cfiles = snes/spc.c snes/dsp.c snes/apu.c snes/cpu.c snes/dma.c snes/ppu.c snes/cart.c snes/input.c snes/statehandler.c snes/snes.c snes/snes_other.c \
zip/zip.c tracing.c main.c
hfiles = snes/spc.h snes/dsp.h snes/apu.h snes/cpu.h snes/dma.h snes/ppu.h snes/cart.h snes/input.h snes/snes.h \
hfiles = snes/spc.h snes/dsp.h snes/apu.h snes/cpu.h snes/dma.h snes/ppu.h snes/cart.h snes/input.h snes/statehandler.h snes/snes.h \
zip/zip.h zip/miniz.h tracing.h

.PHONY: all clean
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ Additionally, the following command are available:
| E | Hard reset |
| P | Pause |
| O | Frame advance |
| T | Turbo |
| T | Turbo (hold) |
| L | Run one CPU cycle |
| K | Run one SPC cycle |
| J | Dumps some data |
| M | Make save state |
| N | Load save state |

Alt+Enter can be used to toggle fullscreen mode.

Expand All @@ -91,14 +93,17 @@ K does the same, but for the SPC instead (note that this acts as additional SPC

J currently dumps the 128K WRAM, 64K VRAM, 512B CGRAM, 544B OAM and 64K ARAM to a file called `dump.bin`.

Save states and battery saving are not supported yet, but are planned.
Battery saves, save states and `dump.bin` are stored in the SDL-provided preference directory, this is usually in `~/Library/Application Support/LakeSnes` on macOS, `~/.local/share/LakeSnes` on Linux and `%USERPROFILE%\AppData\Roaming\LakeSnes` on Windows.
Battery saves and save states are currently named after the roms full name (including extension) with `.srm` or `.lss` appended respectively.

Note that the save state format and exact naming and location for battery saves and save states is still being worked on and subject to change. Further updates will likely break compatibility with older save states and battery saves might need to be moved around and/or renamed.

Minimizing or hiding the window can cause high CPU usage as this can cause v-sync to stop working.

## Compatibility

The emulator currently only supports regular LoROM and HiROM games (no co-processors and such).
Battery saves are not retained yet. SPC files can also not be loaded yet.
The emulator currently only supports regular LoROM, HiROM and ExHiROM games (no co-processors and such).
SPC files can not be loaded yet, but are planned.

This emulator is definitely not fully accurate. The PPU renders per scanline, so mid-scanline effects are not supported. The DSP executes on a per-sample basis. The SPC and CPU-side timing should be cycle-accurate now, but the exact timing of certain event is still somewhat off. Communication between the CPU and SPC is also not cycle-accurate.

Expand Down
Loading

0 comments on commit 3eb843e

Please sign in to comment.