Greyscale Testing Program

A General Discussion forum for TI calculators

Moderator: MaxCoderz Staff

User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Greyscale Testing Program

Post by thegamefreak0134 »

I am looking for a good program I can use to take 96x64 bitmaps on my computer and output a program I can run on my calc to view the picture. I only need to be able to see 4-level greyscale. Note that I already have image studio, I just need to be able to view pictures on the calc with little or no flicker if possible. Thanks!

-gamefreak
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

:o Wow. Um, I don't really have words for this tool. This is the only engine I've ever seen do greyscale that... well... flawlessly on an 84+. Not to mention that it can be fine-tuned at runtime so it works on every model. This is a great tool. thanks!

Um, the tool comes with the source for the project, and permision to use the engine in my own project. However, I'm kinda a noob ot this, so could someone explain nicely how I would go about doing this? I understand how to copy and paste, don't get me wrong. I just don't understand how the engine itself works or how I would have to structure my code around it to get it to work. Any help would be greatly appreciated here. Once I get this done, I can begin work on converting the sprites and starting the battle engine. yay!

-gamefreak
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

I think we need a new special title for our next election; most promising noob ;)

Keep up the good work, gamefreak :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

thegamefreak0134 wrote:Um, the tool comes with the source for the project, and permision to use the engine in my own project.
I haven't looked at RigView's source, but I assume that it is intended solely for displaying greyscale images, so it just has a loop that displays the image. If you wanted to use it in a game, you'd have to spend some time processing elsewhere, and so the closely-timed greyscale wouldn't be so "closely-timed" anymore.
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

Well, in the source it says some stuff concerning using different methods of his routine so you can display sprites and such with it. I simply assumed that his program was creating (rather, decompressing) inages for his routine to view. I dunno. I'm gonna send him an e-mail for the moment.
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

I would be more inclined to use one of the grayscale packages (GPP or RGP) if you intend on making a grayscale game with sprites and such.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

OK. Do either of them let me fine tune? Which of them is easiest to use? Most importantly, do they run in the background? I really need to be able to set and forget them, as I do not have the skill required to time calls to a greyscale render loop every so-often...

I need something I can enable that will run as long as I need it to. I need to be able to run my code at the same time, so it should be interrupt based. I also need to be able to easily access the GS screen with sprite routines and such, and will need to know how to format my sprites to display properly in the routine. Can either of these projects do these things?
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
currahee
Calc Wizard
Posts: 659
Joined: Mon 20 Dec, 2004 4:00 am
Location: My Computer/Someone else's computer
Contact:

Post by currahee »

Tr1p has used Duck's grayscale package (if I can recall correctly) for Desolate. It's really good in terms of running the game in real time. Should be perfect for pokemon.
"Not long ago, the Black Gate of Armonk swung open. The lights went out, my skin crawled, and dogs began to howl. I asked my neighbor what it was and he said, 'Those are the nazgul. Once they were human, now they are IBM's lawyers.'"
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

RGP is said to be flawless. You should check www.revsoft.org.
Image
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

But don't these grayscale packages use self-modifying code? Apps don't support that.
In Memory of the Maxcoderz Trophy Image
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

And since I have to use an APP for my project, this poses a serious concern. I hear tell that it's possible to copy the routines to saferam and run them from there, but I don't know how to do that.

-thegamefreak0134
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

thegamefreak0134 wrote:I hear tell that it's possible to copy the routines to saferam and run them from there, but I don't know how to do that.
Pretty much just this:

Code: Select all

; snip

    ld hl,routines
    ld bc,end_routines - routines
    ld de,saferam
    ldir

; snip

routines
.include "my_routines.inc"
end_routines
The problem is, of course, that all the labels are going to be completely wrong for any absolute jumps or calls. For this, you would have to create a label called "offset" (or similar) that contains the offset between the location of the code inside your program and the saferam location you were going to copy them to, then to add this to your jumps/calls. It's inelegant, I know :(

This is a fairly common-ish thing to do, so if anyone can think of a slick way for an assembler to handle this case, I'm all ears!
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

ldir is unfamiliar to me. Do i guess correctly that it copies all of the stuff from hl to bc to the memory location at de?

Based on the routines I will be copying, this shoudn't be to hard to get done. However, I am completely oblivious to interrupts of any kind, so if they need to have those addresses set i'm screwed...
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

thegamefreak0134 wrote:ldir is unfamiliar to me. Do i guess correctly that it copies all of the stuff from hl to bc to the memory location at de?
Oh, ldir is a vey useful instruction. It copies 'bc' number of bytes from the location pointed to by 'hl' to the location pointed to be 'de'. A common use would be copying a title screen to the graph buffer:

Code: Select all

; Snip
    ld hl,picture ; Picture data
    ld de,plotSScreen ; Graph buffer
    ld bc,768 ; 768 is (96*64)/8 bytes
    ldir
    call ionFastCopy ; Display it.
; Snip

picture
; 768 bytes of picture data
Interrupts need to jump to a particular location. I don't know how these gs packages deal with this, though.
Post Reply