Talk:83Plus:Software:usb8x/Asm Interface/MSD/MSD Initialize

From WikiTI
Jump to: navigation, search

I've been trying to work with this newest version. But I seem to get an error when I MSD_Initialize, returning an error code of 8.

ld hl,driverram
ld a,uDriverInit
call USBDriverCall
jp c,driverfailed
ld hl,appBackUpScreen
ld de,appBackUpScreen+256
ld a,uMSD_Initialize
call USBDriverCall
jp c,msdfailed          ;fails here
ld a,uUFI_Initialize
call USBDriverCall
jp c,ufifailed
ld a,uFAT_Initialize
call USBDriverCall
jp c,fatfailed

I'm not using zds so I'm not using the U_call macro, does there seem to be anything wrong? MSD8x the app does get past initization and displays files. (preceding unsigned comment by Jim_e (talk • contribs) 12:48, 17 August 2006 (EST))

Error 8 is one of those not very helpful ones because it means something has gone wrong during initialization, but not any of the other error conditions I check for. My initial reaction is to say make sure the device was not previously initialized, the port was in a reset state (plug/unplug the cable and turn on/off the calculator), and that your batteries are fresh. It seems odd that it would work with MSD8x but not with your code, though. Maybe Brandon will have a better idea --Dan Englender 12:17, 17 August 2006 (PDT)
Wow, I didn't know people were already using this. :) I'm not sure. I've never gotten error 8 while testing this. I'll keep looking, though. --Brandonw 14:53, 17 August 2006 (PDT)
You could try zeroing out appBackUpScreen before trying to initialize. I'm not sure why that affects things (I must be using something before storing to it, somehow). I've seen this work before and I zero it out in usb8x, so I'd be surprised if it works here, but you know...one of those random things to try... --Brandonw 14:59, 17 August 2006 (PDT)