### Author Topic: BatLib  (Read 86478 times)

0 Members and 1 Guest are viewing this topic.

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### BatLib
« on: November 19, 2010, 01:06:33 pm »

Latest Update: 29 September 2012 http://ourl.ca/7980/318164

I have made mention of this project before, but it was kind of dead at the time. On top of that, I was working on my other project, BASIC ReCode. For the past day or two, I have been working on SpriteLib and yesterday, I had a small breakthrough. I am still working on both projects, but they are going to take turns in my attention. So here is a bit of the background of why I decided to finally make a topic...

I went to bed this morning a little after 2:00 AM. I woke up at 7:30 ish, wondering if I should get up. For about 20 minutes, my sleepy brain made the logical connection that since all I did yesterday was program, it must have been Saturday and so today was Sunday. I fell back asleep deciding I would sleep in and program a little later. An hour later, I jumped out of bed very suddenly, surprising my brain and body. While I tried figuring out what my body was doing, my brain was screaming "CRAAAAAP! IT'S FRIDAY! I HAVE CLASS!" So naturally, I got in the shower, thinking about SpriteLib. Half asleep, my brain started screaming "YOU FORGOT THE 23! THAT WAS THE PROBLEM! READ YOUR OWN NOTES!" So I ran back to my room, got on my computer to see what I was talking about. Sure enough, in the APP that I have been trying to find the error in for four months was missing one byte: a 23 (also known as "inc hl"). After I added the byte (and fixed another call effected by this change), I sent it to my calculator and sure enough, it worked.

So now I get to go through my code, fix any other things modified by this change, and then SpriteLib will be in APP form, using a parser hook with "int(" and no longer relying on Str1 and Str2 for some commands YAYYYYYYY Once I get a few commands finished, I will upload the APP.

EDIT: I am skipping my last class to work on this right now
« Last Edit: September 29, 2012, 03:16:17 pm by Xeda112358 »

