Commit Graph

210 Commits

Author SHA1 Message Date
negativeExponent
3e50be9cb9 Cheat: Add raw format and multiline cheat support
- Add handling raw cheat formats
Fix https://github.com/libretro/libretro-fceumm/issues/378

- Add multiline cheat support
2020-08-31 10:50:19 +08:00
negativeExponent
a20dc87b43 Fix SIGSEGV error when using Famicom expansion devices (port 5) 2020-07-25 14:17:26 +08:00
Jean-André Santoni
aeaae26136 Add Micro Mages to fourscore_db_list 2020-07-12 21:04:09 +07:00
negativeExponent
48b80d3230 Fix input not working on big-endian systems (regression fix)
Fix https://github.com/libretro/libretro-fceumm/issues/372
2020-06-04 13:26:06 +08:00
Francisco Javier Trujillo Mata
c68bfd4c7f Adapt ps2 port to latest SDK Status 2020-05-19 22:12:38 +02:00
hizzlekizzle
b894f42f2b Merge pull request #356 from arpruss/master
user-adjustable Zapper tolerance
2020-05-16 19:35:50 -05:00
negativeExponent
542b8e64cb Use proper geometry when switching ntsc filter on or off
- Width changes previously was not respected when using ntsc filter. With full use of overscan, nes width
is 602 px when ntsc filter is used and 256 px on normal
2020-05-06 05:45:24 +08:00
negativeExponent
a81cd5fcb5 Fix build when compiling without NTSC filter support
- broke on last commit
- fixed 3ds build
2020-05-06 05:15:18 +08:00
arpruss
a125c1eec6 adjust Zapper tolerance; make Zapper input tolerance circular rather than rectangular by default 2020-05-05 15:42:26 -05:00
negativeExponent
048d9d9c82 libretro.c: Input updates
- some assorted libretro-related input updates and refactoring
2020-05-05 17:14:15 +08:00
negativeExponent
99347130c3 Fix timing when changing from PAL/Dendy to NTSC
- Happens when starting with PAL/Dendy region and changing to NTSC can cause frame to get stuck in 50 Hz
- using RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO should remedy this.
2020-05-05 10:00:26 +08:00
negativeExponent
122cc30a96 Ntsc: Remove height doubling/scanline effect
- We just use shaders for scanline if needed. ntsc + height doubling causes performance hit
for some slow devices. Any decent platform should be able to handle scanline effect shaders at least.
2020-05-05 09:07:55 +08:00
negativeExponent
9d90c0ca21 Fix https://github.com/libretro/libretro-fceumm/issues/346 2020-03-21 08:49:45 +08:00
negativeExponent
4ed6ed2443 libretro.c: Change indents from tabs to spaces 2020-02-29 09:48:09 +08:00
negativeExponent
a53e7ace23 Move overscan after rendering the NTSC frame, add ntsc scanlines
- do overscan cropping after the ntsc frame is generated. this allows
removing left and right screen artifacts when using horizontal crop like
what you would see happen in TV when adjusting horizontal size (HSIZE).

- add core option that implements NTSC scanline effects. This requires
framebuffer to double the height, so a define is added (NTSC_SCANLINES at
the top of libretro.c) to disable this on some low-memory platforms or just disable NTSC filters altogether.

- some minor cleanups
2020-02-29 09:35:18 +08:00
negativeExponent
fa74a364de Fix colour emphasis support for NTSC filter & raw palette + nes decoder shader
- this implementation is based on a more accurate colour emphasis from fceux.

- The raw palette + nes decoder shader was kinda incomplete since the implementation was based on
a per-frame basis which means that the emphasis bits were read once and applied to the whole frame. This
means that some games that uses a per pixel or per scanline emphasis would not appear correct. The more
accurate implementation reads emphasis bits from bits 5-7 of PPU[1] and saves this info in a separate frame.

- The same implementation is also used to fix emphasis for the ntsc filter.
2020-02-25 21:05:47 +08:00
negativeExponent
4f599a77f9 NtscFilter: Fix palette for VS. System games and cleanup
- fix palette for vs. system
- move most of the ntsc filter code to its own branch
- use fixed value for ntsc width and when its cropped
2020-02-25 09:39:37 +08:00
negativeExponent
695405ce56 Fix colour emphasis when using palette presets
This is an issue i found when implementing the NTSC filters. Currently when using palette presets,
no clour emphasis is seen on games that supports it. This is cause because the palette table is
fille with the same 64*3 colour info.

