Libretro – A crossplatform application API, powering the crossplatform gaming platform Retro. Arch. I needed a break from para. LLEl RDP, and I wanted to give PSX a shot to have an excuse to write a higher level Vulkan renderer backend. The renderer backends in Beetle PSX are quite well abstracted away, so plugging in my own renderer was a trivial task. The original Play. Station is certainly a massively simpler architecture than N6. After one evening of studying the Rustation renderer by simias and PSX GPU docs, I had a decent idea of how it worked. Many hardware features of the N6. Perspective correctness (no W from GTE)Texture filtering. Sub- pixel precision on vertices (wobbly polygons, wee)Mipmapping. No programmable texture cache. Depth buffering. Complex combiners. My goal was to create a very accurate HW renderer which supports internal upscaling. Making anything at native res for PSX is a waste of time as software renderers are basically perfected at this point in Mednafen and more than fast enough due to the simplicity. Another goal was to improve my experience with 2. D heavy games like the Square RPGs which heavily mix 2. D elements with 3. D. I always had issues with upscaling plugins back in the day as I always had to accept blocky and ugly 2. D in order to get crisp 3. D. Simply sampling all textures with bilinear is one approach, but it falls completely flat on PSX. Content was not designed with this in mind at all, and you’ll quickly find that tons of artifacts are created when the bilinear filtering tries to filter outside its designated blocks in VRAM. The final goal is to do all of this without ugly hacks, game specific workarounds or otherwise shitty code. It was excusable in a time where graphics APIs could not cleanly express what emulation authors wanted to express, but now we can. Dolphin is a video game console emulator for the GameCube and Wii that runs on Windows, Linux, macOS, and Android. It had its inaugural release in 2003 as freeware.Earlier in the series, we showed you how to play PlayStation How to Play Sony PlayStation (PSX) Games on Your PC How to Play Sony PlayStation (PSX) Games on Your PC. Development of this renderer was a fairly smooth ride, mostly done in spare time over ~2 months. Credits. This renderer would not exist without the excellent Mednafen emulator and Rustation GL renderer. Tested hardware/driversn. Vidia Linux/Windows 3. AMDGPU- PRO 1. 6. Linux (works fully)Mesa Intel (Ivy Bridge half- way working, Broadwell+, fully working, you’ll want to build from Git to get some important bug fixes which were uncovered by this renderer : D)Mesa Radeon RADV (fully working, you’ll want to build from Git to get support for input attachments)– But, but, I don’t have a Vulkan- capable GPUWell, read on anyways, some of this work will benefit the GL renderer as well.– But, but, you’re stupid, you should do this in GL 1. No ?– Fine, but clearly this is just for shits and giggles. Doing it for the lulz is always a valid reason. Source. The source will be merged upstream to Github immediately. PSX GPU overview. The PSX GPU is a very simple and dumb triangle rasterizer with some tricks. VRAMThe PSX has a 1. VRAM at 1. 6bpp, giving us 1. MB of VRAM to work with. Interestingly enough, this VRAM is actually organized as a 2. D grid, and not a flat array with width/height/stride. This certainly simplifies things a lot as we can now represent the VRAM as a texture instead of shuffling data in and out of SSBOs. Unlike N6. 4, the CPU doesn’t have direct access to this VRAM (phew), so access is mediated by various commands. Textures. The PSX can sample textures at 4- bit palettes, 8- bit palettes or straight ABGR1. Texture coordinates are confined to a texture window, which is basically an elaborate way to implement texture repeats. Textures are sampled directly from VRAM, but there is a small texture cache. For purposes of emulation, this cache is ignored (except for one particular case which we’ll get to …). An annoying feature is that the color “0x. PSX is always transparent, so all fragment shaders which sample textures might have to discard, another reason to be careful with bilinear. Shading options. PSX just has 3 shading options, which makes our life very simple: Interpolate color from vertices. Interpolate UV and sample nearest neighbor. Sample texture multiplied by interpolated color (gouraud shading)It is practical to not use uber- shading approaches here. Semi- transparency. PSX has a weird way of dealing with transparency. There is no real alpha channel to speak of, we only have one bit, so what PSX does is set a constant transparency formula, (A + B, 0. A + 0. 5. B, B – A, or 0. A + B). If the high- bit of a texture color is set, transparency is enabled, if not, the fragment is considered opaque. Semi- transparent color- only primitives are simply always transparent. Mask- bit. Possibly the most difficult feature of the PSX GPU is the mask- bit. The alpha bit in VRAM is considered a “read- only” bit if mask bit testing is enabled and the read- only bit is set. This affects rendering primitives as well as copies from CPU and VRAM- to- VRAM blits. Especially mask- bit emulation + semi- transparency creates a really difficult blending scenario which I haven’t found a way to do correctly with fixed function (but that won’t stop us in Vulkan). Correctly emulating mask- bit lets us render Silent Hill correctly. The trees have transparent quads around them without it. Intersecting VRAM blits. It is possible, and apparently, well defined on PSX to blit from one part of VRAM to another part where the rects intersect. Reading the Mednafen/Beetle software implementation, we need to kind of emulate the texture cache. Fortunately, this was very doable with compute shaders, although not very efficient. Implementation details. Feature – Adaptive smoothing. As mentioned, I prefer smooth 2. D with crisp- looking 3. D. I devised a scheme to do this in post. The basic idea is to look at our 4x or 8x scaled image, we then mip- map that down to 1x with a box filter. While mip- mapping, we analyze the variance within the 4×4 or 8×8 block and stick that in alpha. The assumption here is that if we have nearest- neighbor scaled 2. D elements, they typically have a 1: 1 pixel correspondency in native resolution, and hence, the variance within the block will be 0.
With 3. D elements, there will be some kind of variance, either by values which were shaded slightly differently, or more dramatically, a geometry edge. We now compute an R8_UNORM “bias- mask” texture at 1x scale, which is 0. D elements, and 1. D. To avoid sharp transitions in LOD, the bias- mask is then blurred slightly with a 3×3 gaussian kernel (might be a better non- linear filter here for all I know). On final scanout we simply sample the bias- mask, multiply that by log. Lod() with trilinear sampling, and magically 2. D elements look smooth without compromising the 3. D sharpness. Sure, it’s not perfect, but I’m quite happy with the result. Consider this scene from FF IX. While some will prefer this look (it’s toggleable), I’m not a big fan of blocky nearest- neighbor backgrounds together with high- res models. With adaptive smoothing, we can smooth out the background and speech bubble back to native resolution where they belong. You may notice that the shadow under Vivi is sharp, because the shadow which modulates the background is not 1: 1. This is the downside of doing it in post certainly, but it’s hard to notice unless you’re really looking. The bias mask texture looks like this after the blur: Potential further ideas here would be to use the bias- mask as a lerp between x. BR- style upscalers if we wanted to actually make the GPU not fall asleep. There is nothing inherently Vulkan specific about this method, so it will possibly arrive in the GL backend at some point as well. It can probably be used with N6. Obviously, for 2. FMVs), the output is always in native resolution. GPU dump player. Just like the N6. RDP, having an offline dump player for debugging, playback and analysis is invaluable, so the first thing I did was to create a basic dump format which captures PSX GPU commands and plays them back. This is also nice for benchmarking as any half- capable GPU will be bottlenecked on CPU. PGXP support. Supporting PGXP for sub- pixel precision and perspective correctness was trivial as all the work happens outside the renderer abstraction to begin with. I just had to pass down W to the vertex shader. Mask bit emulation. Mask bit emulation without transparency is quite trivial. When rendering, we just use fixed function blending, src = INV_DST_ALPHA, dst = DST_ALPHA. With semi- transparency things get weird. To solve this, I made use of Vulkan’s subpass self- dependency feature which allows us to read the pixel of the framebuffer which enables programmable blending. Asus Tinker Board - Retro. Pie Forum. This topic has been deleted. Only users with topic management privileges can see it.@Charononus. Ok thanks, I'll probably pick one up soon if any needs testers. Seems like a good upgrade in hardware performance, maybe n. I got one. Time to play around! No Pi 4 for some time. Still no news on how anyone got retroarch to work? I don't want to bother you guys but is there any chance that we'll have a working build around November? It seems that the Tinker Board is the next big SBC because the Foundation is focusing on software for now and I don't think they'll release a new board for a while.@hydroxide specs mean nothing if there is no software support. Any development is done as there is free time and as such there is no eta for support.@herb_fargus said in Asus Tinker Board: @hydroxide specs mean nothing if there is no software support. Any development is done as there is free time and as such there is no eta for support. There isn't as much of a need for software support since the software so stable since launch, and there appears to be active development from ASUS on both Android and Debian. I tried multiple things to get Retropie to work. I managed to get it installed with these two commandssudo __platform=armv. I would prefer the armv. RK3. 28. 8 is using Mali- T7. Retropie keeps asking for mali- fbdev package from apt- get and it is not available. Booting into command line and starting emulationstation ends up with Unable to initialize video (SDL2) (something like that). I'm assuming it's the mali- fbdev missing package that caused this. If someone could explain what mali- fbdev is, where I can find the source for it, and how to go about compiling it for my system, I could probably get Retropie working. For generic- x. 11 install, everything works excluding some emulator builds.Mupen. 64plus gives error about not being to find stubs- soft. . I looked into the stubs- soft. Mupen. 64plus and it seems I need to set some flags for using hard floats instead (since stubs- hard. I have no idea what file to add these flags to in Retropie. Also generic- x. 11 isn't ideal since it has to be ran inside an already running X1. It probably wouldn't be a problem since the specs of the Tinker Board are so good, but still not ideal. Retroarch build from source and install from repo both give a Segmentation Fault on launch. I don't know what that's about. It built fine. Kodi has problems with videos (top and bottom of video are transparent where black should be, might've just been my system). Mupen. 64plus won't compile without Retropie too, I don't remember why, there were a lot of errors. So seeing this generic- x. Retropie, support for the Tinker Board would not be too difficult. There's two ways to go about it (I prefer the first)Regardless, there needs to be better platform identification. But they could either figure out what video device files the tinker board uses outside of x. I saw some packages that had mali in the name, just no mali- fbdev)or. Fix the flags for compiling emulators on generic- x. Also, on generic- x. Retropie Setup within emulationstation, it will just say Can't recognize platform, please manually set __platform, but I have no idea where to do that. It works for running the script from a git clone, but not within emulationstation. And to herb, specs should mean everything, that's where the support should go to. Not support should go to where support is. This board is incredibly faster than the Pi 3. I have both and I'm switching permanently because of the much faster hardware. When I had Debian installed, I got Netflix and Hulu working too so much better than Pi 3. I have Android running on this thing already and it took forever for the RPi to do that. ASUS is keeping up with the software on it, now we just need the community to jump on board as well. So technically, official support is there. The 3rd party communities just need to branch away from the RPi 3 until they come out with something faster. Since everything already works on Retropie (for the most part), considering how much effort was put into it, I would assume they have plenty of time to add support for this device. It wouldn't take much effort, especially considering they got this thing to run with crap videocore gpus. EDITI forgot to mention that generic- x. A lot of emulators built successfully, but did not show up. I don't know what would cause that.@knuxyliblis. Please don't be offended if this is obvious to you, but sometimes it's easy to forget something simple. Do you have roms in the folders? The emulators don't show up unless there are roms available for them. Also, brace yourself for some negativity. I use a PC for my Retropie console in order to get decent N6. I posted a thread about this hoping to help other people who were disappointed with N6. Pi, and was quite surprised about the extremely negative reactions I received for using hardware that wasn't a Raspberry Pi.@knuxyliblis said in Asus Tinker Board: If someone could explain what mali- fbdev is, where I can find the source for it, and how to go about compiling it for my system, I could probably get Retropie working. It's for the frame buffer. Not sure where to get it. Probably an ASUS repo if they've made it available. Linux_framebuffer@jamesbeatyeah damnit i didnt have roms in them. Ok so I got Retropie to install but none of the emulators would launch. I also finally got Retroarch to install and run but even GBA is running at like 2- 3 fps. I wish I knew more about this stuff, I would help development on this platform. Do the mali drivers need to have some type of hardware acceleration for the entire platform or something? I can run 4k videos at 6. Youtube without a problem. I have these 2 packages in Debian reposlibmali- rk- devlibmali- rk- midgard- r. I know for a fact the first one is installed. I also have some source files for ARM development for this gpu (mali t. The firefly uses this same gpu (or at least the t. But as far as emulation goes, there needs to be some gpu driver tuning to get any sort of emulation working on the Tinker Board on Linux. They are just too slow atm and I know VBA- M runs at like 1. Android is probably different, but I can't use it because it glitches so bad with my wireless keyboard/mouse combo. The android seems to work a hell of a lot better than the Android for RPi 3. Edit. If you would liek to try and mess around with Retro. Pie, launch the setup script like thissudo __platform=generic- x. IDONTREMEMBERTHEREST" ./retropie_setup. Sorry the command wasn't in my history because I whiped. This won't compile mupen or mame or fbi omxplayer (which i think is rpi specific anyways). Find in the retropie github a file that has the __platform_flags and choose the second one that has - 0. The generic- x. 11 will force x. It looks like retroarch/mupen already works for this SBC (not with Tinker. OS though). It was previously released as Mi. Qi in 2. 01. 6, maybe you could try using the Mi. Qi android OS? Looks like mupen standalone runs pretty great on this. Sorry if this isn't helpful.@MWGemini n. I stopped using reicast because it ran like crap on my pi. Those two emulators are glitchy because they're a constant wip. It'd be lovely if the libretro core would be ported so we can try that one instead.@Darksavior not sure why it not running properly for you. What settings do you have? I own a real Dreamcast and there are some games that even stutter on the original hardware. It's always playable and not really annoying but.. So when someone tells me "EVERY DC- Game runs like a charm with 1. FPS all the time" - then i cannot believe hin. Same Situation concerning N6. Maybe we are talking about 2 games that he tested on each system, probably those everyone knows that they run good (Mario. Kart 6. 4, Mario 6. But if someone tells me that all the games run superb, i would guess he is a troll.@sirhenrythe. I assume the best intention from anyone around here. That being said, it may be a mix of expectations, perception, the games someone is playing, or a better configuration. I do agree that my experience isn't reflective of such a claim of "no issues using reicast" though I'm always keen on learning what can be done to improve things on my end. I certainly have struggled to get those two working as intended - crazy taxi has audio issues throughout most of the gameplay, and virtua striker just has extremely sluggish and unresponsive controls - though that may have also been the case on the original hardware.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
October 2017
Categories |