• Guest
##### Re: SpriteLib
« Reply #1 on: November 19, 2010, 01:18:32 pm »
don't skip yur clazzes to ulpoad tis soo caled sprritlibbb!  Though this does sound pretty cool.  Is this a sprite thing like xLib for BASIC?

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: SpriteLib
« Reply #2 on: November 19, 2010, 01:29:01 pm »
Ah, well I have only missed one day this semester and nothing is happening in class, so I figured I was safe. SpriteLib currently is just a program I started many months ago and it was originally designed around its font editing features. Eventually it evolved to handle sprites, tilemaps, font editing (of the hex chars), editing variables and a few other random things. This was all done as an assembly program, but now I am translating it into an app. The program made use of a list, sometimes Str1, and occasionally Str2 for input, but now it can just use int( for all of that . I am going to test how well I converted the first 6 commands right now...

• Guest
##### Re: SpriteLib
« Reply #3 on: November 19, 2010, 01:30:15 pm »
wow, a app written in hex!  I am impressed!  Great job!  And yes this sounds cool, can't wait to see it!

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: SpriteLib
« Reply #4 on: November 19, 2010, 01:34:19 pm »
yeah, I have to transfer the hex to my computer, use a spreadsheet I made to convert it all to .db statements and then I run that through TASM32. Then I open up .obj file, copy all of the data, open up a .hex file that has a header that I made a few months ago, replace some of the data, then use Wappsign. It am going to find a better way...
« Last Edit: November 19, 2010, 01:34:59 pm by Xeda112358 »

• Guest
##### Re: SpriteLib
« Reply #5 on: November 19, 2010, 01:35:41 pm »
I see, nice to see it's hex even on the comp

I was wondering what you did to sign, now I get what you did.  the only thing I hate about hex coding is that you have to carry around a packet of commands.  Though it does make you feel more in control sometimes

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: SpriteLib
« Reply #6 on: November 19, 2010, 01:37:00 pm »
Who carries around a packet of commands? I memorize them. If I do not know a B_Call and I really need it, I just make it. Of course, if I am on my computer, I can just look it up, but that is boring...

• Guest
##### Re: SpriteLib
« Reply #7 on: November 19, 2010, 01:38:03 pm »
you memorize?  I memorized like 5 commands.  Do you remember then by full command or by a few bits with a varying bit field?

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: SpriteLib
« Reply #8 on: November 19, 2010, 01:39:04 pm »
Full command, but I have been using them for about a year now, so it is pretty easy at this point.

• Guest
##### Re: SpriteLib
« Reply #9 on: November 19, 2010, 01:41:01 pm »
I see.  The only way I memorized any was by trying to do the latter.  Nice job though.

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: SpriteLib
« Reply #10 on: November 19, 2010, 01:42:49 pm »
By the way, something didn't work with the app... it doesn't crash, but it just outputs the last value passed through it. I have a program on my calculator that opens the app and uses the calls so I can do some debugging. In the program, the functions work, so I must have messed up a byte somewhere in the code for the app.

• Guest
##### Re: SpriteLib
« Reply #11 on: November 19, 2010, 01:47:37 pm »
can you disassemble it and give me the mnenomics? I can look at it if you want.

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: SpriteLib
« Reply #12 on: November 19, 2010, 01:51:25 pm »
Ahh, it is 1204 bytes of code and I do not have a disassembler... Here is the hex:

Code: [Select]
DB06218B40EF2650EF274083B7C8E521B1B1ED42E12802AFC97D3D28FA22A484E5DFE1EF9F43ED73A8842A24982322A684CDB8433C47100532E29906001005EF70450600101421154301350011E299D5EDB0E1DB06EFE44F0600101ACDB843E60F8783878316005F21729919E5CD7143E1EBEDB006001027CDB843E60F8783878316005F21729919E5CDB843E60F8783878306004FC5CD4A43C1E1EDB006001012CD7143CB38CB1921EC86E5CD9D4336C906001026CDB843F5CDB843D5CD7143217884EBEDB0AF12EFF142DA81421313E119F1467778EF8C47060010083A3F84EF8C470600100AAFD301DB013C28F90600FE01C9E5297E292929E11B7AB320F40B78B120F6C909F52BF1CB16F50B78B120F6F1C909EB09AFF5F12B1B1A8E77F50B78B120F4F1EBC909EB09AFF5F12B1B1A9E77F50B78B120F4F1EBC9E5C51A13EDA1200B78B120F6EBC1D1ED4237C9C1E17AB320E7C91A13EDA1200578B120F6BFC9117884D511AA84D5CD1042EBED67EBCD1042EBED67EB1B7CB520EDE1ED52444DE1772379873DC6807723EBEDB0C9AF06102917FE0A3803D60A2C10F5C91A007713230B78B120F6C9C522AA843E3FBECC744223060004237EFE3F2804FE2B20F5E52BEB21000022B284231AE60F1BE5D5C5CDAA43C1ED5BB2841922B284D1E13E0AD5C5CDAA43C1D110E0ED5BB2847BE1C1C92A5D963E3F23BB20FC23225D96ED7BA884C983472142847EFE3238033E3277FE0A20033E0A7778C922AA8421409322B284060CC50608C51AD56F2600292929ED4BAA8409EB2AB284CDD24222B284D113C110E32525252C22B284C110D6C9010C081A007713780600094710F5C90E007EFE2920023E20FEBB200A23057ED64FFE6D38013D2312130C10E5C9773E0C904F7EC5F51A0077132310F909F1C13D20F1C983FE012803AF3DC978FE3A3802D607D630FE1030F04F3A5396B728E979C58781878116005F216B991978010700115A84EDB0C1AFC9C5EF524BD7EFC94FE1EF27431313C93E30ED67FE3A3802C607121BC91AFE3A3802D60713ED6FC92AA6842BEF7A412322A6842AA4842B22A484EFF142DA8142EB4E234623EBC9CD5943CD59432B0B78B120F4C9CD6643CD6643230B78B120F4C90608110000EB290730011910F9C9ED4BA48478B128110BED43A4842AA684CDE44322A684C9D5E5CDAA43ED5BAA841922AA84E13E0ACDAA43D1C97EE5E60FCB3FF53C4F060009EB21000022AA8423F130061AE60FCDCF431AE6F007070707CDCF431B0D79B720EAE111090019ED5BAA847BC96F2600EF9247EF5641F601C932B28478B7200A79B728103D200322AA843AB28423BE20FC0B18E8EB2AAA84EBED52444DC97EFE61380CEB36BB23EBC64FFEBB38013CFE2E20023E3AFE2020023E29FE3F20013D1213230B78B120D6E1EBED52E5C1C9CD7143EB41117984CDE142AF12CDB843327884EFF142DC8142EB4E234623C9CDB843E603878787C6A632D642320843C9CDB843D5CDB843EB2929545D2919D119C9E5C5D5217984010000AF0C23BE20FBC5EFF142DC814278C1210C0009EBB720021E0219D119C1D1EF5480C9E5292929E13E2084D310E5292929E13E8085D310C5E5E5292929E11A13D31110F5E1C10D2479B720D7C9C5E521EC86E5EB79F5E5C57E1213780600094710F6C1E1F1233D20ECD1E1C1C9
However, the calls are where you might run into difficulty. If you have any questions, I kep a document with all the info on the calls. Just give me the address and I can tell you the call and the info about it. Unless you have openoffice...? (so i can give you the spreadsheet)

#### AngelFish

• Is this my custom title?
• LV12 Extreme Poster (Next: 5000)
• Posts: 3242
• Rating: +270/-27
• I'm a Fishbot
##### Re: SpriteLib
« Reply #13 on: November 19, 2010, 02:14:12 pm »
There is a way to disassemble the binary with SPASM, but I'm not sure how to do it.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4654
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: SpriteLib
« Reply #14 on: November 19, 2010, 02:32:38 pm »
Okay, I found the problem when I was comparing the version that does work (but has only 3 functions I made up real quick) with the new version. I just copied the wrong hex data into the App But all is good,  now, I think.

Does anybody have a non-manual way of either converting my hex to a .obj file or for splitting up a large body of text so that each line has 32 characters? I would prefer the former method, if possible, but either method would be very much appreciated.