Using custom palette (palette file) and default both creates the emphasis as expected. So internally,
fceumm is able to support such feature.

The fix is to generate the base palette (64 * 3 with each triplet representing rgb colour), and then
send this internally using FCEUI_SetPaletteArray() to fill the colour table with emphasis instead.
2020-02-25 07:13:42 +08:00
negativeExponent
266bc3b92f Implement blargg ntsc filters
- this implements blargg's nes ntsc filters using core options
- an optional height doubling is also added but disabled for performance reasons (might make that optional as a core option)
- since PS2 and PSP have their own blitter branches, these platforms do not have the ntsc filters since i dont have the means to test on those systems.
- compile with HAVE_NTSC=1 to have these options, HAVE_NTSC=0 disabled filter including core options
- HAVE_NTSC=1 is set as default, other than PS2 and PSP as stated above.
2020-02-23 20:05:12 +08:00
negativeExponent
f9fb33d8e8 Silence warnings and fixes
- Silence warning [-Wmaybe-uninitialized]
- m359: Fix value overflow
- m534: Silence warnings
- mmc1: Silence warnings
- Silence more warnings
2020-02-17 10:30:42 +08:00
twinaphex
81058f3558 C89 build fixes 2020-02-16 19:34:14 +01:00
negativeExponent
bbce95d5aa Add prg and chr checksums and rearrange rom info logs 2020-02-16 21:54:21 +08:00
negativeExponent
1c94704512 Minimize core options shown by default
- This creates 2 new advance core options to minimize the number of core options shown
-- Advance System Options contains:
--- Overclock
--- RAM power on state
--- no-sprite limit
--- simultaneous opposing direction press
--- zapper crosshairs
-- Advance Sound Options contains:
--- Master volume
--- Sound quality
--- on/off for NES' 5-channel apu
- This also re-arranges the core options when advance options are shown, system options on top,
  gfx/palette/geometry options next, input etc.
