46 Commits

Author SHA1 Message Date
Brian Pugh
a3af61f484 continue drawing frames and don't skip until CPU usage hits 100 percent 2021-08-03 23:58:49 +02:00
Brian Pugh
1541393509 Long hold pause/set to toggle speedup (#114)
* nes long hold pause/set to toggle speedup

* refactor nes common emu loop; need to fix busyTime

* move odroid_system_tick into common loop, fix cpumon

* nes common_emu_loop

* pce common_emu_loop

* sms common_emu_loop

* fix some warnings

* setup pause/set macros; remove speedup based on long-pressing pause/set

* Update readme. Initial Controls section commit

* linting

* mute while macro save-stating
2021-07-29 20:20:55 +02:00
Brian Pugh
1dedf5986a change gb pause_pressed and power_pressed to correct dtypes 2021-07-25 09:17:38 +02:00
Brian Pugh
b6bbe8e2bb Add 0.5x, 0.75x, 1.25x and 1.5x speed options (#111)
* fix GB speedup, add 1.25x and 1.5x options

* Add options for 0.5x and 0.75x in gb

* nes speedup

* pce speedup

* sms speedup

Closes #110
Closes #56
2021-07-21 08:23:46 +02:00
Konrad Beckmann
c73bd95d74 Suspend after idling in the main menu
Default timeout is 10 minutes.

Also adds a configurable timeout for this.

Closes #80
2021-07-03 01:45:02 +02:00
Konrad Beckmann
4be407159f emulators: Render frames and pause on power resume
When the user presses the power button from the off
state, the last played game will load. A few frames
will be rendered and the emulator will be paused.

Closes #10
2021-07-01 21:02:16 +02:00
Konrad Beckmann
559e2fc6ec Resume last played game when booting
Closes #38
2021-07-01 00:24:01 +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
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
Scorp0rX0r
0e2edb09d2 Fix LCD init and merge resume support 2021-02-07 16:36:09 +01:00
Konrad Beckmann
6932a5f341 Improve audio volume calculation 2021-01-18 21:31:34 +01:00
Konrad Beckmann
7ce42520d6 Move headers to more sensible places 2021-01-12 23:49:30 +01:00
Konrad Beckmann
c6014e0bd9 retro-go: Update submodule (gb, nes fixes) and fixup 2021-01-11 12:10:05 +01:00
Jan Dumon
00e5d9a25c Added a watchdog to avoid power-cycles when things go wrong 2021-01-08 14:28:48 +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
29451a18c1 gb: Support GBC 2020-12-29 03:41:26 +01:00
Konrad Beckmann
c1efeecc23 Correctly specify the audio buffer size to handle 50/60 Hz 2020-12-29 03:05:15 +01:00
Konrad Beckmann
d34667cae4 gb: Store actual number of bytes of state save 2020-12-29 00:12:22 +01:00
Jan Dumon
000bffde95 gb: use screen_blit_v3to5 2020-12-27 22:09:29 +01:00
Konrad Beckmann
bd02b964fe Fix some additional warnings 2020-12-27 22:01:33 +01:00
Jan Dumon
e618b0d8ef fixed compiler warnings 2020-12-27 19:54:48 +01:00
Konrad Beckmann
09148a16f6 Fix rendering bug, support changing palettes 2020-12-27 16:34:33 +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
0a93f7752f Control volume correctly 2020-12-27 16:21:48 +01:00
Konrad Beckmann
04b704a1d4 Improve menus 2020-12-27 16:21:44 +01:00
Konrad Beckmann
2cabf8a6d8 Clear audio buffer while OSD menu is showing 2020-12-27 16:21:40 +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
Thomas Roth
da2df65684 Working GB ROM selection 2020-12-27 16:18:04 +01:00
Konrad Beckmann
d4854c7310 Add initial GUI hack 2020-12-27 16:17:27 +01:00
Konrad Beckmann
b7cc8814bb Sample initial button states 2020-12-11 02:24:49 +01:00
Konrad Beckmann
02c0c4ec16 gb: Fix synchronization
This restores 60 solid FPS together with nice audio.
2020-12-09 20:06:12 +01:00
Konrad Beckmann
b4411f521a gb: Fix border in jth rendering 2020-12-09 19:21:47 +01:00
Thomas Roth
cc17a98f63 Increase volume 2020-12-09 19:16:12 +01:00
Thomas Roth
16d71d29a2 GB: Fix sound-glitches 2020-12-09 19:16:12 +01:00
Konrad Beckmann
e442572843 gb: Add bilinear and jth scaling 2020-12-09 17:17:55 +01:00
Konrad Beckmann
8d77b3d354 Add profiling macros 2020-12-08 02:24:53 +01:00
Konrad Beckmann
948ff8fe63 gb: Disable DCACHE for AHBRAM (framebuffer area) 2020-12-06 18:34:31 +01:00
Konrad Beckmann
fddc3f2fb2 gb: Vsync 2020-12-06 18:05:11 +01:00
Konrad Beckmann
c9a300a8be gb: Support state saving to flash 2020-12-06 17:22:32 +01:00
Konrad Beckmann
88d1366e13 gb: Add mute button 2020-12-06 16:07:18 +01:00
Konrad Beckmann
c516f8e90b gb: Allocate framebuffer in ITCRAM 2020-12-05 22:45:31 +01:00
Konrad Beckmann
d34ad49f70 gb: Add basic (bad) audio support 2020-12-03 11:16:02 +01:00
Konrad Beckmann
1365157d36 Initial gnuboy integration 2020-12-02 15:18:34 +01:00