PTT = Push to test, triggered by pressing ON while holding left and right arrows.
Compiled with 100% MIMAS 0.2.
ld hl,Text
bcall PutS
ret
Text:
DB "TO BE DISPLAYED",0
The input for the bcall PutS is the pointer to the string to be dispayed in hl.
Example:Code: [Select]ld hl,Text
bcall PutS
ret
Text:
DB "TO BE DISPLAYED",0
LD HL,0
LD (penCol),HL
LD HL,StrGetKeys
BCALL PutS
...scrolls down to StrGetKeys...
StrGetKeys:
DB "Enter PassCode",0
nope. the OS automatically checks the first byte to see if it is $83 before running it.
also, my previous post was #100000 :D
This is like the second topic in the past 24 hours mimicking my raycaster's subject format! ;)
Regarding the topic at hand, I don't know much about hooks but I'll throw out a wild guess here. Is this problem possibly due to the same reason that PutS doesn't work in Apps? In which case the solution would be to use a PutC loop?
Another possible cause: Is your source code set to originate at the location the hook will exist in RAM? If not, StrGetKeys would be compiled to an incorrect value.
Wait so this trick prevents PTT from doing its appropriate effect? Or does it let you exit PTT? If it's the later, it would be cool if you found a way to exit PTT without using the conventional way and without having a patch installed.
You can take the compiled Mimas ASM code and put it into an Axe program and compile the program as an app.
And in my opinion Brass and ZDS are really good assemblers.
:Asm(prgmSECURITE)
doesn't seem to work...:[prgmSECURITE]
:AsmPrgmSECURITE
Raw Key Hook:
...
If unlocked other stuff including 'RES 7,(IY+$28)
...
SET 7,(IY+$28)
...
CPDR ;check key pressed against keys to block
JR Z,Block
CP kOff
RET NZ ;let it go if none of those
DI
LD B,3 ;number of interrupts to wake up. The 'on' key seems to like to cause extra.
LD A,2 ;turn off lcd
OUT ($10),A
Off:
LD A,8 clear interrupts
OUT (3),A
LD A,$11 ;On key and link/usb port
OUT (3),A
OffLoop:
IN A,(4) ;interrupt state
AND $F7 ;ignore the 'on' key status bit
JR Z,OffLoop
DJNZ Off ;More interrupts needed to exit?
LD B,A
LD A,3 ;turn on lcd
OUT ($10),A
LD A,$0B ;back to normal
OUT (3),A
EI
LD A,$10
AND B ;= BIT 4,B
JR Z,Block
LD A,$FF
LD (CurKStr),A ;see App Change Hook, also used as a pointer to the current key in the keystring
Block:
XOR A
RET
...
App Change Hook
DB $83
PUSH AF ;seems to act funny if I don't restore this
SET 7,(IY+$28) ;treats kOff as a keypress, disables PTT as a side-effect
LD A,(CurKStr)
CP $FF
JR NZ,Fwd
RES 7,(IY+$28) ;treat kOff as a command
Fwd:
POP AF
RET
grrr... I wanted to include a backup utility with this, but its failing.Actually, 82 (ram page 2) should work. TIOS uses 80 and 81 (ram pages 0 and 1).
My calc is one of the newer ones, so no pages 4-7. I would think pages 2 and 3 would work well enough though... but apparently not. The calc crashes when trying to parse BASIC with just a backup, and resets immediately upon return to ti-os with a backup and restore.
Scratch that, re-running the app after backup strangely prevents crashing, but the restore still fails.
Everything else mostly works. That'd be the backdoor that still fails.
Sorry to hear, I hope you can figure it out soon :(
By the way I assume page 4-7 are the extra RAM pages? I think those should be avoided if possible, for maximum compatibility with newer calcs.
grrr... I wanted to include a backup utility with this, but its failing.Actually, 82 (ram page 2) should work. TIOS uses 80 and 81 (ram pages 0 and 1).
My calc is one of the newer ones, so no pages 4-7. I would think pages 2 and 3 would work well enough though... but apparently not. The calc crashes when trying to parse BASIC with just a backup, and resets immediately upon return to ti-os with a backup and restore.
Scratch that, re-running the app after backup strangely prevents crashing, but the restore still fails.
Everything else mostly works. That'd be the backdoor that still fails.
More blocks are good, especially for people like Yunhua98 x.x
By the way, when a program is in Pause mode or Input mode (like Wacky Fun Random Numbar Generator :P), it seems that removing a battery causes a RAM clear too. That might be a bit hard to block, though, other than blocking the entire prgm menu and prgm command. Same thing goes for long strings of Sin/rand commands or the SortA/D( commands if someone sorts a 999 elements list.
I'm glad you,re still around and that's it's still progressing. ^^No... not right now... the math to put a sprite on screen is evading me...
Is the isometric engine still in the works too, by the way?