-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preliminary port to WiiU. #11001
base: master
Are you sure you want to change the base?
preliminary port to WiiU. #11001
Conversation
Oh snap, big-endian again! I thought we were finally past that, heh. Not that it's a bad thing to support... Nice work, but I'm not gonna look much at this until after the 1.6 release.. |
PPSSPP looks godly on the wiiu gamepad, totally worth the trouble of dealing with big-endian :D, with that said, big-endian support was already there, just not everywhere, probably a remnant from the xbox360 days. and there is no rush, the port is still far from complete anyway, I only made the PR this early so others can looks at it/test it, and maybe point me to the right direction of why the software renderer is misbehaving. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems cool. Have you tried the IR interpreter? It should be faster than regular interpreter.
-[Unknown]
Core/HLE/__sceAudio.cpp
Outdated
@@ -264,7 +264,7 @@ u32 __AudioEnqueue(AudioChannel &chan, int chanNum, bool blocking) { | |||
if (chan.format == PSP_AUDIO_FORMAT_STEREO) { | |||
const u32 totalSamples = chan.sampleCount * 2; | |||
|
|||
s16_le *sampleData = (s16_le *) Memory::GetPointer(chan.sampleAddress); | |||
s16 *sampleData = (s16 *) Memory::GetPointer(chan.sampleAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this is stored in PSP RAM so isn't it LE?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, but for whatever reason, honoring that here will generate bad audio.
my guess is that all audio goes through decoders/FFMPEG, which all generate native endian audio, which is why the audio buffer here would be native endian "most" of the time.
this is of course not ideal, but the correct way just happens to cost extra cpu time and require big changes to all decodes, for no benefit, so I'm not sure how to deal with this yet.
I also need to find a case where sampleData would actually contain little endian audio, to even be able to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the audio here will come from sceSas, sceAtrac, sceMpeg, or sceMp3. But it's possible for games to generate the audio for sure - it's probably most common in homebrew, though (except in rare cases of games post-processing their audio - I can't remember any specific cases, though.)
-[Unknown]
Core/HLE/sceNetAdhoc.cpp
Outdated
@@ -3482,7 +3482,7 @@ void __NetTriggerCallbacks() | |||
|
|||
for (std::map<int, AdhocctlHandler>::iterator it = adhocctlHandlers.begin(); it != adhocctlHandlers.end(); ++it) { | |||
args[2] = it->second.argument; | |||
__KernelDirectMipsCall(it->second.entryPoint, NULL, args, 3, true); | |||
__KernelDirectMipsCall(it->second.entryPoint, NULL, (u32*)args, 3, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Surely a pointer cast doesn't trigger swapping?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was just to silence the compiler heh. totally forgot about that.
args are probably never read again by native code, but for safety ill just change the type in all functions that come after this.
ext/wiiu/elf2rpl/Makefile
Outdated
@@ -0,0 +1,27 @@ | |||
TARGET := elf2rpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a submodule? Is there a git repo for this?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is yeah : https://github.com/decaf-emu/wut/tree/master/tools/elf2rpl
I did modify the code a bit though and I'm not sure if they want it upstreamed.
I could in theory also move the whole ext/wiiu folder to a different repo and make it a submodule instead, if that's preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, if it's customized, that's different. I just saw it was 20K SLOC and figured it'd probably get updates down the line.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I assumed you were just referring to elf2rpl.
the ext/wiiu folder is just a small sdk I've been building up while working on different projects, so any updates it will see in the near future would be the ones done here anyway.
I do have a repo set up for this but I didn't bother updating it for a long time xD
CMakeLists.txt
Outdated
Common/Vulkan/VulkanLoader.h | ||
Common/Vulkan/VulkanMemory.cpp | ||
Common/Vulkan/VulkanMemory.h) | ||
if(NOT WIIU) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice if we could actually put WIIU ifdefs via ppsspp_config.h in all these files, and have CMake include them always.
-[Unknown]
CMakeLists.txt
Outdated
WiiU/WiiUHost.cpp | ||
WiiU/WiiUMain.cpp | ||
WiiU/GX2GraphicsContext.h | ||
WiiU/GX2GraphicsContext.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Spaces and tabs living together in despicable harmony. Though this file is already a battle ground, I think...
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah sorry, easy to miss spaces here since they are all over the place xD
@@ -1315,8 +1346,22 @@ set(GPU_D3D11 | |||
GPU/D3D11/VertexShaderGeneratorD3D11.h | |||
) | |||
|
|||
# We build Vulkan even on Apple to avoid annoying build differences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*even on Apple and WiiU to avoid annoying build differences?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give it another shot, I got some errors the first time that's why I went with the easier solution.
ext/native/thin3d/thin3d_gx2.cpp
Outdated
|
||
int flags = (mask >> 1) & 0x3; | ||
|
||
if (flags && mask & FBChannel::FB_COLOR_BIT) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Parens around (a & n)
when next to && or ||.
-[Unknown]
ext/CMakeLists.txt
Outdated
add_subdirectory(glew) | ||
endif() | ||
if(NOT WIIU) | ||
add_subdirectory(armips) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have armips because the new debugger (#10909) is going to link with it. Might be nice to have that especially when it gets GE debugger capabilities.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only took it out temporarily because of some errors during compilation, which might take some time to fix. I still plan to bring that back in
WiiU/WiiUMain.cpp
Outdated
int System_GetPropertyInt(SystemProperty prop) { | ||
switch (prop) { | ||
case SYSPROP_DISPLAY_REFRESH_RATE: | ||
return 60000; // 59940 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe have to think about PAL too - I wonder if there's a way to detect this.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the WiiU actually always renders at 59,940 internally, even in PAL mode. the display controller will then downsample it to 50hz when needed.
this was probably enforced so that both TV and gamepad displays remain in sync, which also happens to be a great thing when emulating a psp display heh.
what are the requirements for the IR interpreter compared to the normal interpreter? I gave it a try but it kept crashing. |
The IR interpreter does not have any further requirements, but it has never been tested on big-endian so might have some bugs. |
ah that should be easy to fix then. I'll take a look. |
Core/MIPS/IR/IRInterpreter.cpp
Outdated
result -= (u64)mips->r[inst->src1] * (u64)mips->r[inst->src2]; | ||
memcpy(&mips->lo, &result, 8); | ||
memcpy(&mips->loHi, &result, 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason why the original code used memcpy here instead of a cast ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like a good reason, loHi
via union looks cleaner to me indeed. I think we can kill the memcpys.
-[Unknown]
Core/MIPS/MIPS.h
Outdated
#ifdef COMMON_BIG_ENDIAN | ||
struct { | ||
u32 hi; //242 | ||
u32 lo; //243 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I wonder if this will cause an unexpected surprise elsewhere... at least need to make ThreadContext in sceKernelThread.h match.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh that's a good catch ! I could update that as well but then there are the alignment + savestate problems caused by reading/writing to the others[6] array directly, hmm..
I wonder if I should just keep the old order and just assign lo/hi directly with masking/shifting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I have decided to go with the safer but less optimal solution.
messing with the context layout has just way too many ramifications, and I can't figure out all of them right now heh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - that's better. Almost forgot about save states. I guess that'd be one way to test the audio, heh.
-[Unknown]
Core/MIPS/IR/IRInterpreter.cpp
Outdated
result -= (u64)mips->r[inst->src1] * (u64)mips->r[inst->src2]; | ||
memcpy(&mips->lo, &result, 8); | ||
memcpy(&mips->loHi, &result, 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like a good reason, loHi
via union looks cleaner to me indeed. I think we can kill the memcpys.
-[Unknown]
Bah, forgot about this: The Travis error is probably not related to these changes... -[Unknown] |
Please after finishing port ppsspp to wii u. Can you help for port it to Nintendo Switch as well? Nintendo Switch run homebrews with (nro) file . |
yeah, the commit just before the update passed. |
ae09376
to
e98e9f7
Compare
Any chance we could get a compiled build to test on the WiiU? |
have you tried building it ? https://github.com/aliaspider/ppsspp/tree/wiiu/WiiU the |
I haven't got devkit/build environment setup on my PC, I just thought you may have had a spare RPX already compiled hanging about ;) |
I'm constantly updating this so a precompiled build isn't that useful, but here : don't forget to change the |
u32 *dst = (u32 *)buffer.GetData(); | ||
for (int y = y1; y < y2; ++y) { | ||
for (int x = x1; x < x2; ++x) { | ||
*dst++ = fb.Get32(x, y, stride); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to check that Linux/Windows still optimize this to the same code as before for here and above. I know the software renderer is slow anyway, but best not to pile onto it...
Also nit: if (fmt == GE_FORMAT_8888) {
.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we can't always assume the compiler will optimize this back into a memcpy, although most of them would.
GetCurrentFramebuffer
is only used for the debugger though, and for taking savestate screenshots, not during rendering.
I'll check the switch above though, that one is performance critical.
I'm keeping all image data as little endian and only doing the swap when color math is involved. (the wiiu gpu is little endian btw xD)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, the GPU is LE but CPU is BE? I don't envy Wii U devs...
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha yeah it is quite a challenging situation. it is fine as a dev, their engineers on the other hand must have had a hard time designing this thing heh.
they do offer some tools at least to deal with it, like DMA's with endian swapping, and color channels swizzeling, load/store instructions with swapping, etc.
too bad gcc lacks an __attribute__((little_endian))
extension xD (there is scalar_storage_order
for C at least)
it is beneficial in this case though since there is no need to swap PSP generated image data during display.
@@ -973,7 +973,7 @@ void GPUCommon::FastRunLoop(DisplayList &list) { | |||
int dc = downcount; | |||
for (; dc > 0; --dc) { | |||
// We know that display list PCs have the upper nibble == 0 - no need to mask the pointer | |||
const u32 op = *(const u32 *)(Memory::base + list.pc); | |||
const u32 op = Memory::ReadUnchecked_U32(list.pc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Probably fine, but the reason for this before was to avoid masking the pointer.
Maybe it's not worth it anymore (this was done when 32-bit was more common), but we should remove the comment above if we're not doing that anymore.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I totally missed that comment, I only changed it to Memory::ReadUnchecked_U32
to match the rest of the code, ill change that back then and cast to u32_le*
instead.
WiiU is 32-bit, so it would make sense to keep it the way it was.
for (int j = 0; j < 4; j++) | ||
c[j] = Convert4To8((cdata >> (j * 4)) & 0xF); | ||
*c |= Convert4To8((cdata >> (j * 4)) & 0xF) << (j * 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to use a temporary. I think we use this sometimes to write to uncached GPU memory buffer space. Also for Step_Color5551 / Step_Color565. That said, hopefully we're using jit for these anyway...
-[Unknown]
dst32[x] = Convert5To8((col) & 0x1f); | ||
dst32[x] |= Convert6To8((col >> 5) & 0x3f) << 8; | ||
dst32[x] |= Convert5To8((col >> 11) & 0x1f) << 16; | ||
dst32[x] |= 255 << 24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to use a temporary for all these. I think we may use these funcs sometimes to write directly to uncached GPU buffers...
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok.
I think it would still be optimized into a single write, since the pointer isn't marked volatile, but I'll change that into a temporary.
I had a good chance to try out the build you provided, I couldn't get any PSP game to boot into Gameplay (I guessed this would be the case being its so early and all) but I did manage to get a C64 Emulator to run, heh.. It was abit slow, but it did run :) Thanks. |
? all games I tried run just fine, albeit extremely slow. |
Yes, I copied the assets folder to Sd:/ppsspp? Edit: (actually Loco Roco gets to the language select.. then DSI..) I have had a couple Dsi Errors too.. |
no that's fine, I guess some issues are still there with the IR interpreter. |
Loco Roco does get further when set to interpreter! (In game infact) |
Common/ppcEmitter.h
Outdated
// 64 bit | ||
void LD (PPCReg dest, PPCReg src, int offset = 0); | ||
#else | ||
void LD (PPCReg dest, PPCReg src, int offset = 0) { if(!src) Crash(); LWZ(dest, src, offset); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should LD be supported at all if 32-bit PPC? It's only a valid instruction in 64-bit mode, right, so caller should make sure to avoid it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well it was either this or putting ifdefs everywhere where register state is being saved/restored.
LD is only being used for that purpose. although you are right that it can end up badly if a 64-bit load is actually needed. not sure how to proceed here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a pseudo instruction for that purpose ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok looks like LD and STD aren't being used that often afterall.
I'll change this to ifdef's at the call site instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but... surely if it was previously actually loading only 32 out of 64-bit, it should always have been using a 32-bit load, even on PPC64. If it were actually loading all 64 bits, you'll need different code now anyway? I guess except when loading pointers that the JIT uses for its own purposes maybe.. for that kind of purpose a pseudo instruction would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was only being used to save/restore the callee saved registers in the prologue/epilogue, which is why it only needed a 32bit load/store in 32bit mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. Yeah would definitely prefer ifdefs at the call site then.
6227e4f
to
7a030ce
Compare
Manually update ffmpeg submodule for now, see (hrydgard#11001 (comment))
dfd2614
to
ea05bd9
Compare
7b7cc9e
to
276354b
Compare
8cbf88e
to
8e67bb8
Compare
big-endian fixes. add wiiu build files. add wiiu build files. initial wiiu port. fix IR interpreter on big-endian machines. fix VertexDecoder/SoftGpu on big-endian. Revert "Goodbye PowerPC, you can always be resurrected when the time comes" This reverts commit a54e0cf. WiiU: improve exception handler. PpcJit now works on WiiU, sort of ... PpcJit: disable instructions not available on WiiU. add GPU_GX2, doesn't work yet ... WiiU: add a basic GX2 validation layer. WiiU: some small improvements to GX2_GPU. still not functional. WiiU: hardcode some shaders for now. big endian fix in Loaders.cpp WiiU: more improvements to GPU_GX2. cube.elf now renders correctly. GPUCommon: fix freeze on big-endian. Wii-U: start generating shaders dynamically. Wii-U: add an ubershader. a lot of scenes render correctly now. Wii-U: add support for Hardware T&L. Wii-U: add missing compile flags. fixes savestates. Wii-U: copy tiled surface data correctly. fixes screenshots. Wii-U: use a push buffer for uniforms. README: include temporary manual ffmpeg submodule updating (#1) Manually update ffmpeg submodule for now, see (hrydgard#11001 (comment)) more big-endian fixes. Wii-U: misc. Wii-U: add stencil upload shader. Wii-U: add missing support for analog sticks input. Wii-U: implement CopyFramebufferImage. Wii-U: GX2: fix color attributes. Swap.h: get rid of most overloads. they weren't necessary and were having some really bad side-effects.(like preventing type promotions, eg: result of `swapped<short> * int` was being clamped to short) fix SceAtracIdInfo struct on big-endian. simplify Swap.h Wii-U: register axis input only on change. keep decoded/mixed audio as little endian in PSP memory, to allow emulated code to process it correctly. more big-endian fixes. Wii-U: update shaders. another round of big-endian fixes. Wii-U: misc. libkirk: replace some magic offsets with struct member access. this will also allow using the scalar_storage_order attribute to enforce endianess (gcc only). a bit more big-endian fun. Wii-U: simulate a square range for analog input. Wii-U: build fix. more big-endian fixes. Wii-U: fix webserver. build fix for devkitPPC r38. (WIIU)set toolchain file automatically. use std=c++17. build fix after rebase. debug build fix. texture_atlas big endian fixes. WiiU: GX2 fixes after rebase. WiiU: exception handler tweaks. nits. big endian fixes. derp. WiiU: thin3d: use correct index type. misc. update the ffmpeg module WiiU: fix flipped display PrxDecrypter: big endian fixes. change ext/wiiu into a submodule. big endian ... WiiU: GX2: -add COLOR_2D_RB_SWIZZLE shader. -use correct pitch and endianess with TextureDesc.initDataCallback; Wiiu: GX2: use correct component swizzle. WiiU: GX2: need to use the backbuffer ptr here. WiiU: GX2: no need to endian swap here, fixes screenshots. WiiU: refactor *ShaderGeneratorGX2. WiiU: plug leak. WiiU: rename shader_info.h update wiiu submodule. WiiU: add a basic shader disassembler. WiiU: improve shader generators. use fallback ubershader for unsupported shaderIDs. Mpeg: avoid flagging the mpeg data as invalid when MpegDemux::demux is called with a small read size. WiiU: GX2 fix scissor (was being limited to display res instead of current framebuffer res). WiiU: refactors. WiiU: GX2Framebuffer: fall back to MEM2 when running out of MEM1 memory. WiiU: refactors. WiiU: update *ShaderGenerator big endian. printf big endian fixes. misc. misc. wiiu: update wiiu.cmake Swap.h: add parameter pack templates to automatically cast swap_t<> values to their basic types when passed as parameters to *_LOG calls. plus some refactors. use little endian types for keys in PrxDecrypter.cpp WiiU: misc. Revert "printf big endian fixes." This reverts commit 2334beb.
FakeEmitter/FakeJit/VertexDecoderFake buildfix. big-endian fixes. add wiiu build files. add wiiu build files. initial wiiu port. fix IR interpreter on big-endian machines. fix VertexDecoder/SoftGpu on big-endian. Revert "Goodbye PowerPC, you can always be resurrected when the time comes" This reverts commit a54e0cf. WiiU: improve exception handler. PpcJit now works on WiiU, sort of ... PpcJit: disable instructions not available on WiiU. add GPU_GX2, doesn't work yet ... WiiU: add a basic GX2 validation layer. WiiU: some small improvements to GX2_GPU. still not functional. WiiU: hardcode some shaders for now. big endian fix in Loaders.cpp WiiU: more improvements to GPU_GX2. cube.elf now renders correctly. GPUCommon: fix freeze on big-endian. Wii-U: start generating shaders dynamically. Wii-U: add an ubershader. a lot of scenes render correctly now. Wii-U: add support for Hardware T&L. Wii-U: add missing compile flags. fixes savestates. Wii-U: copy tiled surface data correctly. fixes screenshots. Wii-U: use a push buffer for uniforms. README: include temporary manual ffmpeg submodule updating (#1) Manually update ffmpeg submodule for now, see (hrydgard#11001 (comment)) more big-endian fixes. Wii-U: misc. Wii-U: add stencil upload shader. Wii-U: add missing support for analog sticks input. Wii-U: implement CopyFramebufferImage. Wii-U: GX2: fix color attributes. Swap.h: get rid of most overloads. they weren't necessary and were having some really bad side-effects.(like preventing type promotions, eg: result of `swapped<short> * int` was being clamped to short) fix SceAtracIdInfo struct on big-endian. simplify Swap.h Wii-U: register axis input only on change. keep decoded/mixed audio as little endian in PSP memory, to allow emulated code to process it correctly. more big-endian fixes. Wii-U: update shaders. another round of big-endian fixes. Wii-U: misc. libkirk: replace some magic offsets with struct member access. this will also allow using the scalar_storage_order attribute to enforce endianess (gcc only). a bit more big-endian fun. Wii-U: simulate a square range for analog input. Wii-U: build fix. more big-endian fixes. Wii-U: fix webserver. build fix for devkitPPC r38. (WIIU)set toolchain file automatically. use std=c++17. build fix after rebase. debug build fix. texture_atlas big endian fixes. WiiU: GX2 fixes after rebase. WiiU: exception handler tweaks. nits. big endian fixes. derp. WiiU: thin3d: use correct index type. misc. update the ffmpeg module WiiU: fix flipped display PrxDecrypter: big endian fixes. change ext/wiiu into a submodule. big endian ... WiiU: GX2: -add COLOR_2D_RB_SWIZZLE shader. -use correct pitch and endianess with TextureDesc.initDataCallback; Wiiu: GX2: use correct component swizzle. WiiU: GX2: need to use the backbuffer ptr here. WiiU: GX2: no need to endian swap here, fixes screenshots. WiiU: refactor *ShaderGeneratorGX2. WiiU: plug leak. WiiU: rename shader_info.h update wiiu submodule. WiiU: add a basic shader disassembler. WiiU: improve shader generators. use fallback ubershader for unsupported shaderIDs. Mpeg: avoid flagging the mpeg data as invalid when MpegDemux::demux is called with a small read size. WiiU: GX2 fix scissor (was being limited to display res instead of current framebuffer res). WiiU: refactors. WiiU: GX2Framebuffer: fall back to MEM2 when running out of MEM1 memory. WiiU: refactors. WiiU: update *ShaderGenerator big endian. printf big endian fixes. misc. misc. wiiu: update wiiu.cmake Swap.h: add parameter pack templates to automatically cast swap_t<> values to their basic types when passed as parameters to *_LOG calls. plus some refactors. use little endian types for keys in PrxDecrypter.cpp WiiU: misc. Revert "printf big endian fixes." This reverts commit 2334beb.
FakeEmitter/FakeJit/VertexDecoderFake buildfix. big-endian fixes. add wiiu build files. add wiiu build files. initial wiiu port. fix IR interpreter on big-endian machines. fix VertexDecoder/SoftGpu on big-endian. Revert "Goodbye PowerPC, you can always be resurrected when the time comes" This reverts commit a54e0cf. WiiU: improve exception handler. PpcJit now works on WiiU, sort of ... PpcJit: disable instructions not available on WiiU. add GPU_GX2, doesn't work yet ... WiiU: add a basic GX2 validation layer. WiiU: some small improvements to GX2_GPU. still not functional. WiiU: hardcode some shaders for now. big endian fix in Loaders.cpp WiiU: more improvements to GPU_GX2. cube.elf now renders correctly. GPUCommon: fix freeze on big-endian. Wii-U: start generating shaders dynamically. Wii-U: add an ubershader. a lot of scenes render correctly now. Wii-U: add support for Hardware T&L. Wii-U: add missing compile flags. fixes savestates. Wii-U: copy tiled surface data correctly. fixes screenshots. Wii-U: use a push buffer for uniforms. README: include temporary manual ffmpeg submodule updating (#1) Manually update ffmpeg submodule for now, see (hrydgard#11001 (comment)) more big-endian fixes. Wii-U: misc. Wii-U: add stencil upload shader. Wii-U: add missing support for analog sticks input. Wii-U: implement CopyFramebufferImage. Wii-U: GX2: fix color attributes. Swap.h: get rid of most overloads. they weren't necessary and were having some really bad side-effects.(like preventing type promotions, eg: result of `swapped<short> * int` was being clamped to short) fix SceAtracIdInfo struct on big-endian. simplify Swap.h Wii-U: register axis input only on change. keep decoded/mixed audio as little endian in PSP memory, to allow emulated code to process it correctly. more big-endian fixes. Wii-U: update shaders. another round of big-endian fixes. Wii-U: misc. libkirk: replace some magic offsets with struct member access. this will also allow using the scalar_storage_order attribute to enforce endianess (gcc only). a bit more big-endian fun. Wii-U: simulate a square range for analog input. Wii-U: build fix. more big-endian fixes. Wii-U: fix webserver. build fix for devkitPPC r38. (WIIU)set toolchain file automatically. use std=c++17. build fix after rebase. debug build fix. texture_atlas big endian fixes. WiiU: GX2 fixes after rebase. WiiU: exception handler tweaks. nits. big endian fixes. derp. WiiU: thin3d: use correct index type. misc. update the ffmpeg module WiiU: fix flipped display PrxDecrypter: big endian fixes. change ext/wiiu into a submodule. big endian ... WiiU: GX2: -add COLOR_2D_RB_SWIZZLE shader. -use correct pitch and endianess with TextureDesc.initDataCallback; Wiiu: GX2: use correct component swizzle. WiiU: GX2: need to use the backbuffer ptr here. WiiU: GX2: no need to endian swap here, fixes screenshots. WiiU: refactor *ShaderGeneratorGX2. WiiU: plug leak. WiiU: rename shader_info.h update wiiu submodule. WiiU: add a basic shader disassembler. WiiU: improve shader generators. use fallback ubershader for unsupported shaderIDs. Mpeg: avoid flagging the mpeg data as invalid when MpegDemux::demux is called with a small read size. WiiU: GX2 fix scissor (was being limited to display res instead of current framebuffer res). WiiU: refactors. WiiU: GX2Framebuffer: fall back to MEM2 when running out of MEM1 memory. WiiU: refactors. WiiU: update *ShaderGenerator big endian. printf big endian fixes. misc. misc. wiiu: update wiiu.cmake Swap.h: add parameter pack templates to automatically cast swap_t<> values to their basic types when passed as parameters to *_LOG calls. plus some refactors. use little endian types for keys in PrxDecrypter.cpp WiiU: misc. Revert "printf big endian fixes." This reverts commit 2334beb.
FakeEmitter/FakeJit/VertexDecoderFake buildfix. big-endian fixes. add wiiu build files. add wiiu build files. initial wiiu port. fix IR interpreter on big-endian machines. fix VertexDecoder/SoftGpu on big-endian. Revert "Goodbye PowerPC, you can always be resurrected when the time comes" This reverts commit a54e0cf. WiiU: improve exception handler. PpcJit now works on WiiU, sort of ... PpcJit: disable instructions not available on WiiU. add GPU_GX2, doesn't work yet ... WiiU: add a basic GX2 validation layer. WiiU: some small improvements to GX2_GPU. still not functional. WiiU: hardcode some shaders for now. big endian fix in Loaders.cpp WiiU: more improvements to GPU_GX2. cube.elf now renders correctly. GPUCommon: fix freeze on big-endian. Wii-U: start generating shaders dynamically. Wii-U: add an ubershader. a lot of scenes render correctly now. Wii-U: add support for Hardware T&L. Wii-U: add missing compile flags. fixes savestates. Wii-U: copy tiled surface data correctly. fixes screenshots. Wii-U: use a push buffer for uniforms. README: include temporary manual ffmpeg submodule updating (#1) Manually update ffmpeg submodule for now, see (hrydgard#11001 (comment)) more big-endian fixes. Wii-U: misc. Wii-U: add stencil upload shader. Wii-U: add missing support for analog sticks input. Wii-U: implement CopyFramebufferImage. Wii-U: GX2: fix color attributes. Swap.h: get rid of most overloads. they weren't necessary and were having some really bad side-effects.(like preventing type promotions, eg: result of `swapped<short> * int` was being clamped to short) fix SceAtracIdInfo struct on big-endian. simplify Swap.h Wii-U: register axis input only on change. keep decoded/mixed audio as little endian in PSP memory, to allow emulated code to process it correctly. more big-endian fixes. Wii-U: update shaders. another round of big-endian fixes. Wii-U: misc. libkirk: replace some magic offsets with struct member access. this will also allow using the scalar_storage_order attribute to enforce endianess (gcc only). a bit more big-endian fun. Wii-U: simulate a square range for analog input. Wii-U: build fix. more big-endian fixes. Wii-U: fix webserver. build fix for devkitPPC r38. (WIIU)set toolchain file automatically. use std=c++17. build fix after rebase. debug build fix. texture_atlas big endian fixes. WiiU: GX2 fixes after rebase. WiiU: exception handler tweaks. nits. big endian fixes. derp. WiiU: thin3d: use correct index type. misc. update the ffmpeg module WiiU: fix flipped display PrxDecrypter: big endian fixes. change ext/wiiu into a submodule. big endian ... WiiU: GX2: -add COLOR_2D_RB_SWIZZLE shader. -use correct pitch and endianess with TextureDesc.initDataCallback; Wiiu: GX2: use correct component swizzle. WiiU: GX2: need to use the backbuffer ptr here. WiiU: GX2: no need to endian swap here, fixes screenshots. WiiU: refactor *ShaderGeneratorGX2. WiiU: plug leak. WiiU: rename shader_info.h update wiiu submodule. WiiU: add a basic shader disassembler. WiiU: improve shader generators. use fallback ubershader for unsupported shaderIDs. Mpeg: avoid flagging the mpeg data as invalid when MpegDemux::demux is called with a small read size. WiiU: GX2 fix scissor (was being limited to display res instead of current framebuffer res). WiiU: refactors. WiiU: GX2Framebuffer: fall back to MEM2 when running out of MEM1 memory. WiiU: refactors. WiiU: update *ShaderGenerator big endian. printf big endian fixes. misc. misc. wiiu: update wiiu.cmake Swap.h: add parameter pack templates to automatically cast swap_t<> values to their basic types when passed as parameters to *_LOG calls. plus some refactors. use little endian types for keys in PrxDecrypter.cpp WiiU: misc. Revert "printf big endian fixes." This reverts commit 2334beb.
FakeEmitter/FakeJit/VertexDecoderFake buildfix. big-endian fixes. add wiiu build files. add wiiu build files. initial wiiu port. fix IR interpreter on big-endian machines. fix VertexDecoder/SoftGpu on big-endian. Revert "Goodbye PowerPC, you can always be resurrected when the time comes" This reverts commit a54e0cf. WiiU: improve exception handler. PpcJit now works on WiiU, sort of ... PpcJit: disable instructions not available on WiiU. add GPU_GX2, doesn't work yet ... WiiU: add a basic GX2 validation layer. WiiU: some small improvements to GX2_GPU. still not functional. WiiU: hardcode some shaders for now. big endian fix in Loaders.cpp WiiU: more improvements to GPU_GX2. cube.elf now renders correctly. GPUCommon: fix freeze on big-endian. Wii-U: start generating shaders dynamically. Wii-U: add an ubershader. a lot of scenes render correctly now. Wii-U: add support for Hardware T&L. Wii-U: add missing compile flags. fixes savestates. Wii-U: copy tiled surface data correctly. fixes screenshots. Wii-U: use a push buffer for uniforms. README: include temporary manual ffmpeg submodule updating (#1) Manually update ffmpeg submodule for now, see (hrydgard#11001 (comment)) more big-endian fixes. Wii-U: misc. Wii-U: add stencil upload shader. Wii-U: add missing support for analog sticks input. Wii-U: implement CopyFramebufferImage. Wii-U: GX2: fix color attributes. Swap.h: get rid of most overloads. they weren't necessary and were having some really bad side-effects.(like preventing type promotions, eg: result of `swapped<short> * int` was being clamped to short) fix SceAtracIdInfo struct on big-endian. simplify Swap.h Wii-U: register axis input only on change. keep decoded/mixed audio as little endian in PSP memory, to allow emulated code to process it correctly. more big-endian fixes. Wii-U: update shaders. another round of big-endian fixes. Wii-U: misc. libkirk: replace some magic offsets with struct member access. this will also allow using the scalar_storage_order attribute to enforce endianess (gcc only). a bit more big-endian fun. Wii-U: simulate a square range for analog input. Wii-U: build fix. more big-endian fixes. Wii-U: fix webserver. build fix for devkitPPC r38. (WIIU)set toolchain file automatically. use std=c++17. build fix after rebase. debug build fix. texture_atlas big endian fixes. WiiU: GX2 fixes after rebase. WiiU: exception handler tweaks. nits. big endian fixes. derp. WiiU: thin3d: use correct index type. misc. update the ffmpeg module WiiU: fix flipped display PrxDecrypter: big endian fixes. change ext/wiiu into a submodule. big endian ... WiiU: GX2: -add COLOR_2D_RB_SWIZZLE shader. -use correct pitch and endianess with TextureDesc.initDataCallback; Wiiu: GX2: use correct component swizzle. WiiU: GX2: need to use the backbuffer ptr here. WiiU: GX2: no need to endian swap here, fixes screenshots. WiiU: refactor *ShaderGeneratorGX2. WiiU: plug leak. WiiU: rename shader_info.h update wiiu submodule. WiiU: add a basic shader disassembler. WiiU: improve shader generators. use fallback ubershader for unsupported shaderIDs. Mpeg: avoid flagging the mpeg data as invalid when MpegDemux::demux is called with a small read size. WiiU: GX2 fix scissor (was being limited to display res instead of current framebuffer res). WiiU: refactors. WiiU: GX2Framebuffer: fall back to MEM2 when running out of MEM1 memory. WiiU: refactors. WiiU: update *ShaderGenerator big endian. printf big endian fixes. misc. misc. wiiu: update wiiu.cmake Swap.h: add parameter pack templates to automatically cast swap_t<> values to their basic types when passed as parameters to *_LOG calls. plus some refactors. use little endian types for keys in PrxDecrypter.cpp WiiU: misc. Revert "printf big endian fixes." This reverts commit 2334beb.
This only sets the basic building blocks, with basic display/sound/input support.
menu works correctly, games can be run with interpreter+software renderer, although there are a lot of gfx issues, most likely endianess related.
those will need to be fixed first before moving on to the more interesting parts, like resurrecting the powerpc JIT and a putting together a working GX2 gpu core.
requires hrydgard/ppsspp-ffmpeg#48