44 Commits

Author SHA1 Message Date
Konrad Beckmann
8cd0bd1fa3 Improve readme and makefile 2021-07-31 19:18:13 +02:00
Konrad Beckmann
772d63a5f7 New flash driver and integrated loader 2021-07-31 16:05:01 +02:00
Brian Pugh
f2f754e81e remove lupng from the build 2021-07-08 20:06:43 +02:00
Konrad Beckmann
5218701947 ld: Assert that BSS doesn't use too much RAM 2021-07-04 11:45:25 +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
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
GaryZ88
3df1e0a0c0 Adding PC Engine (TurboGrafx-16) Emulation (#78)
Adding PC Engine (TurboGrafx-16) Emulation
2021-02-18 08:16:32 +01:00
Scorp0rX0r
0e2edb09d2 Fix LCD init and merge resume support 2021-02-07 16:36:09 +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
c6014e0bd9 retro-go: Update submodule (gb, nes fixes) and fixup 2021-01-11 12:10:05 +01:00
Konrad Beckmann
62ceaefa87 Include gui in internal flash
This makes it possible to program only the internal flash without any roms loaded and get a menu that loads without crashing.
2021-01-09 23:14:51 +01:00
Konrad Beckmann
945f5d9de0 size: Include sms 2021-01-09 04:22:01 +01:00
Jan Dumon
b656959c4d Integrate smsplusgx 2021-01-08 16:27:21 +01:00
Konrad Beckmann
534c192e90 size.sh/ld: Print nes/gb ram usage correctly 2021-01-07 12:58:53 +01:00
Jan Dumon
1878e9d66e Move heap to DTCMRAM
It should be faster and it makes room for the smsplusgx emulator.
2021-01-05 00:32:11 +01:00
Jan Dumon
0b553b87da Load emulators from flash into memory
This was originally written by Thomas Roth <code@stacksmashing.net> to
make it possible to support more emulators than what fits into memory at
the same time (commit c13aa09b).

Instead of generating a monolithic binary, the different emulators are
stored in flash and loaded into ram right before they are launched.

This is the basis for adding more emulators e.g. smsplusgx.
2021-01-04 17:20:48 +01:00
Konrad Beckmann
7f7e73735c ld/size.sh: Fix ITCMRAM size 2021-01-04 08:18:10 +01:00
Konrad Beckmann
54e8978a1f ld: Use correct RAM_UC length everywhere 2021-01-04 06:59:09 +01:00
Konrad Beckmann
58470a91b9 Only disable caching on fb ram 2021-01-04 06:35:25 +01:00
Konrad Beckmann
909d60f685 Move parse_roms.py artifacts into build/ 2021-01-03 16:30:31 +01:00
Konrad Beckmann
a2b9a1cb97 Rename build folder to build 2020-12-31 04:01:12 +01:00
Konrad Beckmann
7ee7001dce Make external flash size configurable 2020-12-30 16:07:28 +01:00
Konrad Beckmann
2c3c566437 Support 4K, 32K and 64K flash erase 2020-12-29 17:02:43 +01:00
Konrad Beckmann
98954634b1 Fix warnings 2020-12-29 14:04:11 +01:00
Konrad Beckmann
50eef10615 Move nes mappers to the extflash 2020-12-28 19:09:45 +01:00
Konrad Beckmann
7155236cd4 Store odroid object files on the internal flash
Makes the BSOD more robust as the text rendering is stored in the internal flash.
2020-12-28 17:30:09 +01:00
Konrad Beckmann
c9904a37a3 Improve blit/scaling performance 2020-12-27 16:28:30 +01:00
Konrad Beckmann
26b9c90c39 Optimize blitting 2020-12-27 16:24:40 +01:00
Konrad Beckmann
c01f51ff57 Finalize state save/load for gb and nes 2020-12-27 16:21:59 +01:00
Konrad Beckmann
04b704a1d4 Improve menus 2020-12-27 16:21:44 +01:00
Konrad Beckmann
38996de6ac Reorder stuff to get ok performance 2020-12-27 16:20:48 +01:00
Thomas Roth
8bb62c2af8 Working NES and GB switching 2020-12-27 16:20:14 +01:00
Konrad Beckmann
1374269566 Lots of stuff, menu working better than before 2020-12-27 16:19:40 +01:00
Konrad Beckmann
0354e2d9a2 ld: Use symbol to locate stack top 2020-12-27 16:19:20 +01:00
Konrad Beckmann
9f554e4e69 Add MPU protected redzone for the stack 2020-12-27 16:19:15 +01:00
Konrad Beckmann
c8b70b33d3 Implement _sbrk, allocate 16KB heap in RAM 2020-12-27 16:19:08 +01:00
Thomas Roth
da2df65684 Working GB ROM selection 2020-12-27 16:18:04 +01:00
Konrad Beckmann
89abc22b27 Nullpointer redzone 2020-12-11 13:22:06 +01:00
Konrad Beckmann
5b26da5b38 ld: Allocate 4kB of stack 2020-12-11 03:25:00 +01:00
Konrad Beckmann
17a26346f8 ld: Fix memory regions in ldscript slightly 2020-12-11 02:13:39 +01:00
Konrad Beckmann
b230d2480d ld: dos2unix 2020-12-10 21:31:54 +01:00
Konrad Beckmann
d410a84d9f Refactor makefiles 2020-12-10 21:30:21 +01:00
Konrad Beckmann
e0d7623d58 Add initial nofrendo port for GW and Linux 2020-11-29 18:25:32 +01:00