VOGONS


First post, by asic28

User metadata
Rank Newbie
Rank
Newbie

Hi all,

I'd like to share a project that may interest some of you: ScratchPsx, a PlayStation 1 emulator running natively under MS-DOS (DOS/4GW, built with Open Watcom).

Features:

MIPS R3000 → x86 dynamic recompiler
Video: VGA 320x200, mode X 320x240 (256 colors, dithered), VESA 640x480x16
3dfx Glide 3 renderer for Voodoo Graphics and Voodoo 2 (SLI handled by Glide): polygons, sprites and textures drawn by the card at 640x480, palettized textures with chroma-key transparency
Sound Blaster 2.0 / Pro / 16 (up to 44.1 kHz 16-bit stereo, CD audio and XA)

An in-game menu GUI as a tribute to Genecyst (yes, with the dripping blood)

Status: so far it has been tested under DOSBox-X (emulated Voodoo 1). Crash Bandicoot and Tekken 2 boot and play, amongst almost all ps1 library.

Under emulation the Glide path isn't faster, which is expected. I'll test it soon on my real machines: a 486DX4-100 with a PCI Voodoo 1, and a P2-350 with 2× Voodoo 2 in SLI.

Known limitations of the Glide renderer: no mask bits, no read-back of what the card drew, and subtractive blending is approximated (the Voodoo can't subtract).

It's freeware.

The archive includes the MSDOS versions (three executables (VGA/VESA, Voodoo 1, Voodoo 2), DOS4GW) and the Windows version.

Check this video (DosBox-X)
https://www.youtube.com/watch?v=KK65ccNZhUY

Feedback and reports from real hardware are very welcome, especially speed on Pentium / P2 class machines and other Voodoo cards. Feel free to post your SCRPSX.LOG if something goes wrong.

Cheers,

Reply 1 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

Here are some screenshots

Reply 2 of 15, by theelf

User metadata
Rank Oldbie
Rank
Oldbie

Hi tanks!love the interface, hope more emus have similar ones, like nesticle, callus, zsnes etc

About the emu, i tested in a 233MMX no voodoo, S3 Virge 4mb, and work! cool, tested a not much demanding game, megaman x6, the problem is like 2fps

Love the 256 color dithering by the way, is super nice

Reply 3 of 15, by zyzzle

User metadata
Rank Oldbie
Rank
Oldbie

Great to have another fine emulator for pure DOS. Thanks for posting.

Reply 4 of 15, by brotalnia

User metadata
Rank Newbie
Rank
Newbie

I decided to test this on real hardware and record the performance. Unfortunately the voodoo 2 mode didn't work for me, and it was quite slow on my pentium 3.
https://www.youtube.com/watch?v=ivdA_hIJ2K8

Reply 5 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

Software rendering is quite accurate so will slow down things a lot.

Sorry for the disapointment i did my best

Reply 6 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

Anyway, thanks for testing! Just to set expectations: ScratchPsx targets real DOS machines (486 to Pentium II). Under DOSBox it is an emulator running inside an emulator, so it's much slower than a native Windows emulator like ePSXe, which uses a modern CPU and the GPU. Without a 3dfx card, everything (CPU emulation and drawing) is done in software, which was already heavy on 90s hardware. The point of the project is running on period hardware, ideally with a Voodoo. Real hardware results coming soon.

Reply 7 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

For all who have tested the emu, can you send me the SCRPSX.LOG file please ?

Reply 8 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

I have some more news concerning performance. Coming soon

Reply 9 of 15, by zyzzle

User metadata
Rank Oldbie
Rank
Oldbie

I'm going to test this soon on intel core processors. It should run like a dream. I don't have my bootable USB memory stick with me at the moment. It will be interesting to see how total software performance (no Voodoo card on an intel i5-8250 CPU!) will be. I'll try on a Broadwell (i7-5600 @ 3.2 Ghz with mtrrlfbe loaded to speed up LFB graphics) and compare to my Kabylake system above @ 3.4 Ghz with NO mtrrlfbe (since its vbios is broken / won't allow LFB writecombining to be set).

Does your emulator support bank switching mode for its graphics as opposed or alternatively to LFB access mode? If it supports bankswitching, then its performance would be optimal on systems with broken onboard vbioses like Intel 6th-10th gen icore systems which have no such limitations in bankswitched mode when accessing VESA modes at 640x480 or above.

