Dim(30 is not working correctly or something…
So for some reason, unless I either display the graph from the home screen before doing so or do it in TI-BASIC using the DispGraph command, dim(30 fails to copy the contents of the LCD to the graph buffer. It just comes up blank. I'm tempted to try with the ASM opcode to see if the same thing happens. It wouldn't be a big deal to use Dispgraph before running dim(30 but the only problem with that is that it causes the screen to flash very unprofessionally before the program starts. Somehow using the DispGraph function resets some sort of flag which makes dim 30 work. Xeda, got any ideas?
The command is supposed to very literally copy whatever is on the LCD to the graph screen. The OS might have a flag set that says the graph is "dirty" so it wipes the screen. dim(99) does not check that flag, so have you tried dim(30,99) to see if it properly copied?
dim(99) is meant to be a more professional version of DispGraph, anyways :)
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Yes I did actually, and in fact, it only works with dispGraph and not dim(99! It's really odd. At any rate, here's the code. I'm sure you'll be able to appreciate it:
:ClrHome
:StoreGDB 0
:FnOff
:AxesOff
:PlotsOff
:Text(25,30,"Loading...
:".BAD NAME→Str3
:"UOFFSCRPT→Str2
:If Str3=dim(21,Ans
:Then
:dim(5,"FDCB2E86FDCB0866C0FDCB2EC6FD7E34323C8021889B113D80010400EDB0213180E7EF4E4CD8211D71EF7B4FEF4045C91453746172742D757000000000000000
:dim(64,"DAns",Str2
:dim(5,"5AD401010100424F4F540000000000010000000000000000000002
:dim(64,"DAns","USTARTUPD
:End
:"6.8→Str2
:Str3=dim(21,"UVHDrive→B
:Lbl 1
:dim(65,42
:B+expr("dim(36,0,0,56,6,29,26,43,0,31-6B,4,99,109,28,0,40,"+Ans+"BIOS 6.8"+Ans+","+Ans+sub("Linux"+Ans+","+Ans+"TI-OS"+Ans+","+Ans+"Shutdown",9B+not(B),24-8B
:If 2=Ans
:Then
:dim(22,"3E01D303FB76FDCB09A6
:Goto 1
:End
:If Ans
:Then
:Disp
:RecallGDB 0
:DelVar GDB0dim(1
:Stop
:End
:dim(29,26,44,0,31,1,99
:-π→θ
:prgmLINUX
I like the really strung out BatLib command in the middle XD I finally actually used the ability to run BatLib commands through expr(! And in a way that was totally worthwhile. This lets me detect whether or not Linux is present on the calculator and display the boot menu accordingly without hardcoding. :) I have optimized this program over and over and have taken it down to a measly 591 bytes. This is BIOS version 6.8 and is definitely superior to the preceding BIOS's. It renders everything super fast. All the draw commands are done to the buffer before actually displaying it on the LCD so there's not any flickering or anything, it just immediately goes to the boot menu. Also, you can now archive Pic1. I switched from using the OS routine to the BatLib command to display the pic. After all was said and done, I didn't use a single byte more, and it was a lot prettier. It doesn't flash anymore. I also switched to hex bytes for the OFFSCRPT since it was significantly smaller than using dim(67 to convert the list. I omitted the dim(30 in this version since it does not work without flashing yet, but I'll get that fixed eventually I'm sure. The BatLib code actually almost outnumbers the actual TI-BASIC code in this program lol
Wait, so what are you trying to do with dim(30) ? I tried it and it worked. I think you may be expecting it to work differently?
If you do dim(30,99), it should look like nothing happened because it copies the LCD to the graph screen, then copies the graph screen to the LCD (so it is redundant). If this doesn't happen, then it implies something is awry.
When you "dirty" the graph screen and then the OS puts it in view, it will erase whatever is on the graph screen. Can you give an example of offending code that I can I explain?
Z80 Assembly>English>TI-BASIC>Python>French>C>0
So this is what I do at the beginning of the program. The idea is that when you run it, it appears that the text "Loading…" in graphscreen font is on the homescreen, in the middle of the LCD. I was like, oh this is easy, just copy the homescreen to the graph screen and switch to the graph screen and then draw the text. Um…yeah…didn't work. Just take that exact same code I gave you above and add this line:
dim(30,99
The oddest thing is, it works as soon as I display the graph screen using the OS routine or from the homescreen, then as soon as I run it again, it stops working.
If you have a better way to make this work other than copying the the graphscreen buffer, feel free to inform me, I'm not picky, I just want to get it done :)
EDIT:
Just tried using the Asm opcode on the hexcodes page, and the same thing happened. I suppose they're the same code. I think I may try setting the graph screen as non-dirty using the opcode then run it.
REEDIT:
Setting the graph screen to non-dirty fixed the issue :) I still have to deal with a small flash that happens when the calc transitions from the homescreen to the graphscreen. If you know a better way to do this, feel free to tell me! Aha, fixed that too, nvm problem solved!! :D
This code:
dim(30,99
Does almost nothing noticeable. It is exactly the same as just dim(30 :P dim(99 doesn't set the graph screen as the current window being used which is why you can use dim(99 on the homescreen. I'm glad the code to undirty the graph screen worked :) Maybe I should add that as part of the dim(30) command?
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Yes maybe so :) Actually, I never explicitly display the graph screen and instead have the OS do it automatically when displaying the text.
Yeah, I like doing that, too :D
Z80 Assembly>English>TI-BASIC>Python>French>C>0