Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: PSPUAE Dev Thread  (Read 59 times)

0 Members and 1 Guest are viewing this topic.

FOL

  • PSPUAE Dev Team
  • Site Admin
  • A4000T
  • ******
  • Karma: 690
  • Offline Offline
  • Gender: Male
  • Posts: 3,593
  • Amigakit.com Technical
    • PSPUAE
PSPUAE Dev Thread
« on: March 07, 2026, 02:09:18 PM »

OK, worked on this all yesterday afternoon into early hours. Lots of experiments.

What I have done so far and iit has produced good results. This is just sorted sound code, have not touched anything else yet.

/////////////////////////////////////////////////////////
/ Optimise pspuae sound to MIPS  Complete /
////////////////////////////////////////////////////////

Media Engine audio mixer thread implemented
Paula mixing moved off main CPU to Media Engine
Ring buffer implemented between mixer and PSP audio hardware
Adaptive buffer system added to keep ring buffer near target fill
Mixer output packed into single 32-bit stereo writes
Stereo output macros simplified (LEFT/RIGHT packing system)
Buffer flush logic moved out of stereo macros into single SOUND_FLUSH call
PSP audio callback rewritten to use block memcpy transfers instead of per-sample loop
Ring buffer underrun handling preserved during block copy
Ring buffer aligned to 32-byte PSP cache line
Mixer buffer aligned to 32-byte PSP cache line

Stuff done today. Think I have tweaked it to the PSP hardware as much as I can.
branchless ring pointer wrap
mixer register caching
reduced flush overhead
pipeline-friendly mixing
vector-style stereo pairing
Underrun protection with last-sample smoothing
Overrun detection

Guard added to prevent runaway buffering (On ME CPU)
Fixed latency target behaviour (On ME CPU, I figured latency seemed abit high)

CPU, Events, Blitter and Copper next.
« Last Edit: March 08, 2026, 06:36:35 PM by FOL »
Logged
Quote
Resolute and Industrious
Grand ruler of the yellow people and the Ultimate Amiga Empire

FOL

  • PSPUAE Dev Team
  • Site Admin
  • A4000T
  • ******
  • Karma: 690
  • Offline Offline
  • Gender: Male
  • Posts: 3,593
  • Amigakit.com Technical
    • PSPUAE
Re: PSPUAE Dev Thread
« Reply #1 on: Today at 08:10:21 AM »

Started work on other parts now, namely;
CPU, EVENTS, BLITTER and COPPER.

///////////////////////////////////////////////////////////////
/ Optimise pspuae main core to MIPS in progress /
//////////////////////////////////////////////////////////////

Started on this last night, first changes made were to the CPU and how it checks EVENTS.
Basically, CPU constantly asks "are you ready", millions of times a second. On a PC, it doesn't matter, however on the small 333MHz PSP MIPS, it does.
So I changed how it checks for EVENTS. Now we have CPU runs, waits a certain time, then asks "are you ready".
This takes some pressure off CPU, meaning we gain speed.
Will continue tonight.

Have so many ideas, now we have sound completely on PSP's ME CPU (freeing up PSP's Main CPU).
May be able to hand off alot of CPU, BLITTER and COPPER stuff to ME also.

All changes are done without touching timing (even with sound running seperately on its own on ME), so compatability is untouched. Thats my main goal.
On side note, I worked out why AGA, kept screwing up. There is code in main.c that effectively turns off AGA when selected. So expect AGA to be working, :).
Although I have a compiling WIP4, I may continue work on it. Will see how what I'm currently doing with current WIP3 source of PSPUAE pans out. As I may remove all changes made to HardDrive code and start fresh on that issue with WIP3.
« Last Edit: Today at 08:26:04 AM by FOL »
Logged
Quote
Resolute and Industrious
Grand ruler of the yellow people and the Ultimate Amiga Empire
Pages: [1]   Go Up
 

TinyPortal 2.3.1 © 2005-2023