I think PS1 graphics were 320x240 native, though? Or were some games 640x480?

Reply 10 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

Wait for the new release. Coming soon today

Reply 11 of 15, by keropi

User metadata
Rank l33t++
Rank
l33t++
zyzzle wrote on Today, 09:24:

[...]
I think PS1 graphics were 320x240 native, though? Or were some games 640x480?

there is the "high-res" interlaced mode on ps1 that is used often in games for menus , inventory screens etc - games changed resolution during these segments

I tested the emu on my test p133 system with a virge vga and 16mb ram , tried to load castlevania symphony of the night , it works but it is very slow - I am getting 2fps on the bios logo and sound disabled - plain vga mode
I guess this needs a voodoo card to be playable, correct?

🎵 🎧 ⏳ ⚡ SoundVision PRO,MK1869 , PCMIDI MPU , OrpheusII , Megacard and 🎶GoldLib soundcard website
💾💾💾 Looking for a full version of LIST ENHANCED 2.4y1 by V. Buerg, message me if you have it for sale! 💾💾💾

Reply 12 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

ScratchPsx DOS – what was slow, what we measured, what the next build will fix

Thanks to everyone who tried ScratchPsx and sent feedback, including the "it's slow" reports. Rather than guess, we measured.

How we tested

Profiled the emulator with the Open Watcom sampler, under DOSBox set to roughly a Pentium II 350 (250,000 cycles).
Ran it on a real P2-350 with 640 MB of RAM and a Voodoo 2. Both gave the same speed (20 fps on the BIOS boot in software rendering), so the DOSBox figures match real hardware.
What we found

The recompiler was often off. It needs about 48 MB of free memory. With EMM386 loaded, DOS/4GW only gets EMM386's memory pool (32 MB by default), even on a 640 MB machine. Without the recompiler, the R3000 is interpreted and everything runs several times slower. This is the most likely cause of the very low frame rates some of you saw. The release notes didn't mention it; now they do, and SCRPSX.LOG shows how much memory DOS/4GW actually gets.
13% of the in-game time went into the compiler's 64-bit helper routines (multiply, shift, divide), called from the GTE and the rasterizer. They have been replaced with inline code.
The compiler wasn't inlining the small rasterizer helper functions (texel fetch, edge stepping). Enabling it gave about 10% more.
Software rendering is the other big cost on a P2. The Voodoo renderer takes it off the CPU.
Results on the real P2-350

Voodoo 2: BIOS logo at full speed (50 fps PAL); Crash Bandicoot at about 17 fps in game, against 8 in software rendering.
New automatic frame skip (Settings > Frame skip, or SET SCRATCHPSX_FRAMESKIP=1): when the PC can't keep up, frames are emulated without being drawn, so games run closer to their real speed. In a test scene in software rendering: 11 → 17 emulated frames per second.
Also in the next build

The 3dfx card is detected on the PCI bus before Glide starts, and if Glide fails, the reason is written to SCRPSX.LOG. The Voodoo 1 build no longer quits silently on a machine without its card.
CD image read errors (truncated file, failing disk) are reported in the log.
If it's slow on your machine, please check:

No EMM386 (HIMEM.SYS only), and 48 MB or more of free RAM;
SCRPSX.LOG shows R3000: dynamic recompiler (x86) enabled;
then send your CPU, RAM, video card, the exe and mode you used, and your SCRPSX.LOG.
Reports with a log are always welcome: they're how we found all of the above.

Reply 13 of 15, by keropi

User metadata
Rank l33t++
Rank
l33t++

left it running and went to do some chores and when I returned 30mins later the system had rebooted
the LOG was 0 bytes so I cannot upload anything from that run
I loaded again to bios and I get this on the log, I suppose there is not much hope atm since 16mb of ram just does not cut it

🎵 🎧 ⏳ ⚡ SoundVision PRO,MK1869 , PCMIDI MPU , OrpheusII , Megacard and 🎶GoldLib soundcard website
💾💾💾 Looking for a full version of LIST ENHANCED 2.4y1 by V. Buerg, message me if you have it for sale! 💾💾💾

Reply 15 of 15, by asic28

User metadata
Rank Newbie
Rank
Newbie

And new release here