Using Greyscale for APPs

Moderator: Duck

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 »

thegamefreak0134 wrote:
Jim e wrote:
So in other words, You should try making it app friendly on your own, if you can do that then you are going to be more likely to finish that project.

Sorry.
Gee, thanks. As if my main statement of "I can't do this" wasn't enough. Lol.

I'll give it a shot, but don't expect too much from me. Looks like I may be making the game regular old mono after all...

-gamefreak
That's kinda the point though, if you can't make this mod on your own then the chances are the game would have never come to fruition. It's like wanting to drive a car but asking some one else to start it because you didn't know how.

But when it comes to grey scale, tr1p is exactly right, it should have no major impact on the engine. To further extend the car analogy(click for car-asm comparison! ) you can make the engine, you can put the wheels on and you can even get it running without ever having a decent coat of paint.

If you want to make a game, start off simple, Everyone does. If you need help with the engine you can post here, revsoft or uti, all of those places have decent coders to support learners.
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

thegamefreak0134 wrote:Will this method work in TASM, or do I have to use BRASS?
That would be Brass syntax, though I'm sure other assemblers will support something similar.
It also depends on whether the library can be split up to fit into the various safeRam areas - if you need to allocate the memory yourself to fit them in, you're a bit stuffed and have to recalculate the addresses at runtime.
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

That's kinda the point though, if you can't make this mod on your own then the chances are the game would have never come to fruition. It's like wanting to drive a car but asking some one else to start it because you didn't know how.
XD well, in my case it was shutting it off.

still Jim e, at least tell where we can get the latest version.
Image 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 »

Two questions. (prolly simple too.)

I got the thing running in a normal program (although convincing the compiler to compile normal stuff with no knowledge of how to do so and no documantation was an advanture, let me tell you) and I definately like it. It's grey is much smoother than the other, and I find that I am able to do a bunch with it quite easily.

(1) How do I get the garbage appearing at the program close to go away? (There is a "ghost" of the greyscale image left on the homescreen for some odd reason)

(2) If I modify the greyscale interrupt routine to, say, work a timer for me, rather than writing one myself, will it cause the greyscale to go out of sync? Or does the timer the interrupt uses keep on going even while the routine is running? I figure since the greyscale interrupts my program on its own I wouldn't have to time every little thing on my own to get a timer going accurately. It's a puzzle game, so a tiny bit of slowness won't affect it too much at all, especially since the timer freezes during any animations.

Thanks a bunch. Oh, I do have one extra question. I find the masked sprite thing rather confusing. Are there other forms of it or can you explain to me how it is used? The version of the package I have only has one form. What I really need to know is where the mask for the sprite needs to be stored. Thanks!

-thegamefreak
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 »

You could try clearing the grayscale buffers just before you exit?

Also, why would you need specific timing for a puzzle game ... is it for a countdown clock or something?
"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 »

I tried clearing the buffers to no avail. Also, for some wierd reason when I try to clear the screen (after disabling the greyscale) normally, it gives me an "ERROR:INVALID" whed the program quits. Or do I have to be viewing the graph screen for that to work? I didn't think so...

Yes, it is for a countdown timer. The timed version of the game has an "evil bar of doom" that counts down while you idle. This timer will actually need to have different speeds based on the level, but I can handle that. If you get stuff (combos and chains) the timer increases, but if you don't and it hits the bottom it's game over for you. The level advances when you cause the timer to "overflow".

Simple enough game wise, I just need to know if adding it to the greyscale routine will screw everything up. Course, I could simply try and see myself... But I still do need the whole clearing the screen thing. It doesn't hurt the program itself, just the homescreen after it, and it's annoying.

-gamefreak

PS: Do you suppose after I clear the buffers I should put in a delay to be sure the buffers are actually copied again?
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
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, I feel really stupid now. I was trying to do a "call' for the bios clear, not a "bcall". Duh. Still need the others though. Also, do you have more detailed instructions for the masked sprite routine? I think I will need it very soon.

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

DarkNova - a little side project I run.
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

Do we have a location for the latest version of this grayscale routine?
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 »

For RGP, I got off my lazy ass a few days.
Okay I made changes and this runs in an app.
http://www.revsoft.org/graylib.inc

I HAVE NOT TESTED THIS VERY WELL!! It works in pindur, but I haven't even checked if it works on an 84.

All you need to do is define the varibles at the end of Graylibapp.inc some where in ram. Everthing else thats included will work. I have removed some of the sprite routines, Im not willing at the moment to make them app friendly.


Remember I am using Saferam1(Savesscreen) and Saferam2(statvars).
Its not better its just app friendly.
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Wow, so much work man! I hope many can find it useful!
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 »

I think it's designed to work with the lcd routine located in ram, as that routine still has a lot of self-mod. I got off my own lazy ass and took that (the self-mod) out, and the routines work just like normal. You have to define the buffer variables in RAM as well, or simply use NODOUBLEBUFFER. Personaly I will be using my own sprite routines for my games, so just getting the routine going makes me very happy. Thanks Jim!

-gamefreak

PS: No reports on how it works with multi-page apps. I'll cross that bridge when it crumbles below my feet.
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
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 »

DAMIT, I SENT YOU THE WRONG ONE. Heres the real app one.

http://www.revsoft.org/graylibapp.inc

well great, you edited the original. :roll: :lol:


Son of a bitch stupid links and there similar names.
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 »

So I did do it myself. Gee, now I feel really stupid. Well, at least I know how to swim through self-mod code. Do you know how many headaches that mod took? :x

I am going to go ahead and get the right package now, and see if stuff is happy. After all, you said it had the APP page checks and such, and that will be nice. Thanks a bunch!

-gamefreak

PS: I feel so smart now!

-edit: Ahh, OK now the new version makes sense. Thanks! It looks so much more manegable now. I'll go ahead and keep the routines on page0 to make things simple.
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 »

Hey Jim e, i got it down to 62 clocks between writes. Using a couple of little tricks like simplifying the interlacing and taking advantage of the buffer layout. It was only a quick hack to see if everything would work so perhaps with some time it could be taken down even further!

I really have to run, ill post the routine when i get home!
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
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 »

62?, You may have out classed me. I can think of a way to get it down to 64.

Code: Select all

	ld a,(hl)
	and d
	ld c,a
	inc h
	inc h
	inc h
	ld a,(hl)
	and e
	or c
	out ($11),a
	add hl,sp
Problem with this is that the mask would be lined up doing colomns making noise more noticable. If i draw to the screen left to right on the other hand.

Code: Select all

	ld a,(hl)
	and d
	ld c,a
	add hl,sp
	ld a,(hl)
	and e
	or c
	out ($11),a
	inc hl
that would be 58 clocks. The masks could be rotated, but the way the lcd works this would have a god awful line cutting through the screen, not to mention the row resetting overhead would kill the speed benefits.


hmmm...can't think of much else.
Image
Post Reply