Page 2 of 2
Re: 32X
Posted: Fri Jan 28, 2022 12:20 pm
by Barone
Neocaron wrote: ↑Fri Jan 28, 2022 2:25 am
32X was capable of doing 50,000 polygons per second. It should be noted that since the 32X was an add-on for the Genesis, the graphics hardware of the 32X was typically split between the 32-bit VDP (which provided the really fancy stuff. For example: the 3D polygon characters in Virtua Fighter 32X and other 3D elements on screen) and the 16-bit Genesis VDP provided stuff like the backgrounds and some minor stuff (depending on the game)
Saturn was capable of doing 200,000 texture mapped polygons per second OR 500,000 flat shaded polygons per second. Since the Saturn was it's own system (and not an add-on for the Genesis) it had two 32 bit VDPs (one for characters and other main stuff, and the other for backgrounds).
Keep in mind the 32X has no hardware features for 3D graphics, polygons, etc. Nor does it have any dedicated hardware for sprite scaling.
It's all software rendered, unlike the Saturn.
The 32X games can vary a lot in how they setup the hardware usage, but according to people such as Joseph Fenton (a.k.a. Chilly Willy) (Wolf 32X homebrew port, 3D 32X demos, etc.) and Victor Luchitz (Doom 32X Resurrection) the best approach for maximum 3D performance is to do all graphics on the 32X and use the Mega Drive side as an old PC sound card, handling just music and controller input.
To maximize performance you have to optimize both logic and rendering to be split between the two CPUs.
These are quotes from both guys, which are hands down the most knowledgeable ones when it comes to 32X's hardware and development:
One thing you need for best speed on the SH2 side - keep the MD off the bus. Make sure the Z80 is held reset, the 68000 is running in work ram, and the VDP is not doing any DMA. Running the 68000 main() in rom is enough to maybe halve the speed of the 32X side.
Running sh2 functions from sdram makes them cache quicker. The sdram does burst reads - 8 words in 12 cycles. Nothing else burst reads, meaning the cache is much slower to load. Oh, and make sure you have the cache turned on and set to 4 way set associative. If you're not using the cache (have the cache in scratchpad mode) or you're running with the PC set to uncached pointers to functions, you aren't going to cache the code, which means it won't be fast on real hardware.
This also applies to data in the rom - use cache enabled pointers to data in the rom to cache the data. I'm not sure if this really needs to be said, but using a pointer with the caching bits of the pointer set to uncached space means the data will not cache - it will read from the rom every time it is accessed.
There are times when you WANT to read something as non-cached. For example, a variable set by the other cpu. Then you either need to flush the address of the variable before reading it, or to read it as uncached.
http://gendev.spritesmind.net/forum/vie ... =15#p37344
I have a work in progress demo that draws a tilemap and is able to do sprite scaling, flipping and clipping using both CPUs at 60fps, and here what I've learned about doing 2D gfx on the 32X:
1) always keep your drawing code in SDRAM
2) unroll your drawing loops as much as you can, use Duff's device
3) try different optimization settings: generally -Os works better, but also try -O2 to see if that improves performance
4) keep as much of your tile data in SDRAM - drawing from ROM is extremely slow
5) use both CPUs for drawing
6) write longs to VRAM to maximize throughput if you can, otherwise - use word writes, don't ever write single bytes unless you absolutely have to
7) the overwrite area is your friend if you want to do transparency - use it
8 ) use the line table to scroll the screen area both vertically and horizontally
9) use the shift register if you plan to have smooth horizontal scrolling by an odd amount of pixels, but:
10) the shift register is bugged and you can't infinitely scroll the screen by manipulating the line table without running into glitches, in fact you can barely scroll at all
11) unfortunately it's impossible to have free infinite horizontal scrolling on the 32X - you have to periodically re-draw the whole screen to reset the line table due to pt10
12) the 32X is only equipped to do 2 layers of 2D gfx at 50FPS at 320x224 if you use one CPU: 320*224*5*50 = 8.96 M cycles per second is the total amount of cycles it takes to redraw the whole screen on PAL a 32X at 50FPS, which slightly less than a half of the budget of 22.8M cycles you've got. Bare in mind this doesn't even account for cycles spent on reading the tile/sprite data and game logic, so at best you can hope to do only 2 layers even if you use _both_ CPUs
13) save CPU cycles as much as you can: avoid re-drawing between frames and overdrawing within frames as much as possible, don't wait in a hot loop for framebuffers to have completed swapping
14) avoid clearing the whole screen each frame, use the "dirty rectangles" technique to only clear stuff which needs to be cleared
15) don't use the hardware filler, it's useless
16) accessing the MD VRAM from 68k is SLOOOOOW and basically halts the SH-2's for the duration of the access
17) always test of real hardware: typically performance on emulators is 1.5 to 2 times better than on real hw
18) always read your sprite and tile data in forward direction to benefit from burst access to SDRAM
19) modern compilers are pretty good at producing optimized assembly, don't waste your time on hand-optimized code
http://gendev.spritesmind.net/forum/vie ... =15#p37332
The demo he refers too is here:
https://github.com/viciious/yatssd
Someone mentioned the 32X being finnicky and I totally agree. It's not uncommon to be using it and then the slightest touch on the Mega Drive can make your game freeze.
The fact that it sits on the cart slot and most of its weight is up top certainly doesn't help. Having it on MiSTer FPGA would be far more practical.
This was discussed earlier in the thread, and elsewhere, but the general assumption is that srg320 will move on to the 32x after finishing Saturn and doing some needed improvements to the Mega Drive core. The Saturn core and Mega Drive fixes pave the way for the 32x. There is a reasonable chance we could have it by the end of the year.
That would be awesome!
Thanks for the input.
Re: 32X
Posted: Fri Jan 28, 2022 5:36 pm
by KremlingKuthroat19
I'm not going to play armchair developer, but it's reasonable to assume about 20% of the 32X core will have been already completed with the completion of the Saturn core. Still, it'd be much more logical to go straight to getting all the ST-V arcade games in working order after the Saturn core is complete since the Saturn and ST-V are essentially identical except the ST-V uses a cartridge port and has other very minimal differences.
The natural progression should be:
1. Saturn
2. ST-V
3. Genesis core clean up
4. 32X
I'd say the ETA on that is completely dependent on the Saturn core's release window, and all the polishing that's going to be required once said core is complete.
Re: 32X
Posted: Mon Jan 31, 2022 1:51 pm
by throAU
Again not a dev but if Saturn will fit the 32x should.
Saturn has more chips in it than the 32x plus megadrive if I’m not mistaken (I mean it has a 68000, plus a hard core dsp just for sound, an sh1 cd controller, etc.)
The limiting factor will likely be developer interest I suspect. It’s a very niche system with small library.
Re: 32X
Posted: Mon Jan 31, 2022 9:26 pm
by rhester72
Wait'll we get 32X and then people bitch there's no CD support *LOL*
Re: 32X
Posted: Tue Feb 01, 2022 8:04 pm
by TwoShedsWilson
If we can get enough interest for 32X to happen at all, I'll find a way to live without those 3 or 4 32X-CD games. I'll manage with the standard CD versions. I would hope a 32X core would maybe spark the homebrew community to start looking at the platform and see what magic they could work with it.
Re: 32X
Posted: Tue Feb 01, 2022 9:53 pm
by Wave
TwoShedsWilson wrote: ↑Tue Feb 01, 2022 8:04 pm
I would hope a 32X core would maybe spark the homebrew community to start looking at the platform and see what magic they could work with it.
The 32X has a somewhat active homebrew scene actually, my friend has been telling me about it.
Follow
this person for a start. They're working on a 3D engine for it.
It has been shocking to hear just how limited the 32X hardware was. Apparently all rendering is done in software! If you want, say, sprites or scrolling, you gotta code it yourself apparently, or rely on the built-in functions of the MD hardware (with all their limitations).
I asked my friend, "Is the 32X ultimately a good capable machine to make games on OR a misbegotten pile of bad decisions?"
"Why not both," they replied.
Re: 32X
Posted: Wed Feb 02, 2022 1:03 am
by thorr
Star Wars is the reason I want the 32X. If one game is worth it, then it should be enough reason to make it. Arcade cores are one game (ok, you can usually get a few games from one core, but it is the same difference). Hopefully we will see the 32X one of these days.
Re: 32X
Posted: Wed Feb 02, 2022 6:15 pm
by KremlingKuthroat19
Star Wars has exclusive levels on the 32X so that's a big reason for a core. Virtua Racing Deluxe is the best version according to many. Plus, it's a Sega console so that alone is reason to justify it. There are about 10 games worth playing on the 32X. That's more than some consoles that already have cores like the Channel F. Knuckles Chaotix is also never getting ported from that console either.
Re: 32X
Posted: Wed Feb 09, 2022 5:03 pm
by 16Bittt
I remember playing 32X games on emulator years ago (on PC) can't remember which emulator since I moved away from all emulators long ago but I remeber it could run them fine.
32X has some cool games and some of the better/best versions of certain titles of that era.
Pitfall Mayan Adventure,
Mortal Kombat 1 & 2,
Primal Rage,
NBA JAM
these had best home ports on 32X,much superior to both SNES and Genesis version.
also
Tempo,
Kolibri,
Blacktorne,
Kuckles Chaotix
all very cool games.
I'm definitely interested in a 32X core..
and Saturn had so many great 2D games in it's library specially Japanese exclusives that now cost a fortune to buy.can't wait for the saturn core.
Re: 32X
Posted: Wed Feb 09, 2022 7:26 pm
by KremlingKuthroat19
Im sorry if I sound like a broken record, but that’s one of the unique selling propositions that the MiSTer can have over its already stellar value. If we could have a perfect recreation of less popular consoles like the 32X, Atari Jaguar (especially the CD, which has no emulator) and the 3DO, it’d make MiSTer even more appealing!
Re: 32X
Posted: Wed Feb 09, 2022 7:51 pm
by drgruney
KremlingKuthroat19 wrote: ↑Wed Feb 09, 2022 7:26 pm
Im sorry if I sound like a broken record, but that’s one of the unique selling propositions that the MiSTer can have over its already stellar value. If we could have a perfect recreation of less popular consoles like the 32X, Atari Jaguar (especially the CD, which has no emulator) and the 3DO, it’d make MiSTer even more appealing!
You don't seem to get that MiSTer isn't a business trying to move units.
Re: 32X
Posted: Wed Feb 09, 2022 8:43 pm
by KremlingKuthroat19
More units sold means more people involved in the project which means more users which means more people donating to Patreon accounts which means more development costs being reduced. More people also means more potential developers.
The DE-10 is a product so the more appealing it can be, the more users will take the plunge and buy a MiSTer. Sure it’s an open-source project but getting more people interested in the project only means good things for the future. Btw, this is the 32X thread. Let’s stay on topic, even if I got off topic a bit.
To get back on topic would love to get Sega CD + 32X support so I can play the definitive version of Slam City lol
Re: 32X
Posted: Sat Feb 12, 2022 6:36 pm
by FoxbatStargazer
32X Pitfall ran at 30 FPS, it's got to be the worst console port. I support a 32X core but that's not one of the stand out titles...
Re: 32X
Posted: Sat Feb 12, 2022 8:14 pm
by rhester72
There's Star Wars 32X and there's...oh, wait. No, just Star Wars.
Re: 32X
Posted: Sun Feb 13, 2022 4:06 pm
by Beeble
Space Harrier, Afterburner, Virtua Fighter and Virtua Racing shall not be overlooked.
Re: 32X
Posted: Sun Feb 13, 2022 6:55 pm
by softtest9
Beeble wrote: ↑Sun Feb 13, 2022 4:06 pm
Space Harrier, Afterburner, Virtua Fighter and Virtua Racing shall not be overlooked.
I'm pretty sure all of them have equal or better versions on other consoles/arcades/computers.
Re: 32X
Posted: Sun Feb 13, 2022 10:31 pm
by Chris23235
softtest9 wrote: ↑Sun Feb 13, 2022 6:55 pm
Beeble wrote: ↑Sun Feb 13, 2022 4:06 pm
Space Harrier, Afterburner, Virtua Fighter and Virtua Racing shall not be overlooked.
I'm pretty sure all of them have equal or better versions on other consoles/arcades/computers.
None of these games is actually supported in its Arcade counter part on the MiSTer and all of them look better on the 32X than in the arcade version. Additionally Virtua Racing has more tracks than the arcade version, tracks that were made exclusively for the 32X version.
Re: 32X
Posted: Mon Feb 14, 2022 12:24 am
by H6rdc0re
Chris23235 wrote: ↑Sun Feb 13, 2022 10:31 pm
softtest9 wrote: ↑Sun Feb 13, 2022 6:55 pm
Beeble wrote: ↑Sun Feb 13, 2022 4:06 pm
Space Harrier, Afterburner, Virtua Fighter and Virtua Racing shall not be overlooked.
I'm pretty sure all of them have equal or better versions on other consoles/arcades/computers.
None of these games is actually supported in its Arcade counter part on the MiSTer
and all of them look better on the 32X than in the arcade version. Additionally Virtua Racing has more tracks than the arcade version, tracks that were made exclusively for the 32X version.
Wow wow hold on there. Are you saying the 32X versions are better than the arcade versions? If so that's incorrect. Space Harrier runs 30fps on the 32X but 60fps on the arcade and same thing with Afterburner. Virtua Fighter and Virtua Racing both run and look nothing like their arcade counterparts. Even the Saturn versions are nowhere close to the arcade versions. The arcade versions are lightyears beyond. Both games run at higher framerates, at higher resolutions and much better graphics.
Re: 32X
Posted: Mon Feb 14, 2022 6:54 am
by Chris23235
H6rdc0re wrote: ↑Mon Feb 14, 2022 12:24 am
Chris23235 wrote: ↑Sun Feb 13, 2022 10:31 pm
softtest9 wrote: ↑Sun Feb 13, 2022 6:55 pm
I'm pretty sure all of them have equal or better versions on other consoles/arcades/computers.
None of these games is actually supported in its Arcade counter part on the MiSTer
and all of them look better on the 32X than in the arcade version. Additionally Virtua Racing has more tracks than the arcade version, tracks that were made exclusively for the 32X version.
Wow wow hold on there. Are you saying the 32X versions are better than the arcade versions? If so that's incorrect. Space Harrier runs 30fps on the 32X but 60fps on the arcade and same thing with Afterburner. Virtua Fighter and Virtua Racing both run and look nothing like their arcade counterparts. Even the Saturn versions are nowhere close to the arcade versions. The arcade versions are lightyears beyond. Both games run at higher framerates, at higher resolutions and much better graphics.
After Burne and Space Harrier run with variable framerates on the 32X, they are not running with 30 FPS but with 30-60 FPS this is true. But on the other hand I always found the sound much better (higher quality sounds, better samples, in general the sound in the arcade version sounds a little bit muffled) and to my untrained eye the sprite enlargement is more fluid on the 32X then it was in the arcade version.
Re: 32X
Posted: Mon Feb 14, 2022 8:16 pm
by darksakul
The tricky part of a 32X core would be that the 32X Unit has to take the Analog video input of the Genesis, overlay it's own graphics on top and then output the combined analog video.
Reason the 32X works with the Mega SG is that you have to use the Analogue DAC to get Analogue video output, in which the 32X requires.
The Mega SG isn't doing any 32X Emulation.
FPGA is notoriously bad at handling analog circuitry. I not saying it can't be done, but someone has to Reverse Engineer how the 32X overlays it's own graphics over the Genesis Graphics while keeping everything digital.
Re: 32X
Posted: Mon Feb 14, 2022 9:37 pm
by Hectic
at this point I cannot differentiate a serious comment from a troll one. but there are a couple of things that have been commented on in this thread that I don't entirely agree with.
32x is not one of the most important home systems in history. Perhaps not the most irrelevant of sidenotes in the history of failed systems, but not among one of the most importants.
As you've mentioned, I'm also not entirely sure that the best version of any game released at 32x is the 32x version.
I don't think there are many people waiting for the release of the 32x core to buy the MiSTerFPGA. They usually mention the lack of stock or the recent price increase, but nothing about the absence of a 32x core.
Other than that, yes, I think a world with a 32x core for free will be better than a world with no 32x core for free.
I hope its not misunderstood. English is not my main language. Greatings
Re: 32X
Posted: Mon Feb 14, 2022 10:57 pm
by KremlingKuthroat19
Yeah I'm not the biggest 32X fan in the world, but at the end of the day it still is a Sega console. That alone puts it ahead of many other consoles like the Watara Supervision or the Mega Duck or even stuff like the PC-FX. The 32X is similar to the Virtual Boy imo being that they're both consoles with very limited libraries, but the fact that they are Sega and Nintendo consoles, makes them worth playing.
Re: 32X
Posted: Wed Apr 20, 2022 8:21 pm
by hyp36rmax
SRG320 just released a SEGA 32X Core!
viewtopic.php?p=49453#p49453
Re: 32X
Posted: Wed Apr 20, 2022 8:34 pm
by thorr
Wow, what an awesome surprise!!!
Re: 32X
Posted: Wed Apr 20, 2022 8:35 pm
by Waifu4Life
I know, crazy right!
Also, looks like no BIOS is needed.
Re: 32X
Posted: Wed Apr 20, 2022 8:49 pm
by mic_
This is really cool. I know it's an early version, but I decided to try some of my old tech demos, and they all worked, except that the PWM audio playback was too fast. The pitch sounded correct, but it's updating too fast, so I don't know if the audio DMA interrupt is triggering too frequently or what's going on.
See for example the attached ROM, and compare the result to
this recording from a real 32X.
Re: 32X
Posted: Wed Apr 20, 2022 9:11 pm
by futurepr0n
Yeah this is awesome! A lot of games/roms that have issues for me on real hardware like freezing and stuff work flawless at quick play tests. Really can’t wait to spend some time with the core! Amazing!! Even Doom Resurrection works! And pinnocio which is finicky on actual hardware. Wow.. this is actually incredible
Re: 32X
Posted: Thu Apr 21, 2022 1:09 am
by barfood
Yoooooooooooooooooooooooo
Re: 32X
Posted: Thu Apr 21, 2022 10:29 pm
by seastalker
This is so unexpected and soooo COOL!!
THANK YOU!!!