[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Decoding RamFactor's memory detection
I agree: It jumps around in strange ways. It make my head asplode.
But it might be a size-to-decimal conversion too. Other bits of the firmware output the size of the card in number of 256-byte pages (stored in text page 1 screen holes) and the prodos firmware call returns the size in prodos 512-byte blocks. So it has to get that information from SOMEWHERE. I thought that snooping the diagnostic routine would yield some clues and this is why:
The metacheat "heatmap" feature tells you the value of the PC for each byte that is written or read. So I hovered over the "2" on the screen after scanning the page 1 memory and found that the firmware FDED routine was writing it. With that in mind, I set a breakpoint for that routine and traced the execution. Once I knew what to scan for I could see it writing everything -- hence how I found the exact part where it writes "2" of the "256" to the screen.
I was hoping that I'd find some hex-to-dec conversion there as well. The LSR's for example might be somewhat relevant. Not sure. Anyway, I'll have to look at it again once I can observe the stock hardware more closely. Of the two things I'll look for are #1: Does the firmware actually come off the rom unaltered and therefore match the copy of the ROM I have (or does the size of the card get injected in there somehow?) or #2: Does the diagnostic say 256kb on the first pass anyway and then it updates the size when it finds more memory?
-B
On Thursday, August 16, 2012 11:34:21 AM UTC-5, Hot Rod wrote:
> On Thursday, August 16, 2012 11:17:32 AM UTC-5, BLuRry wrote:
>
> > So that means there IS no ram size detection? That's just bonkers!
>
> >
>
>
>
> That's a bit more difficult to say; those SBC ops are against (presumably) some memory locations ($CBDE,X; $CBE3,X), which condition the carry bit. Those could be the tests, but not enough context to tell.
>
>
>
> But the code snippet provided has some funny addressing - it seems to be ascending, but then jumps backwards, skips ahead? Not sure what to make of that.