So, working with the custom pics program it makes me wonder, what is the algorithm for storing pics. It(custom pics) stores the pictures as a list with 86 elements(about same size as default pics), mainly zeroes. So it seems that custom pics uses the same algorithm as the OS, now does it go through the OS or encode it itself, either way im just curious as to what this algorithm might be.
If you mean how the OS stores pics (like Pic0, Pic1…), it's stored as one big 768 byte chunk of data. Since a pixel can be either on or off, it can be represented as a binary bit, with a 1 if it's on and 0 if off. One byte (8 binary bits, or 2 hex digits) can fit the data for 8 pixels, so a 1x8 section of the screen is contained in one byte. There are 96/8=12 bytes for one row in a picture. With 64 rows of 12 bytes the total is 768 bytes, all placed right after each other in memory.
This is the reason why with xLIB/Omnicalc the sprite width has to be a multiple of 8 but the height doesn't.
Hmm, well thanks for that info, I wonder if thats the method custom pics use
Custom pics is a small Asm library that takes the current graph and stores/recalls it as a list, about 789 bytes.
The lists are accessible on the calc but not with the TI Data Editor and contain odd data(very extended decimal places).
Im wondering if then…
OMG..warning, do not try to edit the lists made by custom pics, cleared my RAM. God im so glad I did a backup 30 mins ago, otherwise this whole project would have ended.
(continuing) is it possible that custom pics outputs a same chunk of data but disguises it as a list.
Actually, on the machine/processor level (what asm deals with) everything is just a chunk of memory. The difference is how it's handled/read/displayed. Really, the only difference between a "real variable" and "list variable" is that in the chunk of memory the real is stored the first byte is $00, and for lists it's $01.
Learning asm gives a lot better understanding of how the calc (especially data storage) works, and a lot of things that seem strange or inefficient now make perfect sense once you know the underlying processes.
*Sorry if this is too much info, but I'm learning asm right now so all this stuff if going through/stuck-in my head.
[edit]@Valros: If you're using a program that does something you generally aren't able to do without an asm program, always back-up first or use an emulator when screwing around with the new stuff :)
No I get all of it, just haven't had the motivation to learn assembly, whats the best crash-course guide, I dont feel like taking 28 days to learn it, if you get the reference.(Learn Asm in 28 days is a popular guide) I think the last time I gave up after too much fiddling with the compiler, couldn't get it too work.
edit:
And yeah Ive read about assembly being a system of more-over throwing system calls in the memory and waiting for the cpu to execute it. Are there any other systems which are still actively programmed in assembly, even though it would be different from programming on a z80.
Judging by almost every single post at UTI and a ton of other posts at Cemetech and WikiTI, 28 Days by Sigma is by far the best.
It doesn't actually take 28 days, as Sigma said:
Don't be under the impression that you have a schedule to follow. If you can go through eight lessons in two hours, go ahead. If you feel you have to spend a few days repeatedly going over one section to understand it totally, no problem. Calling each lesson a "day" is merely this guide's "gimmick": I thought it would be more flavorful than just going "Lesson 6…Lesson 7…Lesson 8…"
It took me about 2 days to go through it, but I wasn't completely thorough. Right now I'm letting everything soak into my brain, then tomorrow (and the next few days) I'll go back and reread things I didn't spend too much time on or was confused on. For me at least that's the best way to learn a new language.
[edit]By actively programmed I'm assuming you mean it's not just a stepping-stone for the higher-level languages. I know there are some since just a couple weeks ago I overheard some professors talking about how they had students struggling working with an assembler language, but I don't know any specific applications. Even if there aren't any direct uses of an assembly language, just knowing how computers operate at the basic hardware level will give you a huge advantage in understanding any other programming language.
[another edit]
I think the last time I gave up after too much fiddling with the compiler, couldn't get it too work.
Have you tried tasm? Also in Asm28Days are step-by-step instructions for installing it (well, more like click-by-click)
After looking over the source for custom pics (from the other thread), I figured out how the pics are stored. Basically, he cheated. He's not storing the data as a list variable, but in one. Try and edit the list and you'll see some ugly stuff.
To explain why it's "cheating" you'll need to know (1) how floating-point numbers are stored, and (2) how list data is stored.
(1) Floating-point (FP) numbers are 9 bytes in length (well, 11, but the last two aren't saved). The first byte determines whether it's real/complex, positive/negative. The second is the exponent, offset from $80 (i.e. if you have the number 28 =2.8×10^1, the exponent byte would be $80+1=$81). The next 7 contain the actual number. Each has two decimal digits, for a total of 14 digits. For example, π=3.1415926535897 so in FP it's $00 (sign), $80 (exp=0), $31, $41, $59, $26, $53, $58, $97.
(2) The first two bytes of a list contain the length. After that are FP numbers placed one after the other (that's why a list entry is 9 bytes).
Now, if you have an n-element list, then after the length bytes are nx9 bytes for the data. As I said in my earlier post, the screen is 96x64 pixels wide, but (to correct my earlier statement) the bottom row of pixels isn't usable so it's really 96x63 pixels to be saved, which means it takes 12x63 bytes to save it. What luck! 63 is a multiple of 9, so you can use 12×63/9=84 FP-numbers-worth of data to store the whole picture. This data has absolutely no meaning* if you try and recall it as a list, but is fits nicely inside the memory allocated for the list.
- e.g. The number $FF, $FF, $11, $11, $22, $22, $33, $33, $AA can't be a FP# since $FF has no meaning as a sign flag, the other $FF would mean the exponent is 127, and $AA is not made of decimal digits.
Yeah it does fit nicely in a little block disguised as a list, I noticed a few things when experimenting. I was trying to see if I could recall the list as a string in a program then store it back as a list. First thing I tried(and idk why) was to add an element to the list, element 82, the OS didnt like that decision at all, froze and cleared RAM when restarted. Second thing is when I tried to recall then restore them the OS wouldnt handle numbers so large, even though their readable the extremely large FP numbers cant be stored from the TiOS. Also the Ti data editor from TI-Connect wouldn't open them, or at least the one I tried.
Anyone with experience in batch? I get this error,
'C:\Users\—-\Desktop\Assembly\Tasm\devpac8x' is not recognized as a command.
I see that it thinks its a command, a fix would be to navigate to that directory then execute it but currently the directory is set to something else…
Have you tried putting the Asm folder directly in the C:\ directory?
Asm programs made with the ti83.inc file work fine on Wabbit with my 84+SE ROM, so I don't think that should be a problem.
Ok got that problem worked out, new one, devpac info displays in the command window, then im given the file not found error. Looking at the batch file it occurs with devpac, no 8xp file is outputted.
edit:
Didnt want to put it on the C drive, placed in folder on desktop.
Well, I looked at custom pics and asked the creator how they worked. He sent me an e-mail. This is what he said:
The idea of custompics was to cram the 62*94=5828 pixel-bits into 5828/8=729
calc-bytes.
These bytes are crammed into a list of length 729/9=81 . (Each list element can
store 9 bytes of binary data)
the list elements are filled in an illegal way, the binary data just happens to
be interpreted as floating point numbers.
To express 9 bytes using decimal tokens, you need log(256^9)=22 bytes. The 81
comma-symbols are wasted as well.
Neat
is he mistaken? the calculator screen is 64x96 pixels. Or 63x95 disregarding the unusable lower row and far right column.
is he mistaken? the calculator screen is 64x96 pixels. Or 63x95 disregarding the unusable lower row and far right column.
Yeah, he is mistaken. The pixels usable by BASIC commands are 0-94 and 0-62, which is actually 95x63 pixels. A lot of people forget that pixel 0 is the first pixel.