Speed issues on Hardware

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

JetSetIlly

Quote from: Andrew Davie on 12 Jul 2026, 03:59 AM
Quote from: JetSetIlly on 11 Jul 2026, 04:43 AMA good thing to add to these test binaries would be debugging information about the state of the MAMCR register

The attached version displays "MAM n", where n is the contents of that register.
Excellent. I'll be interested to see what it says when run on hardware. It probably says 2, but it says 1, then that would answer a lot of questions

https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

SpiceWare

Picture is unstable, shows MAM 2.

Andrew Davie

Quote from: SpiceWare on 12 Jul 2026, 06:13 AMPicture is unstable, shows MAM 2.

TY. OK...
I've rewritten the game kernel. This version has a conservative 50K cycles budget for OS/VB.
So, new kernel.... fingers crossed.

SpiceWare

no bueno

Andrew Davie

#19
Quote from: SpiceWare on 13 Jul 2026, 02:00 AMno bueno

Dammit.

OK, once more into the breach; I do appreciate your assistance.
This one I put some timing diagnostics, found some overtimes in the emulator, fixed that (more a structural thing than a specific overtime), and increased the cycles to 100K. Honestly I currently have no idea what on earth is going on. I might, after this round, just retire worrying about it for a while.

Andrew Davie

I'm pretty confident the last effort has fixed the root cause.  There will be occasional overtimes still - I have to rework some code to make sure that everyting is "gated" properly in terms of time usage. But the fix I made will mostly work, pretty sure.

Taking bets... good odds offered!

Andrew Davie

Bizarre GCC bug found?
Vector to code through function pointer table --> 17.5K cycles
Direct call to code through if/else --> 2.5K cycles
Prior version kind of "masked" this problem.
This version nails it. 
I'm still gobsmacked; this can't possibly be right.

Andrew Davie

Quote from: Andrew Davie on 13 Jul 2026, 07:41 AMI'm still gobsmacked; this can't possibly be right.

It's not. Stupid programmer error.

SpiceWare

Both recent builds still roll, video's of WenHopPlanetPluto_20260713@07_38_28_120K.bin