|
From: Andreas Möller on 24 Jan 2008 10:32 Hello Folks, somebody out there who knows all possible parameters for the Bank Access Routines ? Using ACCESSBank0 with P=1 will switch back P=8 will access the bank if the chosen bank has been calculated before P=9 will store in the chosen bank P=10 will pack the chosen bank Is this correct ? What will P=3 and P=5 do ? Greetings and TIA Andreas
From: Claudio Lapilli on 24 Jan 2008 11:35 On Jan 24, 10:32 am, "Andreas Möller" <andreas_moellerNOS...(a)gmx.de> wrote: > Hello Folks, > > somebody out there who knows all possible parameters for the Bank > Access Routines ? > > Using ACCESSBank0 with > > P=1 will switch back > P=8 will access the bank if the chosen bank has been calculated > before > P=9 will store in the chosen bank > P=10 will pack the chosen bank > > Is this correct ? > > What will > > P=3 and > P=5 do ? > > Greetings and TIA > Andreas I have almost all of them figured out (disassembled the rom myself). But I have all that written in paper, it will take me some time to type it in an organized way. I'll try to put something together during the weekend for you. Regards, Claudio
From: Andreas Möller on 24 Jan 2008 11:38 > I have almost all of them figured out (disassembled the rom myself). > But I have all that written in paper, it will take me some time to > type it in an organized way. I'll try to put something together during > the weekend for you. Surely are laborious work ;-) Thanks for your efforts. Andreas
From: Claudio Lapilli on 24 Jan 2008 18:27 OK, I have some time today, so here it goes: All ACCESSxxx routines work the same, with minor differences. Be aware that this information is what I personally understood that the rom was doing, it might be wrong and cause damage to your flash (that you can repair with a total bank reformat, not physical damage). P=0 --> MAP BANK IN MEMORY (at address 0x40000) P=1 --> UNMAP BANK P=2 --> COPY DATA (similar to MOVEDOWN but maps/unmaps bank automatically) Args: R0.A = Source address R1.A = Destination address C.S = Copy direction (=0 copies from R0 to R1, non-zero will copy from R1 to R0) A.A = Nibbles to copy P=3 --> READ OBJECT FROM BANK TO TEMPOB Args: R0.A = Address of object in bank A.A = Size to allocate in TEMPOB Returns: R0.A = Address of a copy of the object in TEMPOB P=4 --> GET BANK NUMBER Returns: C.A = Bank number (0=PORT0, 1=ERAM1, 2=ERAM2, 3=BANK0, 4=BANK1, ... always flash BANK+3) P=5 --> GET OBJECT TOTAL SIZE Args: R0.A = Address of object in bank Returns: A.A = Size of object including prolog P=6 --> FIND LIBRARY NUMBER WITHIN BANK Args: B.X = Library number Returns: If library is found: D0 = Address of library prolog and Carry is clear, otherwise carry is set if lib not found P=7 --> FIND BACKUP OBJECT BY NAME Args: D1 = Address of name, pointing to the data of an ID object (2 nibbles length then the string) Returns: If object is found, D0=Address of prolog of the backup object (not the object inside), and carry is clear. Otherwise carry is set if name not found. P=8 --> GET BANK FREE SPACE Returns: A.A = Free space in bank P=9 --> STO an object in flash Args: ST=0.0 indicates that a backup object will be stored, ST=1.0 indicates a library will be stored R1.A = Address of prolog of the library or the backup object. If ST=1.0, the object will be stored as-is. If ST=0.0, the object will be embedded in a backup object. B.A = Size of object, including prolog. This is the TOTAL size of the object, therefore when using ST=0.0 this is the size the size of the future backup object, and must be pre-calculated. R0.A = Address of prolog of an IDENT object that contains the name of the backup object (only if ST=0.0) P=10 --> REPACK A FLASH BANK Args: R0.A = Address of free temporary space in TEMPOB (previously allocated), to be used during repacking R1.A = Size of the free block P=11 -->CHECK CRC FOR ALL OBJECTS IN BANK, TRUNCATE BANK IF INVALID CRC (not clear, this might be wrong or incomplete) Returns: CC if OK, CS if bad CRC was found P=12 --> PURGE AN OBJECT Args: B.A = Address of object to purge P=13 --> PREPARE ROMPARTS TABLE (not completely understood) P=14 --> LIST ALL VARS IN BANK Args: D1=Address of a memory block where tagged names will be written B.A = Size of the available block Returns: D1 = Pointing right after the last name written, B.A = space left, CC if OK, CS if memory was insufficient P15 --> EXECUTE CUSTOM ROUTINE ON EVERY OBJECT Args: R4.A = Address of user routine The custom routine must preserve D0 and R4.A On entry, the routine receives: D0 = Address of prolog of object, and the bank is mapped so the object is accessible. On return, the routine must set CS if it wants to stop the loop, or CC to continue scanning objects. That's all I know about it. If you find out anything else let me know. Claudio PS: Most of these services return CC if OK, CS if error. I might have omitted that info in some of them.
From: Andreas Möller on 24 Jan 2008 19:19
Hello Claudio, thanks a lot. You give something to chew on ;-) I am working on my own STO-Routine for port2 as xSTO is somehow buggy and likes to crash from inside a program if a erase of a bank has to be done before the actual storing will happen. Will the information you posted make its way into Carsten Dominik entry data base ? I am still using the data base from May, 30 2005 and a lot of the newer stuff is missing there. Take care Andreas |