Hacking DSTwo programming tips

spinal_cord

Knows his stuff
Member
Joined
Jul 21, 2007
Messages
3,225
Trophies
1
Age
43
Location
somewhere
Website
spinalcode.co.uk
XP
3,374
Country
Don't forget the CPU speed settings as calculated by BassAceGold -

speed 0 - 120 mhz
speed 1 - 120 mhz
speed 2 - freezes, couldn't get a clock speed
speed 3 - 144 mhz
speed 4 - 192 mhz
speed 5 - 204 mhz -unstable, freezes in actual use but somehow survived my loop to get a reading
speed 6 - 240 mhz
speed 7 - 264 mhz -unstable, really low performance
speed 8 - 288 mhz
speed 9 - 300 mhz
speed 10 - 336 mhz
speed 11 - 360 mhz
speed 12 - 384 mhz
speed 13 - 396 mhz

Quite handy to know.
 
  • Like
Reactions: Margen67

Jaylen

Active Member
Newcomer
Joined
Mar 14, 2009
Messages
41
Trophies
1
Age
30
Location
Michigan, USA
XP
132
Country
United States
if speeds 2, 5, and 7 are problematic speeds, does the performance actually lower as you go up?
it says that speed 7 has low performance, so does that get inherited as you go up, or by some weird anomaly it actually works again as you go up?

i thought 360Mhz was the official clock speed...can you overclock it?
 

BassAceGold

Testicles
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
It is just some weird issue with the clock speeds, they do not affect the other speeds. However results could vary on hardware.

360mhz is the most widely used clock speed in the Supercard plugins but 396 is the highest it can go with no issues.
 
  • Like
Reactions: Margen67

Pate

Well-Known Member
Member
Joined
Dec 23, 2010
Messages
108
Trophies
0
XP
82
Country
Finland
Sorry about my blog being so disorganized regarding the DSTwo SDK info..

About the CPU speeds, the first level 0 seems to work somewhat strangely. In the SDK demo program (and in BAG's list) the speed is 120MHz, however in my DS2x86 the speed gets set to 60MHz when using speed level 0. I also hacked together a small ASM code to return the current CPU speed as an integer, using the same method as the stupid printf_clock() function uses.

Code:
ÂÂÂÂ//------
ÂÂÂÂ// Called from the C code. Get the current CPU speed in MHz.
ÂÂÂÂ//------
ÂÂÂÂ.globalÂÂÂÂGetCPUSpeed
ÂÂÂÂ.typeÂÂÂÂGetCPUSpeed,@function
GetCPUSpeed:
ÂÂÂÂlaÂÂÂÂa0, printf_clockÂÂÂÂÂÂÂÂ// Get address of the function
ÂÂÂÂlhuÂÂÂÂa1, 0(a0)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ// High halfword of the "_pllout" variable address
ÂÂÂÂlhÂÂÂÂa0, 4(a0)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ// a0 = signed low halfword of the "_pllout" address
ÂÂÂÂsllÂÂÂÂa1, 16
ÂÂÂÂadduÂÂÂÂa1, a0
ÂÂÂÂlwÂÂÂÂa1, 4(a1)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ// a1 = _pllout value
ÂÂÂÂluiÂÂÂÂv0, 0x431b
ÂÂÂÂoriÂÂÂÂv0, v0, 0xde83
ÂÂÂÂmultuÂÂÂÂa1, v0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ
ÂÂÂÂmfhiÂÂÂÂv0
ÂÂÂÂsrlÂÂÂÂv0, v0, 0x12
ÂÂÂÂjrÂÂÂÂra

Pate
 
  • Like
Reactions: Margen67

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Julie_Pilgrim @ Julie_Pilgrim:
    the internet
  • Julie_Pilgrim @ Julie_Pilgrim:
    @Psionic Roshambo i have 16 gb in my pc and i run into issues with ram more than i'd like to admit
  • HiradeGirl @ HiradeGirl:
    I got only 8GB of RAM. But I want 32GB.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Time to just download more ram
  • K3Nv2 @ K3Nv2:
    Yeah search Google
  • Sonic Angel Knight @ Sonic Angel Knight:
    Or, I also heard that if you use flash memory, it can act as more "RAM" at least windows tell me when I stick a flash drive into it.
  • Veho @ Veho:
    It can act as a swap drive but that isn't more RAM, it's slooow.
  • K3Nv2 @ K3Nv2:
    I wish we could have 1Gbps external storage by now
  • K3Nv2 @ K3Nv2:
    Like for micro
  • Veho @ Veho:
    New Myoo.
  • SylverReZ @ SylverReZ:
    @Veho, Yooo noice
  • SylverReZ @ SylverReZ:
    Looks like a Famicom handheld
  • Veho @ Veho:
    Yeah, they were going for that.
  • Veho @ Veho:
    It's not very good though.
  • Veho @ Veho:
    I'm watching the review, the emulators it uses suck bawls.
  • Veho @ Veho:
    Software update might improve it.
  • Psionic Roshambo @ Psionic Roshambo:
    Or maybe someone will make like Emulation Station for it or something?
  • Veho @ Veho:
    That counts as a software update :tpi:
    +1
  • OctoAori20 @ OctoAori20:
    Ello
  • K3Nv2 @ K3Nv2:
    I can think of the design teams process another joystick and no audio or a joystick and mono audio
  • Veho @ Veho:
    "You think we can just put the speakers at the top
    ?" "NO!"
    +1
  • K3Nv2 @ K3Nv2:
    Pft stereo speakers you're fired
    +1
    K3Nv2 @ K3Nv2: Pft stereo speakers you're fired +1