[TI ASM] Splash Screen In Greyscale

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Have you looked at the code of Jims package or Ducks?
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Post by L4E_WakaMol-King »

No. I'm not sure where to get them... but even if I did, I have a feeling it would be a bit over my head. I'm *hoping* there is some kind of simple solution to remove the flicker... though I could be in for a nasty suprize.
Image - Now Under Development - [Progress]
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Are you using interrupts?
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Post by L4E_WakaMol-King »

No, but if I can avoid using them, I would like to. I plan to add music behind this, and I think I need the interrupts for that. I don't know if I can use interrupts for both music and greyscale :?.
Image - Now Under Development - [Progress]
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

I think it is possible, but maybe not done yet?
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

L4E_WakaMol-King wrote:No, but if I can avoid using them, I would like to. I plan to add music behind this, and I think I need the interrupts for that. I don't know if I can use interrupts for both music and greyscale :?.
how many interrupts are on the 8x+ series calcs?
Image Image Image
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Post by L4E_WakaMol-King »

Good question. There's only one useful one that I know of. But I'm not a very experienced ASM programmer, so I am not the one to ask.
Image - Now Under Development - [Progress]
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

On the bare minimum 83+, you can have 3. With all the spiffy timers on the SE and the 84+s you can have lots.
Image
Spencer
Extreme Poster
Posts: 346
Joined: Mon 17 Jan, 2005 8:56 am
Location: Indiana

Post by Spencer »

There's only one useful maskable interrupt on the hardware/software setup we're using. Normally with Z80 the interrupting device puts a byte that refers to its service routine on the data bus, but for us, that byte is random (that is, there's no distinction between what generated the interrupt). So we fill all slots for service routines with references to our interrupt code.

You will not have enough time for sound and grayscale.

_grbufcpy is TI-OS's safe routine to copy plots to the LCD. The minimum delay and the nature of the LCD driver prevents simple page flipping from looking good on the 83 series. The most commonly used method of grayscale is merging the two video buffers in the correct proportion and sending them to the LCD together every display frame, rather than the 2-1-2-1 with page flipping.
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Post by L4E_WakaMol-King »

Ehh, that sounds a bit complicated. Could you show me what you mean in code? For what it's worth, I'm using ION, and can use IonFastCopy if that will help at all.

Here's what I've got so far:

Code: Select all

lp_greyscale_loop:

   ld hl,Splash1
   call disp_pic
   ld hl,Splash2
   call disp_pic
   ld hl,Splash2
   call disp_pic

   bcall(_getcsc)
   cp $38
   jr nz, lp_greyscale_loop

   bcall(_getkey)
   ret

disp_pic:
   ld de,PLOTSSCREEN
   ld bc,768
   ldir
   bcall(_GrBufCpy)
   ret
Image - Now Under Development - [Progress]
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Yes, ionFastCopy will probably already improve the quality. What Spencer meant is that you can mix the layers on the fly in an intelligent way to reduce the flicker and create some noise in the image instead. It usually looks better, but it's quite a bit more complicated to write. But if I were you I'd do it the other way around. Just use Jim or Duck's greyscale package, use that to show the splash screen with the interrupt, and have the main program produce some music.
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
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

How would that work? Timing is critical to produce the proper sounds, and a greyscale interrupt ruins it completely, in a nondeterministic way.
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

Yeah you cant do one with out the other suffering.

But for gray really timing is key, not speed. what you want is to use a delay after each lcd update. If you are using ionfastcopy you probably want a delaying routine in the nieborhood of 50,000 tstates. You'd have to play with that number but its possible to get it looking good without interlacing.
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

CoBB wrote:a greyscale interrupt ruins it completely, in a nondeterministic way.
Ah, yes, I see your point. I figured a little slowdown wouldn't matter, you'd just increase the frequency a bit to counter that, but that's really stupid reasoning... I'm curious what sound greyscale would make though :) Perhaps you don't even notice it. But it'll probably just sound like noise...
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
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

Jim e wrote:But for gray really timing is key, not speed. what you want is to use a delay after each lcd update. If you are using ionfastcopy you probably want a delaying routine in the nieborhood of 50,000 tstates. You'd have to play with that number but its possible to get it looking good without interlacing.
The problem is that you inevitably have to stop all sound processing while the screen is refreshed, which is quite a nasty square wave modulation... Okay, you can theoretically use the wasted cycles as well, but are they still only accessible at a frequency that doesn't play nice with various tones.
Post Reply