Author Topic: IViewer  (Read 12407 times)

0 Members and 1 Guest are viewing this topic.

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
IViewer
« on: July 25, 2013, 09:20:44 pm »
I've been updating IViewer recently. v1.1 is out now after I received a bug report by a user named Sean. v1.1 also removes the ram limitation, you can run the app even if you have 0 bytes of ram available. The next version will include an Easy Converter that will allow someone to just load an image and create an appvar without having to format the image or change any settings. The image will use a default 256 color palette based off the mac os palette. Then there will be the Developer Converter that will allow all settings to be manually adjusted. This can be used for viewing sprites/backgrounds/titles and can create an assembly file to be added straight into the program. I also plan to add huffman compression and I was thinking about including an IViewer assembly program that can be called by BASIC and other assembly programs to display title screens and images for them. I don't know if it would be fast enough to be used for sprites, but I'll create some speed test videos to help judge that. The N,X, and Y variables will be used to determine image and location. Does anyone have some requests or suggestions?

*Thanks to tr1p1ea, the Easy converter will now use his convention removing the need to even have a palette at all. His palette is better than both Windows and the Mac OS. Congratulations! tr1p1ea beats Bill Gates and Steve Jobs and his name will appear in the app somewhere (probably replacing my blog address)!
« Last Edit: July 25, 2013, 10:54:26 pm by AssemblyBandit »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IViewer
« Reply #1 on: July 25, 2013, 10:27:34 pm »
Good to see new updates. 256 colors seems pretty nice since it's much smaller. I also like the ASM program that can be called by BASIC, but speed-wise it would only run fast if it worked via a parser hook rather than the Asm() command, since the Asm() command search the program through the VAT before executing it, meaning that it's really slow when you are low on RAM. However for simple image display I guess this would be fine. People would just not be able to create pre-rendered rail shooter games and such stuff :P

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: IViewer
« Reply #2 on: July 25, 2013, 11:11:36 pm »
Well it is an APP so perhaps openlib/execlib can be used?

