Zap Disassemble
Rick Murray (539) 13850 posts |
Would really need to dump the code around PC as well so you know what the address is referring to, potentially with a log of the most recent n copies of PC (in case R14 is set to a bogus value, which gets pushed to PC and boom!). Hey, this is sounding a lot like a Debugger. I wonder if we have one of those? ;-) Aside: It’s a shame DDT cannot deal with module code, and it’s a much greater shame that there is no “simple version” of DDT that interacts via serial port. A fair few lock ups do not freeze the entire system 1 so if interrupts are working out may be possible to talk to the debugger via serial to try to work out what actually went wrong (given that one simple stack mismatch in module code (the SVC APIs) will pretty much kill the machine…). 1 I find DigitalCD playing streaming radio on my Pi2 (ARMv7) will within about a minute cause a total lock up – no mouse pointer, no keyboard LEDs. Obviously it’s damned near impossible to figure out why… :-/ |
Colin Ferris (399) 1818 posts |
I suppose ‘Nero’ wouldn’t mind releasing some of these Debugging progs :-) |
Colin Ferris (399) 1818 posts |
Bit of a problem with the ‘Streaming radio’ with the Pi2 – Rick. A little module in the background – running off interupts – flashing a small dot on the screen. Would a Serial mouse work? I presume most things are based on the USB working ok. Does it do the same thing just downloading the sample to disk? How does one go about redirecting output to the serial port? Other that working on a disassembled ‘DTT’ – is there any way of updating it? |
Jan-Jaap van der Geer (123) 63 posts |
The problem with shift-arrow-right has not repeated itself this week. I had it several times last week so I thought it was easily reproducible, but apparently there’s more to it… Will report back when I have more info… but at the moment it’s not reproducible for me. |
Rick Murray (539) 13850 posts |
So I added some video links to my Eurovision write-up, nineteen songs and a few other bits so twenty three embedded video links in total. Safari on iOS 7 crashes every single time and since Apple are control freaks and don’t like anybody providing an alternative (better) rendering engine, Dolphin vanishes in exactly the same way. On my phone? Android stock, Firefox, Chrome – no problems. Lovely programming there, Apple, to respond to whatever the problem is by https://www.heyrick.co.uk/blog/index.php?diary=20180508&keitai=0 |
Chris Mahoney (1684) 2165 posts |
For what it’s worth, Safari 11 is fine on both phone and desktop. Pity that it kills 7, but it seems that the problem’s been fixed since then.
It’s not just you! I was checking that my speakers were in the right mode and weren’t trying to do something “clever” like convert stereo to surround (I don’t even know whether a surround version is available – I was watching on stereo-only YouTube as I don’t pay for BBC). |
Rick Murray (539) 13850 posts |
Just a bit. :-)
What’s the point? If the mouse pointer isn’t moving, I think it’s pretty safe to say the machine is completely stiffed (and, hence, this sounds like a problem in IRQ code).
Uh… Huh?
I don’t think it is USB. There’s an irregular annoying key repeat, but network stuff seems to be working as expected.
Hmm, how would I get DigitalCD to do that? |
Steve Pampling (1551) 8172 posts |
I’m pretty sure I’ve had instances where the shared drive of a RO device has responded but the GUI was playing dead. I think others have reported similar “lock-ups” |
nemo (145) 2556 posts |
Colin asked
WriteReg is here |
André Timmermans (100) 655 posts |
.bq Hmm, how would I get DigitalCD to do that? Impossible with DigitalCD, but you could type the URL of the radio in a browser and download it (the saved file will just keep getting larger till you abort the download). Another way is to write a little program to test DiskSample to either play the decoded sound, record the input or record the decoded sound. Something like:
The StreamReceiver part will let you test various part of the process: |
Colin Ferris (399) 1818 posts |
Note !Zap seems to have a problem with version ro5.25 (09 Jul 2018). Load a file as ‘text’ then click ‘Window > Mode > Code’ |
Rick Murray (539) 13850 posts |
Does the debug trace indicate a potential point of failure? [I’m not running 5.25] |
Colin Ferris (399) 1818 posts |
Sorry – seems to work ok now ro5.25 (09 Jul 2018) Perhaps is is something to do with trying to work out why – vrpc-dl ‘Portable’ module is playing up with !DeskTracker. Since I jump between ro4.02 and 5.xx – is your latest version of !Zap ok to use? |
Rick Murray (539) 13850 posts |
I think the best I can say is “it should have a few less bugs than other builds”. ;-) |
Colin Ferris (399) 1818 posts |
Is anyone having a problems with !Zap (Rick’s version} with ro5.25 (14 Aug 2018)? If you load – say – a module – and move the pointer across from help in the header – [thats] right arrow key. Gone back to ro5.25 23 APR 2018. [edit 1] |
Colin Ferris (399) 1818 posts |
Hmm – didn’t seem to like the Debugger module being softloaded. Some strange font effects with System font – back using ZapRedraw 0.48 dated 20 Aug 2005 – which is different from the later version of same number. Is it possible to add the patch to the BASIC module that allows DIM A% 20 $A%=“Word” B$=$A% |
Martin Avison (27) 1494 posts |
Is that supposed to be 3 statemts? |
Colin Ferris (399) 1818 posts |
It’s more to do with receiving a msg back from a SWI. Like working out what the error is – back from AcornSSL. ie *report $(flags%+04) produces a long line of info. Have patched BASIC in my VA RO 5.25 – (using Zap) ROM image – and it seems to work ok. [edit 1] msg$ = $(flags%+4) |
Martin Avison (27) 1494 posts |
@Colin: I think you are referring to the fact that $var% in BASIC will return any string characters from the var% address, up to a terminating cr xD (or the 255 maximum). Error messages from SYS calls are placed at r0+4, but they are zero terminated. Thus $var% will include any control characters except cr. Changing BASIC to stop at zeros is dangerous, as some programs may rely on being able to read control characters into strings. A better way is a small function to read memory into a string up to a zero byte. For example: |
Steve Fryatt (216) 2105 posts |
Or, indeed, the “official” mis-use of
PS.. Colin (and others), please can you use the code formatting options (as I’ve done here) when including BASIC snippets? Otherwise, with Textile’s ability to change things on a whim, it’s far from clear whether we’re seeing what you actually wrote or what Textile thought that you meant. |
Rick Murray (539) 13850 posts |
Reporter doesn’t have a way of reporting raw error blocks? That would seem to be a strange omission…? |
Steve Drain (222) 1620 posts |
Indeed, I identified a way to patch any BASIC module, within the same length, so that indirected strings would be recognised when terminated by any control character, rather than just CR. But, as Martin says, this could have unforseen consequences and is not a realistic proposal. A function to do this is usually adequate and I prefer that from Steve, myself, but it is sometimes not even necessary when the null-terminated string is returned in a supplied buffer by a SWI: SYS"Territory_NumberToName",1,buffer%,length% TO ,name$
A temporary buffer can be used with: SYS"Territory_NumberToName",1,STRING$(255," "),256 TO ,name$
Or, with care: SYS"Territory_NumberToName",1,END,256 TO ,name$: REM name$ ought to be a local variable
BB4W has the operator |
Martin Avison (27) 1494 posts |
Wrong. In summary, the following produces a hex & character display… |
Colin (478) 2433 posts |
I think Rick was expecting a specific ReportError command which took a pointer to an error block and printed it out rather than having to do it manually in your program. |
Rick Murray (539) 13850 posts |
It’s worth mentioning that a fair few SWIs return either the length of the string or a pointer to the end of the string (somewhat inconsistently) which you can pick up in BASIC and just do |