Page 4 of 6

Posted: Thu 23 Mar, 2006 7:59 pm
by thegamefreak0134
OK, I knew this would prolly happen. This is my code...

Code: Select all

#DEFINE APPNAME "PokeTest"
#DEFINE APPPAGES 1
#define TI83P


#include "dwedit.inc"
#include "graylib.inc"


#IFNDEF APP
tTitle:
#ifndef ZES
  .db     "GreyTest",0
#endif
#ENDIF



StartApp:
	call gsEnable			
	call gsGetK
	call gsGetCSC
	call gsDisable



ProgramEnd:
	bjump(_JForceCmdNoChar)

	ret
	



.end
It compiles fine, but when run it just puts the cursor on the APP menu. It seems as though gsEnable is not working. help....

-thegamefreak0134

*EDIT* I should note that I'm running it under the TI flash debugger. Although the greyscale looks messed up on it, it still generally runs programs fine.

Posted: Thu 23 Mar, 2006 8:38 pm
by Jim e
Sorry I read your PM. Really converting to app safe format isn't that hard. If you are using my code than, you must copy the grey lcd copier and the sprite routines to the ram. Make sure that the are addressed to work there. it should all fit in statvars with the interrupt vector table and the interrupt itself. But I see if I can make another release with app friendly define.

Posted: Thu 23 Mar, 2006 9:15 pm
by thegamefreak0134
That's easier said than done. Question: If I alter the functions so that calls within the function are all relative, then I would just need to call the memory address I copied the function to to use it, right?

Or woudn't it? Would I have to alter the greyLCD copier so that the interrupt pointed to the right place?

Not knowing the routines well, I don't know how successful I will be doing this.

BTW, to copy all of this code, I can just use ldir, right?

-thegamefreak0134

*edit* Perhaps jim, your APP friendly defines could do the following:

In gsEnable, copy the LCD routines to RAM before setting the interrupt
For gsPutSprite, copy the routines to RAM and re-define names of functions so that they point to RAM areas.

Also, if you are successfull, make sure to mention which sections of RAM will not be accessible for APPs.

Course, this is an outsider's opinion.

Posted: Thu 23 Mar, 2006 9:23 pm
by Jim e
I use quite a bit of smc so it unfortanately won't work that easliy as switching to jr. But yes, ldir is all you need.

Posted: Fri 19 May, 2006 4:49 pm
by thegamefreak0134
I know it's been several months since a post in this topic, but I am still going to appologize for any impatience coming out of me.

Jim e said something to the effect of maybe releasing an APP-friensly version of the package. Does anyone know if that actually happened?

Posted: Fri 19 May, 2006 5:59 pm
by kalan_vod
thegamefreak0134 wrote:I know it's been several months since a post in this topic, but I am still going to appologize for any impatience coming out of me.

Jim e said something to the effect of maybe releasing an APP-friensly version of the package. Does anyone know if that actually happened?
You can ask him on his forums if you want, http://www.revsoft.org/phpBB2/

Posted: Sun 21 May, 2006 8:51 am
by tr1p1ea
It shouldnt be too hard to just relocate the grayscale interrupt routine to a saferam area and run it from there. You just need to make sure that the labels are changed with respect to the saferam area in which you are copying it to.

Posted: Sun 21 May, 2006 9:47 am
by Jim e
Actually I have mostly decided not to release RGP on to ticalc in any form. I first started it s a proof of concept thing(like most stuff I do). I later justified turning it into a package because it seemed knowledge of how to work with the hardware, doing grey in general, and creating highly optimised code was at a premium.

But now after several PMs and the posts I've gotten over the months it seems like I got more questions on how to do the most simple things. So I've come to the conclusion making a big package of code that seems to offer a lot of pretty doesn't really help new coders, Rather it impedes on actual production since they set their goals to high. Not everyone is going to pull a tr1p there first game.( even then he had experience)

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.

Posted: Sun 21 May, 2006 2:07 pm
by Liazon
Jim e wrote:But now after several PMs and the posts I've gotten over the months it seems like I got more questions on how to do the most simple things.
Actually, my issues have always been compiling/assembling issues. Mainly trying to get the .inc file to behave with Latenite, or getting SPASM to work by itself. I'm bad at making things work on the comp XD

Posted: Sun 21 May, 2006 9:01 pm
by Timendus
Good point, Jim. Very good point. You could consider releasing it without providing support though, so people who know what they're doing can use it. Because I think it would be a shame not to release it.

Posted: Mon 22 May, 2006 12:19 am
by Liazon
I agree with Timendus. I think i've got a decent understanding of how your package works, perhaps not all the hardware details though. Leave out contact info? Besides, if someone wants to improve/modify it, they'll be able to do so if they're good enough :D

Posted: Tue 23 May, 2006 2:33 pm
by thegamefreak0134
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

Posted: Tue 23 May, 2006 2:57 pm
by tr1p1ea
Oh cmon you can do it! Its only a small mod anyway!

Besides, the actual engine design should have too much to do with the grayscale routines. Im you could implement grayscale at a later date once things are more complete.

Posted: Tue 23 May, 2006 3:06 pm
by benryves
If the routines can be split up to fit into areas of safeRam, it should be as simple as wrapping the libraries in a .relocate block, like this:

Code: Select all

 ; This code copies the routines to RAM:
    ld hl,grey_lib
    ld de,safeRam
    ld bc,grey_lib_end - grey_lib
    ldir

    call draw_gs_sprite ; Calls address in RAM


; snip

grey_lib
    .relocate safeRam ; Address of choice

    ; Greyscale lib in here
    ; eg:

    draw_gs_sprite
        ; ...
        ret

    .endrelocate
grey_lib_end

Posted: Tue 23 May, 2006 3:18 pm
by thegamefreak0134
:shock: :o :shock:

...I hate you all. You make it look too easy... I was actually going to go home and scream too. :lol:

Will this method work in TASM, or do I have to use BRASS?