2020-02-15 11:23:07 +08:00
negativeExponent
fa7b15eb61 Update region overrides and overclocking
- ines.c - misc cleanups
- Fix Dendy not restored when changing overrides back to auto mode
- directly apply new scanlines and additional scanlines when changing overclock settings
- (readability) change variable name overlock_state to overclock_enabled
2020-02-07 20:50:25 +08:00
negativeExponent
dc85a40951 Buildfix
- use shorter strings for state names
- make variables static
- turn C++ comments to C comments
- cleanup dead code in boards
2020-01-24 19:57:24 +08:00
twinaphex
58030a374d VLAs not supported in C89 2019-12-11 16:46:06 +01:00
Joseph C. Osborn
dbcfcc574a Put back some formatting 2019-11-06 16:06:09 -08:00
Joseph C. Osborn
112be4b57e Memory map some PPU buffers with 1 << 31 mask
Except 4 PPU register bytes starting at $2000
2019-11-06 16:02:50 -08:00
retro-wertz
8446a7ba58 dipswitch.c: Rename src and header file
- (non function-changing update) just for consistency, append "libretro_" to source file to be consistent with new core option file
2019-07-21 10:27:26 +08:00
retro-wertz
be1d0a3dac diswitch.c: Fix crash issues and and cleanup
- Partial rewrite to clean up dipswitch struct to prevent potential crashes
- Fix problems on vs games without dipswitch to cause core to crash
- Create dipswitch struct based on new core options layout
2019-07-21 09:57:03 +08:00
retro-wertz
3659603d19 Add core option sublabels 2019-07-20 01:24:08 +08:00
twinaphex
dae081ba6d Implement new environment callback RETRO_ENVIRONMENT_GET_INPUT_BITMASKS 2019-06-21 11:21:46 +02:00
Yoshi Sugawara
38ba67413f Add back support for pointer device (touchscreen) for lightgun input 2019-06-10 17:16:00 -10:00
retro-wertz
e654ed305c vsuni: simplify game database and other fixes
- simplify game database
- remove pre-configured core options. they are now created on a per-game basis on rom load.
- some minor data type changes
2019-05-22 20:32:50 +08:00
retro-wertz
16b689f7e0 Fix other input types not working on startup when type is set to auto 2019-05-18 22:39:23 +08:00
retro-wertz
f9aa5e5462 Add dipswitch for VS games and Mapper105 (NWC) 2019-05-18 22:38:41 +08:00
retro-wertz
d164ea7470 Move some startup variables into retro_load_game 2019-03-11 15:39:57 +08:00
retro-wertz
75e837f34a Update libretro.c 2019-02-24 01:51:44 +08:00
Francisco Javier Trujillo Mata
e962d1f19c [PS2] Fix wrong palette in FCEUmm 2019-02-22 00:05:24 +01:00
Francisco Javier Trujillo Mata
9715f13bc7 Improvement paddings
Improvement palette
2019-02-17 23:23:12 +01:00
Francisco Javier Trujillo Mata
d7f7709a37 Add palette into FCEumm for PS2 2019-02-01 23:39:18 +01:00
retro-wertz
b53fb91239 FDS: Use retro_get_memory_data/size for disk saving 2019-01-04 17:13:09 +08:00
retro-wertz
b6c251b7b2 Cleanup (#248)
* Silence some clang warnings

* Cleanup input and turbo functions

* Update apu pulse' swap duty cycle
2018-12-23 08:46:17 -06:00
retro-wertz
b09a060ae6 Wii related updates for save state fixes/workarounds (#246)
* Wii: Fix uninitialized save state size causing load state problems

- Issue origially from Wii and possibly affects similar devices where
retroarch and the core are one program. The problem was that the
serialize size was not reset when you change game, causing the last
serialized size to be carried over to the next game loaded causing save
state issues due to change in size. Initializing this variable during
retro_init() seems enough for most of the games.

- In this same observation, also initialized some variables in a similar
way.

- also exluded a variable used for sound state that was added for smooth
sound after load state which causes similar loading issues as well.

- default sample rate has been lowered to 32K as well as to minimize
some stuttering for these devices, while maintaining 48K sample rate for
others.

- Some comments are added to modified section as necessary.

* Add workaround for save state issue in Wii with expansion audio

- Some mappers are not loading states as well. Seems to affect those
that are using expansion audio. some of these mappers(bandai, mmc5,
namco106), the state variables has to be expanded so that it will
load states fine with big endian while others (vrc6, vrc7 sunsoft), some
variables that were added for smoother audio during load state has been
removed.

- This does not guarantee though that other mappers might not have
similar incompatibilities after loading a state but so far, some of the
most common roms in each mapper has been tested to load fine.

* FDS: Expand state variables for big endian compatibility

* FDS: Change OSD label from Disk 0 to Disk 1... when switching disks

- Minor osd label change that now shows Disk 1 of (# of disks) instead
of just Disk 0 Side nth.
2018-12-14 20:23:43 -06:00
retro-wertz
34985a9d6e Set max_width and max_height to its actual NES values
Fix crash while using video filters and video dimensions is changed
for example when using the overscan options.
2018-12-05 16:05:55 +08:00
Tatsuya79
b238ca5d62 Update libretro.c 2018-12-04 11:27:54 +01:00
retro-wertz
b5803e0e1d c89 compliant? (#237)
* Replace C++ comments into  C comments

* Move INLINE out of Makefile.common, move to fceu-types.h

An INLINE define is still existing in Makefile.common for msvc (dont
have a way to to test that). Moved the rest into fceu-types.h using the
one already existing from emu2413.h.

* Increase maximum volume for apu channels
2018-12-03 20:25:17 -06:00
retro-wertz
829a7552f1 Audiostuff (#236)
* Add option to enable/disable audio channels

Audio options are backports from FCEUX. Options are set as on/off toggle for each apu channel.

Compile with DEBUG=1 to see options.

* Add missing audio state vars, fix for hq audio when using runahead

* Additional checks for save ram (battery)

* Cleanup

* Update libretro header
2018-11-29 19:22:36 -06:00
retro-wertz
9d9c48007d Add core option: RAM power up state 2018-11-25 21:45:52 +08:00
retro-wertz
3cd1ea0060 palette:Labeling and index changes 2018-11-25 09:01:21 +08:00