Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
RACE
Commits
99a633f5
Commit
99a633f5
authored
Jan 07, 2020
by
Libretro-Admin
Browse files
Start getting rid of non-libretro codepaths
parent
d0653dd8
Changes
4
Show whitespace changes
Inline
Side-by-side
flash.cpp
View file @
99a633f5
...
...
@@ -57,12 +57,8 @@ unsigned int cartAddrMask = 0x3FFFFF;
/* with selector, I get
* writeSaveGameFile: Couldn't open Battery//mnt/sd/Games/race/ChryMast.ngf file
*/
#ifdef __LIBRETRO__
extern
char
retro_save_directory
[
2048
];
#define SAVEGAME_DIR retro_save_directory
#else
#define SAVEGAME_DIR "states/"
#endif
unsigned
char
currentWriteCycle
=
1
;
/* can be 1 through 6 */
unsigned
char
currentCommand
=
NO_COMMAND
;
...
...
graphics.cpp
View file @
99a633f5
...
...
@@ -15,17 +15,11 @@
#include "StdAfx.h"
#include "main.h"
#ifndef __LIBRETRO__
#include "menu.h"
#include "GP2X.h"
#endif
#include "graphics.h"
#include "memory.h"
#ifdef __LIBRETRO__
extern
ngp_screen
*
screen
;
extern
int
gfx_hacks
;
#endif
#define INITGUID
...
...
@@ -157,9 +151,8 @@ unsigned short p2[16] = {
#ifndef __LIBRETRO__
#define DO_PERIODIC_FLASH_SAVES
#define DO_FPS_DISPLAY
#endif
#if
defined(DO_FPS_DISPLAY) ||
defined(DO_PERIODIC_FLASH_SAVES)
#if defined(DO_PERIODIC_FLASH_SAVES)
static
unsigned
int
frameCount
=
0
;
#endif
...
...
@@ -181,7 +174,7 @@ void graphicsBlitEnd(void)
void
graphics_paint
(
void
);
#if
defined(DO_FPS_DISPLAY) ||
defined(DO_PERIODIC_FLASH_SAVES)
#if defined(DO_PERIODIC_FLASH_SAVES)
inline
void
incFrameCount
()
{
frameCount
++
;
...
...
@@ -470,7 +463,6 @@ void palette_init16(DWORD dwRBitMask, DWORD dwGBitMask, DWORD dwBBitMask)
*/
void
graphicsSetDarkFilterLevel
(
unsigned
filterLevel
)
{
#ifdef __LIBRETRO__
unsigned
prev_dark_filter_level
=
dark_filter_level
;
dark_filter_level
=
filterLevel
;
...
...
@@ -478,7 +470,6 @@ void graphicsSetDarkFilterLevel(unsigned filterLevel)
if
(
dark_filter_level
!=
prev_dark_filter_level
)
palette_init16
(
0xf800
,
0x7e0
,
0x1f
);
#endif
}
void
palette_init8
(
DWORD
dwRBitMask
,
DWORD
dwGBitMask
,
DWORD
dwBBitMask
)
...
...
@@ -1141,7 +1132,7 @@ void graphicsBlitLine(unsigned char render)
tlcsMemWriteB
(
0x00008010
,
tlcsMemReadB
(
0x00008010
)
&
~
0x40
);
graphicsBlitInit
();
#if
defined(DO_FPS_DISPLAY) ||
defined(DO_PERIODIC_FLASH_SAVES)
#if defined(DO_PERIODIC_FLASH_SAVES)
incFrameCount
();
#endif
...
...
neopopsound.cpp
View file @
99a633f5
...
...
@@ -363,13 +363,11 @@ void WriteSoundChip(SoundChip* chip, _u8 data)
//=============================================================================
//#ifdef __LIBRETRO__
void
dac_writeL
(
unsigned
char
data
)
{
static
int
conv
=
5
;
#ifdef __LIBRETRO__
//pretend that conv=5.5 (44100/8000) conversion factor
/* pretend that conv=5.5 (44100/8000) conversion factor */
if
(
conv
==
5
)
conv
=
6
;
...
...
@@ -377,14 +375,11 @@ void dac_writeL(unsigned char data)
{
conv
=
5
;
//
Arregla el sonido del Super Real Mahjong
/*
Arregla el sonido del Super Real Mahjong
*/
if
(
fixsoundmahjong
>
500
)
conv
=
3
;
}
#else
conv
=
1
;
#endif
for
(
int
i
=
0
;
i
<
conv
;
i
++
)
{
...
...
@@ -405,7 +400,6 @@ void dac_writeL(unsigned char data)
}
}
//#endif
/*void dac_writeR(unsigned char data)
{
...
...
@@ -434,11 +428,7 @@ void dac_update(_u16* dac_buffer, int length_bytes)
while
(
length_bytes
>
1
)
{
//Copy then clear DAC data
#ifdef __LIBRETRO__
*
(
dac_buffer
++
)
|=
dacBufferL
[
dacLBufferRead
];
#else
*
(
dac_buffer
++
)
=
dacBufferL
[
dacLBufferRead
];
#endif
dacBufferL
[
dacLBufferRead
]
=
0
;
//silence?
length_bytes
-=
2
;
// 1 byte = 8 bits
...
...
@@ -518,14 +508,8 @@ void sound_init(int SampleRate)
//=============================================================================
#ifdef __LIBRETRO__
#define NGPC_CHIP_FREQUENCY 44100
#else
#define NGPC_CHIP_FREQUENCY 8000
#endif
int
chip_freq
=
NGPC_CHIP_FREQUENCY
;
//what we'd prefer
int
chip_freq
=
NGPC_CHIP_FREQUENCY
;
/* what we'd prefer */
#define CHIPBUFFERLENGTH 35280
...
...
tlcs900h.cpp
View file @
99a633f5
...
...
@@ -6983,7 +6983,7 @@ inline unsigned char makeBCD(int i)
//extern "C" int sceUtilityGetSystemParamInt (int id, int *value);
void
initTimezone
()
void
initTimezone
(
void
)
{
#ifdef __LIBRETRO__
/*#define PSP_SYSTEMPARAM_ID_INT_TIMEZONE 6
...
...
@@ -9181,10 +9181,6 @@ void tlcs_execute(int cycles)
static
unsigned
int
steps
=
1
;
#endif
#ifndef __LIBRETRO__
UpdateInputState
();
#endif
while
(
cycles
>
0
)
{
/* AKTODO */
...
...
@@ -9281,13 +9277,8 @@ void tlcs_execute(int cycles)
//Flavor, this auto-frameskip code is messed up
void
ngpc_run
()
void
ngpc_run
(
void
)
{
#ifndef __LIBRETRO__
int
currTick
=
0
,
lastTick
=
0
;
u32
ticks_per_sec
=
1000
;
#endif
/* !__LIBRETRO__ */
#ifdef AUTO_FRAMESKIP
unsigned
int
skipFrames
=
0
;
#endif
/* AUTO_FRAMESKIP */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment