WimpTracker Sept 1992
Colin Ferris (399) 1814 posts |
Having a go at running ‘WimpTracker’ from Sep 1992. Seems to play a file ok using RO 5.23 (26 Jan 2017)/Emulator. But on the Iyonix/high vector version – I get in the zeropain file:- ldr r4,[r3,#20] (r3= &6E) Is &82 something special? Also after a while playing a file for a minute or so – a error (as below) pops up:- PC &20000018 - By the way – the Iyonix sound output seems quite quiet without a extra amplifier - |
Colin Ferris (399) 1814 posts |
What does this arm code do? |
Rick Murray (539) 13840 posts |
Note to self: if reading in the car, pay attention! |
Martin Avison (27) 1494 posts |
I thought ^ with STM implied user mode registers stored … but unpredictable in user & system modes? Or is that out of date? |
Rick Murray (539) 13840 posts |
As Martin says, it will store the USR mode registers from a privileged mode (not USR or SYS). That is to say storing R13 and R14 will store R13_usr and R14_usr and not whatever banked registers apply to the current mode. [online via my phone and GPRS/EDGE as 3G won’t pass stone walls – it’s highly reminiscent of the days of dial up!] |
Colin Ferris (399) 1814 posts |
With ref to A5000/RO 3.1 Is &01F04000 address special? |
Jeffrey Lee (213) 6048 posts |
I believe that was the address of the sound workspace (channel control blocks, etc.). For RISC OS 5 you should be able to get the address from OS_ReadSysInfo 6 item 68 (although I’ve got no idea if the internal structure is the same – I guess it will depend on what WimpTracker is trying to do with it) |
Colin Ferris (399) 1814 posts |
Thanks for your help – doesn’t seem to anything special at that address with respect with RS RO3.1. Found a mistake that I have made in WimpTracker module :-( Briefly tested now – on the Iyonix – now plays a tune. ref the below :- STMDB R13!,{R0} r0 gets flaged as a error – is there a way around this – without using NOP. |
Rick Murray (539) 13840 posts |
What are you using and what exactly was the message? I’ve built that bit of code using BASIC. No messages at all. I built it with objasm and it warns me that using a load/save multiple on a single register is inefficient. Your code appears to be setting IRQ mode and disabling interrupts. What mode are you entered in? I ask this because if you write R0 to R13_svc and then reload it from R13_irq… that’s not gonna work! You’ll have an extra word on the SVC stack and one too few on the IRQ stack in that case. Could lead to some really weird crashes… Here’s a clumsy way to preserve a variable across a mode change without corrupting anything:
Untested, of course. ;-) But that ought to preserve R0 regardless of whatever R13 may be or become. BTW, you might want to clear the lower four bits in the BIC. Just because it doesn’t do anything now doesn’t mean that ARM work make it have meaning some time in the future. |
Colin Ferris (399) 1814 posts |
Thanks Rick -for your info. Taking up your suggestion of saving the flags – it seems the prog is in IRQ already – I had thought it would have been SVC – so point taken about r13_svc. Hmm – why not just use swi OS_IntOff/swi OS_IntOn instead! Those swi’s seems to switch off/on one of the interupts. |