0 Members and 3 Guests are viewing this topic.
Edit: Feature Request:Can you add a screen somewhere that says what is in all of the On + number hooks? I sometimes am hesitant to use them because I don't want to accidentally think that I'm pushing the wrong thing. If zStart's out of space you could even make it a standalone program; I'd just find it quite useful. Thanks!
Oh, thepenguin, earlier today I had a random-ish RAM Clear when trying to edit a program in archive after triggering a regular RAM Clear and then trying to edit an archived program (by pressing a number, if that matters). I ran zStart after the second RAM clear, toggled zStart Off, then On again, and then tried editing the same program. That worked just fine.Not to burst your bubble (bug-ble?) or anything...
Quote from: ztrumpet on December 12, 2011, 08:25:23 pmOh, thepenguin, earlier today I had a random-ish RAM Clear when trying to edit a program in archive after triggering a regular RAM Clear and then trying to edit an archived program (by pressing a number, if that matters). I ran zStart after the second RAM clear, toggled zStart Off, then On again, and then tried editing the same program. That worked just fine.Not to burst your bubble (bug-ble?) or anything...So, to clarify. You cleared ram, then when you went to edit a program, it crashed again? If that's true, then...
Quote from: thepenguin77 on December 12, 2011, 10:16:42 pmQuote from: ztrumpet on December 12, 2011, 08:25:23 pmOh, thepenguin, earlier today I had a random-ish RAM Clear when trying to edit a program in archive after triggering a regular RAM Clear and then trying to edit an archived program (by pressing a number, if that matters). I ran zStart after the second RAM clear, toggled zStart Off, then On again, and then tried editing the same program. That worked just fine.Not to burst your bubble (bug-ble?) or anything...So, to clarify. You cleared ram, then when you went to edit a program, it crashed again? If that's true, then...Yup. The first RAM Clear was from 2nd / Mem / Clear RAM, while the second one was not voluntary. Let me try to reproduce it right now.Edit: I can reproduce it on my calc by doing the exact same thing as before.Edit 2: It looks like all I have to do to fix it is run zStart - I don't even have to toggle it on/off like I did earlier.
I had a quick question about editing programs in archive. I assume that what it does is make a copy in RAM and then copy it back if changes were made. But what happens if there's not enough room in RAM to hold the copy? Are other programs temporarily archived to make space or will it not let you edit the program?You mentioned you had an entry point in zStart so Axe errors could be shown in archived programs, but the routine sounds like it could be small enough to just include it in the app since I still have a lot of space. But I don't know how you're implementing it so maybe I'm wrong or there are other advantages to calling it through zStart that I'm forgetting.
;############################editProgram: ld hl, 0 ld (errOffset), hleditProgramCustomOffset: bcall(_chkFindSym) ret c ld a, b or a jr nz, itIsArchived ld hl, op1 call getLastLetter bit 7, (hl) jr z, doTheEdit jr setTheHook ;idiotitIsArchived: call findStartInRom bcall(_loadDEIndPaged) inc hl call fast_bhl push hl ld a, e or d ld a, b push af push de ld a, 3 out ($20), a ld hl, op1 call getLastLetter set 7, (hl) call pushOp1 bcall(_chkFindSym) jr c, notThisFoundz bcall(_delVarArc)notThisFoundz: call popOp1 pop hl push hl call pushOp1 bcall(_createProg) call popOp1 inc de inc de pop bc pop af pop hl jr z, zeroSizes bcall(_flashToRam)zeroSizes:setTheHook: ld hl, appChangeHook in a, (06) bcall(_enableAppChangeHook)doTheEdit: ld hl, op1 ld de, varType push hl bcall(_mov9B) ld a, 3 ld (menuCurrent), a ld a, 1 ld ($85DF), a ld a, kEnter bcall(_pullDownChk) bcall(_clrTR) pop hl ld de, progToEdit-1 bcall(_mov9B) push af ld a, kError ld (cxCurApp), a pop af bcall(_newContext0) bcall(_mon);###########################################appChangeHook: add a, e cp kPrgmEd ;these are all part of editing ret z cp kMode ret z cp kTblSet ret z cp kFormat ret z finishEditing: push af push bc push hl ld a, b cp $46 jr nz, killAppChangeHook ;this is in case a weird switch happens ld hl, varType call getLastLetter bit 7, (hl) jr z, killAppChangeHook ld a, 3 out ($20), a bcall(_runIndicOn) ld hl, varType rst 20h call pushOP1 ld hl, op1 call getLastLetter res 7, (hl) bcall(_chkFindSym) jr c, cantFindProga ;these things never seem possible until it crashes bcall(_delVarArc)cantFindProga: call popOp1 ld hl, op1 call getLastLetter ld de, -op1-1+7 add hl, de push hl bcall(_chkFindSym) ;if this is gone, we let it crash pop de or a sbc hl, de res 7, (hl) ld hl, op1 call getLastLetter res 7, (hl) call pushOp1 bcall(_chkFindSym) bcall(_arc_unarc) call popOp1 ;this is for ON + STOkillAppChangeHook: bcall(_disableAppChangeHook) pop hl pop bc pop af ret;#######################################;input: hl = start of op1, or similargetLastLetter: push af push bc ld bc, 10 xor a cpir dec hl dec hl pop bc pop af ret;#########################################pushOP1: push af push bc push de push hl ld hl, -12 add hl, sp ld sp, hl ex de, hl ld hl, 12 add hl, sp ld bc, 10 ldir ld hl, op1 ld bc, 12 ldir pop hl pop de pop bc pop af ret;##########################################popOP1: push af push bc push de push hl ld hl, 10 add hl, sp ld de, op1 ld bc, 12 ldir ld hl, 10+12-1 add hl, sp ex de, hl ld hl, 10-1 add hl, sp ld bc, 10 lddr inc de ex de, hl ld sp, hl pop hl pop de pop bc pop af ret;##################################;Move to start of data in Rom;Input: Output of _ChkFindSym;Output: HL = start; B = rom page;Destroys: C DE FindStartInRom: ex de, hl LD de, 9 add hl, de call fast_bhl bcall(_LoadCIndPaged) inc c ld e, c add hl, de call fast_bhl ret ;########################################;faster bhl;only checks for going overfast_bhl: ld a, h res 7, h set 6, h cp h ret z inc b ret
Iirc I've gotten an ERR:MEMORY trying to edit an archived program from home (well, I run it from the homescreen and take advantage of the ERR:SYNTAX ). Hasn't happened lately tho, either because I keep a lot of ram free or it's been fixed somehow.
I believe I have found two bugs. First, it appears that once zStart has "learned" the proper delay for your LCD, it will send this value to port 29h upon startup whether you want it to or not, as there is no option to control this. Second, it appears that bits 0 and 1 of port 29h are given no special care (either preserved or set) when this LCD delay value is sent. For instance, with my LCD delay value of 32 (20h), zStart resets bits 0 and 1 of port 29h, thus disabling the 6MHz memory delays whether this is desired or not.
Bug: when editing an archived program, and you trigger the APD by on+stat, upon returning to the homescreen the cursor is always at the top-left.It doesn't happen with programs in the RAM.
Bug: On the catalog, when I try to assign the token "prgm" as a shortcut, it assigns the token "PlotStart" instead, which is strange, because that cant even be found in the catalog.