This adds the ability to simply close the emulator when launched
externally and prevents changes designed for linux from generating
conflicting controller configurations on Android (and may be needed for
iOS as well).
This introduces the USE_ALSA flag (replaces the somewhat hacky
"HOST_OS==OS_LINUX && !defined(TARGET_NACL32) && !defined(ANDROID)"
if case).
The Makefiles for beagle, gcwz, lin86 and pandora have been adapted to
reflect this change.
This commit introduces PulseAudio support using PulseAudio's "Simple
API".
The PulseAudio backend will be included during compilation if
USE_PULSEAUDIO is defined.
This *should* add the Android audio backend. I do not have any idea how
to do this properly, but I figured that this might work for the moment.
There's probably a lot of testing required for this to work.
This commit adds the DirectSound audio backend, which is a modified
version of core/oslib/ds_audiostream.cpp.
Porting this was a bit tricky, since ds_audiostream.cpp defined 3
extern functions that the other backends didn't have:
* bool os_IsAudioBuffered();
* bool os_IsAudioBufferedLots();
* int os_getusedSamples();
I came to the conclusion that these methods are obsolete since they are
only used core/windows/winmain.cpp in the function void os_wait_cycl(u32
cycl) - which is used nowhere. Thus, I removed os_wait_cycl and the
headers of the three functions in core/oslib/oslib.h. I also removed the
functions themselves (except for int os_getusedSamples(), which is still
used inside the directsound backend, but can safely declared static for
that purpose).
The DirectSound backend will be included during compilation if HOST_OS
is OS_WINDOWS.
This adds the OSS audio backend, which is basically a slightly modified
version of core/oslib/alsa_audiostream.cpp from the skmp/linux-x64
branch (as of commit cdf9f3dc971506c2efd979275c2869f064e1027c).
The ALSA backend will be included during compilation if HOST_OS is OS_LINUX
and neither TARGET_NACL32 nor ANDROID are defined. This should be
changed to a USE_ALSA flag in the future (for constistency and and
simplicity reasons), but i didn't want to put too much stuff into this
commit.
This adds the OSS audio backend and removes OSS code from
core/linux-dist/main.cpp and core/sdl/main.cpp.
The OSS backend will be included during compilation if the USE_OSS
flag is set.
Although OSS code in core/linux-dist/main.cpp depended on the
TARGET_PANDORA flag instead of USE_OSS, the latter should work too
since it is defined in the Pandora Makefile (lines 7 & 83).
This makes it possible to have multiple audio backends compiled into
reicast (e.g. ALSA & OSS on Linux). These can then selected by the user
via a config option ("backend" iin the "audio" section). It *should*
also be possible to reduce the number of platform-specific ifdefs with this
approach.
Audio backends need to define a struct (audiobackend_t) that holds a
pointer to it's init, push and term function and also a slug and a name
as string. They then need to pass a pointer to this struct to
RegisterAudioBackend() before InitAudio() is called.
For now, I defined a function (RegisterAllAudioBackends) that get's
called exactly once (i.e. upon first call of InitAudio()), where
we can put ifdef'd RegisterAudioBackend() calls into for each backend
that reicast supports.
Please note that this commit just implements the basic audio backend
system - no backends have been ported to the new API yet. For the meantime,
reicast will run without any audio support accross all systems.
- 32 bit code was "fudgy" on this, so simplified via 64bit counters for edge detection
- Maths to count cycles were wrong
- Let's not do 32 bit wrapped maths after beers without any kind of pen-and-paper design
Should fix#594, also see #645
Using default arguments is only allowed in function declarations, not
in typedefs. This fixes the invalid code that caused compilation errors
on systems using GNU g++ 4.9.2, i.e.:
> ../../core/rec-ARM/arm_dyna.cpp: At global scope:
> ../../core/rec-ARM/arm_dyna.cpp:186:79: error: default arguments are only permitted for function parameters
> typedef void FPBinOP (eFSReg Sd, eFSReg Sn, eFSReg Sm, ConditionCode CC=CC_AL);
> ^
> ../../core/rec-ARM/arm_dyna.cpp:187:79: error: default arguments are only permitted for function parameters
> typedef void FPUnOP (eFSReg Sd, eFSReg Sm, ConditionCode CC=CC_AL);
> ^
> ../../core/rec-ARM/arm_dyna.cpp:188:79: error: default arguments are only permitted for function parameters
> typedef void BinaryOP (eReg Rd, eReg Rn, eReg Rm, ConditionCode CC=AL);
> ^
> ../../core/rec-ARM/arm_dyna.cpp:189:79: error: default arguments are only permitted for function parameters
> typedef void BinaryOPImm (eReg Rd, eReg Rn, s32 sImm8, ConditionCode CC=AL);
> ^
> ../../core/rec-ARM/arm_dyna.cpp:771:10: warning: anonymous type with no linkage used to declare variable '<anonymous struct> op_table []' with linkage
> op_table[]=
> ^
> Makefile:89: recipe for target 'obj/rec-ARM/arm_dyna.build_obj' failed
> make: *** [obj/rec-ARM/arm_dyna.build_obj] Error 1
This works, but is extremelly hacky. Must be started without attached debugger, lldb doesn't want to let go of EXC_BAD_ADDRESS, but reicast really depends on it getting delivered as SIGSEGV/SIGBUS. Also xcode has a really bad day upon seeing the jit code. Oh well.
There's some dynarec bug that causes color corruption on bios logo/boot triagles, TA crash on ikaruga and infinitive loop on crazy taxi. I'd guess some fp-memory-write thingy, abi, or smth. Too bad.
- Force code to compile in arm mode (arm jit -> thumb mem functions is complicated)
- SIGILL, SIGBUS. Works w/o Mach exceptions and EXC_BAD_ADDRESS
- Code buffers move to __TEXT, munmapped && memmapped to actually work
- Primitive input. Button + start, or left (works to get out of bios date screen)
- Fixup emitter for thumb2/interworking (didn't work though, reverted to arm cc)
- Block Manager: Disable mem saving / page fault alloc-on-demand logic
- Move cycle counter to r11, r9 is not clean on iOS. Remove r11 from reg alloc list
- Cache flushes for iOS
- log to log.txt
- load game.chd
- Fix coreio fsize
- Fix coreio fopen to seek to 0
- Fix coreio/http to smart-escape urls
- For urls that include \ or % in the filenames, you have to pass them
escaped
- Update gdi parser to use (mostly) streamstream. That code is horrible
and should be rewritten
- coreio core is hacky and horrible at places as well
- Update imgreader to use coreio
- Update cdi parser + driver to use coreio
This is very simplistic, but can already boot and run many games
Known working so far
- Dead Or Alive 2 LE
- Head Hunter
- Marvel VS Capcom 2
Not working
- (Almost) all others
THIS IS A MESS. Sorry @angelXwind :p. We'll have to clean up and merge for r8, but most of the nasty work is there.
What works:
- full init, memalloc, mprotects, etc
- boot
- gles2
What doesn't:
- Exceptions for page faults
- Breaks texture cache
- Breaks dynarec because of fastpath
- segfaults don't work, needs special mach exc_server magic that still eludes me after 5 hours
- Dynarecs. RWX issues, and broken buffer mappings. Also some minnor linking stuff (most of it is taken care of)
- Audio. I just killed it off.
- All of the ui. Was getting in the way of me not knowing how to edit story boards...
- Input
Also, merged branch 'skmp/mac86-hackport' into skmp/ios-wip
Have fun~
- Texkill needs to be done before texture allocation, which is now done during parsing (texture-sync update)
- palette_update needs to be called from the emu thread, before kicking off the render
Fixes#141, "Main menus on POD and Speed Devil show up black"
Seems like the TA doesn't touch any of the memory structures before first write (and probably later on, but we're not gonna support corrupted ta streams for now)
According to p1pkin
«At least in SpeedDevils, at title screen game do a bit weird thing
- Init TA context
- Send lists to TA
- Init the same context again
- Start Render
so, if you are clear stored poly/vertex data at "TA_LIST_INIT" pvr2 reg write - you'll get black screen instead game title»
Fixes#141, "Main menus on POD and Speed Devil show up black"
Seems like the TA doesn't touch any of the memory structures before first write (and probably later on, but we're not gonna support corrupted ta streams for now)
According to p1pkin
«At least in SpeedDevils, at title screen game do a bit weird thing
- Init TA context
- Send lists to TA
- Init the same context again
- Start Render
so, if you are clear stored poly/vertex data at "TA_LIST_INIT" pvr2 reg write - you'll get black screen instead game title»
Fixes#141, "Main menus on POD and Speed Devil show up black"
Seems like the TA doesn't touch any of the memory structures before first write (and probably later on, but we're not gonna support corrupted ta streams for now)
According to p1pkin
«At least in SpeedDevils, at title screen game do a bit weird thing
- Init TA context
- Send lists to TA
- Init the same context again
- Start Render
so, if you are clear stored poly/vertex data at "TA_LIST_INIT" pvr2 reg write - you'll get black screen instead game title»
I forgot how much opengl sucked, so I figured I might try a port.
Nvidia doesn't draw (must be some fragment binding issue?, randomlulz returns GL_INVALID on glAttribPtr as well)
Intel doesn't compile the shader (and the error message makes no real sense. wut?)
Amd driver simply crashes (wheehaa)
All and all, doesn't look like much has changed in opengl the past 10 years, apart from even uglier initialization and more fragmented specs ~
Fixes#141, "Main menus on POD and Speed Devil show up black"
Seems like the TA doesn't touch any of the memory structures before first write (and probably later on, but we're not gonna support corrupted ta streams for now)
According to p1pkin
«At least in SpeedDevils, at title screen game do a bit weird thing
- Init TA context
- Send lists to TA
- Init the same context again
- Start Render
so, if you are clear stored poly/vertex data at "TA_LIST_INIT" pvr2 reg write - you'll get black screen instead game title»
Woohoo, a new gcc bug!
The x86 linux dynarec just got a couple of months further away thanks to gcc being totally retarded as some things (namely, fastcalls). And yes, reicast depends on fastcalls for a lot of things, and no, i don't care if you don't like fastcalls.
Notes:
Disc swapping should work on .gdi files (probably .chd files too).
Swapping with .cdi files is not currently supported because we currently create inaccurate TOC for them.
Only x86/Windows has a disc swap handler right now (ie: you can't swap on Android).
Clean up the menu or at least reduce the number of shells
Build native library against the same API base as shell app
Update Khronos source to newest stable, Reference EGL14
Add margins, Restore lost identifiers, Update tested devices
Adjust drawer menu handle to prevent unintentional launch
Revise EGL handling to check multiple contexts to configure
Update README to include information about translating
Add native library handling to the debug, Enable log reading
Adjust drawer menu touch area, Fix L / R assignment calls
Remove some merge junk from trying to resolve git issues
-Added config to input fragment
-Reduced logging
-Init the mic at the right time during startup so that port 2 either
gets vmu or mic
-Has not been tested on device without mic
-Needs more testing in games
Integrate previously locked settings with valid user warning
Put a note about the beta compile link in the README.md
Add a super fancy about that supports Github commit logs
Revise about with git log, Highlight current build in commits
Check for a null value when getting the current commit sha
Chinese Simplified Translation from @weihan1102
Rename Simplified Chinese res folder for proper complie
Add links to the website and beta compile site from about
Add option for custom mapping to set joystick to non-dpad
Fix a missing check for the user saved value of the A button
The Moga only operates one way, there is no variation test
Add region values, Set cable to match formatting of others
Reduce the number of random string array calls, jsCompat
It was unnecessary to keep getting the array, It was even less
necessary to keep getting the preference values. The port
identification letters are set multi-lingual values.
Label the about links to prevent any confusion (Not mirrors)
Missing a check on the motion events to determine compat
Add a check to verify Kitkat, Remove the standard override
The new API verification complains about the Override, so this is a
preventative step for if and when it is updated. It may also prevent
some issues with compatibility.
Run organize imports to reduce the amount of excess code
Add a controller option to go to custom layout from selection
Prevent a leak where multiple items were highlighted in list
@AndroidGX French Translation resources
- Clipping is done on the SH4 side, garbage might be outside the screen
- Mod vols aren't drawn anyway for now
- I wonder how much does this cost on the rend-thread?
Reverted changes in maple_cfg.cpp except a minor memory leak
Fixed an issue with the Xbox 360 controller support, that the first
press of the DPAD would not get handled
Lots of improvments on multi-controller support
- make ta_skip to ta frame skipping instead of skipping parsing entierly. it handles 1 out of every (N+1) frames.
- re purpose rend to unstable opts, as pvr.rend is of no real use right now