As for the colour idea it actually belongs to a few people, it was one of those ideas that was being thrown around in early 84C discussions. So credit to me just wouldnt be right :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: IViewer
« Reply #3 on: July 25, 2013, 11:14:42 pm »
DJ:Thanks for the info! I know nothing about a (the?) parser hook but I'll definitely look into it. It was only yesterday that I learned I couldn't call an app in a BASIC program (at least I don't think I can). I've used hooks on the 86 before, though I never bothered on the 84.

tr1p1ea: You were the one to inform me of it, what other 'ideas' have I missed? (I got on the 84c thing a few months late :()
« Last Edit: July 25, 2013, 11:18:11 pm by AssemblyBandit »

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: IViewer
« Reply #4 on: July 25, 2013, 11:18:16 pm »
The parser hook is what lots of ASM libs use on the 83+ etc since you can intercept certain tokens and do with as you wish.

The only problem is that it can be difficult for hooks to coexist.

On the 84+ and on there is OpenLib and ExecLib which can be used to call library routines in an APP from a BASIC program: http://tibasicdev.wikidot.com/execlib
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IViewer
« Reply #5 on: July 25, 2013, 11:23:45 pm »
@Tr1p1ea Oh I guess Openlib could be used as well. Of course that's assuming it's fast enough to call, though.

@AssemblyBandit there were a few 84+CSE topics made when the calc was about to come out or had come out to discuss discoveries and ASM discussion. One was mainly about the 160x240 mode and ideas of its use and the other was just to ensure that most info is gathered together on WikiTI and that people won't start making plenty of ASM libs and routines that conflicts with each others like on older models.

160x240 discovery http://ourl.ca/18523
160x240 video http://ourl.ca/18606
84C consortium http://ourl.ca/18366
General resources (links) http://ourl.ca/18682

There is also other discussion on Cemetech.
« Last Edit: July 25, 2013, 11:25:52 pm by DJ Omnimaga »

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: IViewer
« Reply #6 on: July 25, 2013, 11:24:03 pm »
tr1p1ea: that sounds like the route to take, can assembly programs call library routines as well?

DJ Omnimaga: Thanks for the links, I had found the 160x240 mode post and I had also read about 'z addressing' but I could never find the root of it and I didn't know what people were talking about. I never seen it in the data sheet, I'm guessing its something for BASIC?

*Sorry* I'm not replying fast enough and I had to change things around a little. :(
« Last Edit: July 25, 2013, 11:29:34 pm by AssemblyBandit »

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: IViewer
« Reply #7 on: July 25, 2013, 11:24:15 pm »
As far as I know, the only documentation on how apps provide support for the ExecLib is in the USB8X source. BrandonW may or may not be able to shed some light on the issue. It may prove more informative to disassemble the relevant code in the OS yourself. (And don't forget to document your findings on the Wiki!)
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: IViewer
« Reply #8 on: July 25, 2013, 11:28:32 pm »
Yes ASM programs can call library routines quite easily. I have example code at home somewhere, ill see if i can find it.
« Last Edit: July 25, 2013, 11:29:09 pm by tr1p1ea »
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: IViewer
« Reply #9 on: July 25, 2013, 11:35:46 pm »
DrDnar: Will do! I also received my oscope today, so I still want to go over the hardware stuff too. I noticed the HW2 int to be acting a little crazy at times and I want to get to the bottom of it. I will probably be video recording everything then transcribing because I tend to forget alot by the time I write it down.
« Last Edit: July 25, 2013, 11:36:27 pm by AssemblyBandit »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: IViewer
« Reply #10 on: July 26, 2013, 04:27:45 am »
Oh, you finally made a topic about this? :D
Now I can tell you how awesome it is: It is awesome :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: IViewer
« Reply #11 on: July 29, 2013, 02:57:02 am »
Thanks Sorunome! I have finished the Easy and Developer versions of the Image Converter and have implemented huffman compression, selectable image depth, h=l mode, high color mode, and background color selection. Now I just have to update the app, do some bug testing, then I'll make a video. Maybe I'll be finished sometime today or tomorrow.

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: IViewer
« Reply #12 on: August 02, 2013, 02:29:27 am »
Some new equates for the library hook on the ti84+c:
$4f48 = enable lib hook
$4f51 = disable lib hook
$9e61 = hook address

I'll add it to WikiTI soon.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IViewer
« Reply #13 on: August 04, 2013, 01:31:40 am »
tr1p1ea: that sounds like the route to take, can assembly programs call library routines as well?

DJ Omnimaga: Thanks for the links, I had found the 160x240 mode post and I had also read about 'z addressing' but I could never find the root of it and I didn't know what people were talking about. I never seen it in the data sheet, I'm guessing its something for BASIC?

*Sorry* I'm not replying fast enough and I had to change things around a little. :(
Z-address can be used in ASM too, but few people ever used it because it doesn't work in most emulators IIRC. In BASIC, people used it to create earthquake effects in 84+ games, but also can be used for scrolling. The difference on the older 84+ is that it wrapped the screen around vertically instead of horizontally.

Also if I recally correctly, tr1p1ea wanted to add a picture function in xLIB, but since it's dedicated for game use, he wanted people to save as much space as possible, so pics are 80x60 (scaled up).

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: IViewer
« Reply #14 on: August 04, 2013, 04:59:55 am »
I have removed the huffman compression (a few days ago), I didn't realize that Jimmy Mardell's compressor is 64k max. Compressing an image in parts barely compresses better than RLE so I just took it out for the time being. Pucrunch has the best compression ratio but its compressor is also limited to 64k. I will come up with a better solution later. I was wondering, is xLib an actual library or does it use the parser hook? (in other words, did tr1p1ea already have the equates I found?) DJ, I'm almost finished with the latest version of IViewer. I've been adding library functions so that it can display images from TIBASIC and asm programs. I suck at BASIC programming, so I def need some feedback on it. I haven't finished it completely yet (about half way done) but here's a list of the functions I'm implementing or already have:
 :w00t:
Initialize(version)
DrawImage(x,y,image name)
DrawSprite(x,y,image name)
FillScreen(red,green,blue,screen)
CopyBackground(x,y,width,height,id)
PasteBackground(id)
WriteText(x,y,text)
HideScreen()
ShowScreen()
LowRes()
HighRes()
LowColor()
FullColor()
InvertScreen()
SwitchScreen()
OSDefaultScreen()
GetVersion()

I can't wait till I test it out, I pray it will be fast enough  XD I will release it today no matter how far I get, maybe it will be finished so I can make a video demonstrating what its capable of.