397 Commits

Author SHA1 Message Date
Konrad Beckmann
7da8b4bd37 readme: Inform about lz4 2021-06-25 09:53:37 +02:00
bzhxx
b30d09365c GB/GBC : add LZ4 ROM compressed support (#91)
* add LZ4 decompression support

* NES: add support for LZ4 compressed ROM. Example : lz4 --best --content-size --no-frame-crc my_rom.nes my_compressed_rom.nes

* fix Makefile

* nes: Expose a buffer with unused ram

* nes: Fix indentation in osd_getromdata

* nes: Use _NES_ROM_UNPACK_BUFFER for LZ4 unpacking

* parse_roms: Compress NES ROMs with LZ4

* fix python typing for backward compatibility 3.6

* NES LZ4 support : add LZ4 format parsing

* Update parse_roms.py

remove unecessary line.

* Update lz4_depack.c

reorder the source code. The notice is now at the top.

* Update parse_roms.py

clean up.

* Update lz4_depack.c

remove  <string.h>.

* change submodule link

* typo comment fix

* GB/GBC add LZ4 ROM compression

* LZ4 library can be shared between emulators

* Add GB SRAM buffer setup using linker

* GB/GBC add LZ4 ROM support with bank switching

* add LZ4 decompress function in assembler for fun and test

* Remove static SRAM memory allocation used by the save function to increase the bank switching cache (14 > 26). The SRAM cache is stolen during save and reloaded right after

* add support for Mix compression and alternative compression statregy to limite cache swapping. By default (--compress), all the banks are compressed except bank#0. Using (--compress_gb_speed), the ROM banks are lightly compressed by selecting the larger banks to fill the cache and by trimming the empty banks. The option (--compress_gb_speed) can be used when a game speed is affected by the compression by default (--compress).

* update LZ4 loader with increased SRAM cache size and support for mixing compressed/uncompressed banks

* Fix to support MBC5 8MB ROM size (256 banks)Fix to support MBC5 8MB ROM size (256 banks)

* Linux emulator NES and GB start checked

* module update.

* Update parse_roms.py

remove print.

* update submodule. fix. LZ4 GB for roms size > 2MB

* LZ4 change compression args --best replaced by -9. Fix typo in new args

* Revert "Merge remote-tracking branch 'upstream/main' into main"

This reverts commit 487606760c, reversing
changes made to d9ab8c2870.

* Revert "Revert "Merge remote-tracking branch 'upstream/main' into main""

This reverts commit 6882de3955.

* GB/GBC: fix LCD glitch at the start by cleaning up the buffer emulator

Co-authored-by: Konrad Beckmann <konrad.beckmann@gmail.com>
Co-authored-by: brice <brice.lehouerou@free.fr>
2021-06-25 09:10:30 +02:00
Konrad Beckmann
a55120d69e debug: Disable action on a menu item 2021-06-17 12:28:27 +02:00
Konrad Beckmann
0459feb40a debug: Add more flash debug features 2021-06-17 12:22:46 +02:00
Konrad Beckmann
b250e5c555 Add debug menu to show flash jdec id 2021-06-17 10:30:58 +02:00
Konrad Beckmann
c11d240016 Update submodule 2021-06-07 09:05:37 +02:00
Konrad Beckmann
d8b19c8809 Update submodule 2021-06-06 23:55:06 +02:00
Konrad Beckmann
44ea3678dc Cleanup readme 2021-06-06 15:04:22 +02:00
Konrad Beckmann
a3149424f5 pce: Convert to spaces 2021-05-24 14:11:58 +02:00
Konrad Beckmann
5db4adc40f Increase audio level with a factor 2
Sound will be twice as loud now.

This may lead to a brownout if the battery isn't connected.
2021-05-24 14:09:43 +02:00
Konrad Beckmann
e3a0a06d13 Makefile: Allow gcc 11 2021-05-15 16:17:18 +02:00
Konrad Beckmann
c0ef062af7 Makefile: Check and verify installed tools
This will check for:
- gcc version 10
- objcopy elf32-littlearm
- objdump arm7e-m

Can be ignored by setting CHECK_TOOLS=0
2021-05-09 20:13:35 +02:00
Konrad Beckmann
06f8760433 parse_roms.py: Use -9 lz4 compression for compatibility
Older versions of lz4 don't support --best, and the gain is
not significant (in my tests).
2021-05-09 15:06:47 +02:00
Konrad Beckmann
80e570a219 parse_roms.py: Don't compress roms that are too large 2021-05-06 08:54:08 +02:00
Konrad Beckmann
137bdeeb7b parse_roms.py: Properly implement previous commit 2021-05-01 21:22:50 +02:00
Konrad Beckmann
203678a7e7 parse_roms.py: Error out when there are no roms 2021-05-01 16:48:23 +02:00
Konrad Beckmann
fec69518c3 Makefile: Add COMPRESS variable to control if compression should be performed 2021-04-27 22:41:32 +02:00
Konrad Beckmann
fe6bc49633 ci: Add LZ4 2021-04-26 21:27:45 +02:00
Konrad Beckmann
143cf7c6de ci: Install lz4 2021-04-26 21:17:42 +02:00
bzhxx
8a4ede05c1 nes: Add LZ4 compression support (#86)
Co-authored-by: Konrad Beckmann <konrad.beckmann@gmail.com>
2021-04-26 21:12:29 +02:00
Konrad Beckmann
6ceb4baa70 Update submodule 2021-03-20 23:04:35 +01:00
Konrad Beckmann
5adbdbc429 Dump and program pce saves
closes #79
2021-03-04 22:43:33 +01:00
Konrad Beckmann
efcb112a67 lcd: Increase startup delay to mitigate white screen issue 2021-03-04 22:39:28 +01:00
Konrad Beckmann
6c22c6c2be parse_roms.py: Force objcopy to use arch armv7e-m 2021-03-02 20:19:31 +01:00
Konrad Beckmann
7b8109f0c2 readme: Clarify how to run make download_sdk 2021-02-20 17:10:37 +01:00
Konrad Beckmann
1bb1268c0f ci: mv files instead of cp 2021-02-18 08:22:29 +01:00
Konrad Beckmann
461d43380f ci: Download a PCE rom 2021-02-18 08:22:28 +01:00
GaryZ88
3df1e0a0c0 Adding PC Engine (TurboGrafx-16) Emulation (#78)
Adding PC Engine (TurboGrafx-16) Emulation
2021-02-18 08:16:32 +01:00
Konrad Beckmann
4b0444b7b4 Add menu entry to power off the unit 2021-02-15 15:24:21 +01:00
Konrad Beckmann
d9f570d75f ci: Download actual ROMs for GG and SMS 2021-02-12 14:17:31 +01:00
Jan Dumon
ea18ae2f5f Use objcopy to convert roms to .o files
Converting the rom files to .c files with char arrays is very heavy on
the memory usage of the compiler. By converting them directly to .o
files this step is no longer needed.

The Makefile dependencies of generating the rom files has been fixed.
Parsing the rom files will now only happen once when -j is used.
2021-02-12 13:55:51 +01:00
Scorp0rX0r
0e2edb09d2 Fix LCD init and merge resume support 2021-02-07 16:36:09 +01:00
Jan Dumon
8b5dd9aca6 reduce memory usage of listbox_item_t
Instead of using a fixed-length buffer, the user of listbox_item_t is
responsible for the memory. Most of the items are titles of roms and
those are static.
2021-01-22 19:11:10 +01:00
Jan Dumon
c8c7c6cb35 Increase speed of keeping keys pressed 2021-01-22 17:43:03 +01:00
deanhuff
098fd63532 Fix dump & load save scripts (#70)
* Update program_saves.sh

The rom struct was changed from `rom_entry_t` to `retro_emulator_file_t` which also had the effect that the rom name member changed name from `rom_name` to `name`.
2021-01-22 06:19:52 +01:00
Jan Dumon
39377661f8 parse_roms: generate a const struct of the roms
This avoids using malloc for the menu structure of the roms.
2021-01-21 17:26:34 +01:00
Jan Dumon
aab0a71eb9 When keeping pressed repeat directional keys in menus 2021-01-21 06:36:35 +01:00
Jan Dumon
eecbcd6a0a smsplusgx: fix indentation and remove obsolete code 2021-01-21 06:36:06 +01:00
Jan Dumon
cfd1a4cc37 smsplusgx: use correct blit function 2021-01-21 06:36:06 +01:00
Konrad Beckmann
a4a0602527 smsplusgx: Divide volume factor by 2 to prevent overflow in stereo mixing 2021-01-19 09:42:52 +01:00
Konrad Beckmann
6932a5f341 Improve audio volume calculation 2021-01-18 21:31:34 +01:00
trochr
0a6744b538 Added a hint for building on Mac 2021-01-18 10:08:59 +01:00
Konrad Beckmann
a047912570 main: Fix BSOD infinite loop 2021-01-16 01:25:49 +01:00
Konrad Beckmann
172b1079bc linux: Adapt gb emulator to new submodule 2021-01-16 00:50:10 +01:00
Konrad Beckmann
1f4dee743d linux: Adapt nes emulator to new submodule 2021-01-16 00:47:08 +01:00
Konrad Beckmann
d6f51d4b8a ci: Build the Dockerfile too 2021-01-15 00:35:45 +01:00
Konrad Beckmann
1670080694 makefile/ld: Improve internal flash programming
Two binaries generated:
- gw_retro_go_intflash.bin containing the internal flash, 0x08000000
- gw_retro_go_extflash.bin containing the external flash, 0x90000000

This enables us to use the openocd program command with "verify", as we force it to verify only the data at 0x08000000.

Previously, we would get warnings from openocd when programming the elf file (Warn : no flash bank found for address 0x90000000). These are now gone.

Makefile targets have been changed to be more clear:

- `make flash_intflash`: flashes the internal flash (0x08000000)
- `make flash_intflash_nc`: same as the above, but  uses nc to communicate with a running openocd session
- `make flash_extflash`: flashes the external flash (0x90000000)
- `make flash`: Flashes both of the above
- `make flash_all`: Alias to flash (kept for legacy reasons, so users can keep running their old commands)
2021-01-13 23:32:32 +01:00
Konrad Beckmann
4b9ebe5b40 ld: Add (NOLOAD) to appropriate sections 2021-01-13 23:03:41 +01:00
Konrad Beckmann
804171b920 makefile: Add -fstack-usage -Wstack-usage=20480 2021-01-13 22:18:53 +01:00
Konrad Beckmann
3e0a92ccb2 size.sh: Calculate MiB correctly 2021-01-13 09:17:32 +01:00