Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jerros

Pages: 1 2 [3] 4 5 ... 10
31
Wow, thanks y'all! That should definitely save me some time. =^_^=

32
Might need to explain what I mean here;
what's a conveniet way to create big 'pictures' for a programm?
This is what we want in the case of a full 96x64 pic:
Code: [Select]
.db 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11001111b, 11111111b, 11111111b, 10011111b, 11111111b
.db 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 10001111b, 11111111b, 11111111b, 10011111b, 11111111b
.db 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 10001111b, 11111111b, 11111110b, 00000111b, 11111111b
.db 11111111b, 11111110b, 11111111b, 11111111b, 11111111b, 11111111b, 11111110b, 00001111b, 11111111b, 00000000b, 00000000b, 00011111b
.db 11111111b, 11111100b, 11111111b, 11111111b, 11111111b, 11111111b, 11111100b, 00001111b, 11111111b, 00000000b, 00000000b, 00111111b
.db 11111000b, 00000000b, 00000000b, 01111111b, 11111110b, 00000111b, 11111000b, 00001111b, 11111111b, 00000000b, 11100000b, 01111111b
.db 11111000b, 00000000b, 00000000b, 11111111b, 11111110b, 00000011b, 11110000b, 00001111b, 11111111b, 00000000b, 11100000b, 01111111b
.db 11111000b, 00000000b, 00000001b, 11111111b, 11110000b, 00000001b, 11100000b, 00001111b, 11111111b, 00000001b, 11110000b, 11111111b
.db 11111000b, 00000111b, 00000011b, 11111111b, 10000000b, 00000001b, 11111000b, 00001111b, 11111111b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00000111b, 00000011b, 11111110b, 00000000b, 00000001b, 11111000b, 00001111b, 11111111b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11001111b, 11110000b, 00001110b, 00000011b, 11111000b, 00001111b, 11111110b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 11000000b, 00001110b, 00000001b, 11111000b, 00011111b, 11111110b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 10000000b, 00111110b, 00000011b, 11111000b, 00001111b, 11111110b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 11110000b, 00111110b, 00000011b, 11111000b, 00001111b, 11111100b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 11110000b, 00111110b, 00000011b, 11111000b, 00001111b, 11111100b, 00000001b, 11111111b, 11111111b
.db 11110000b, 00001111b, 11111111b, 11110000b, 00001110b, 00000011b, 11111000b, 00001111b, 11111110b, 00000001b, 11111111b, 11111111b
.db 11110000b, 00001111b, 11111111b, 11110000b, 00000000b, 00000011b, 11111000b, 00001111b, 11111111b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 11110000b, 00110000b, 00000011b, 11111000b, 00001111b, 11111111b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 11110000b, 00111110b, 00000011b, 11111000b, 00001111b, 11000111b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 11110000b, 00111110b, 00000011b, 11111000b, 00001111b, 10000111b, 00000001b, 11111111b, 11111111b
.db 11111000b, 00001111b, 11111111b, 11110000b, 00111110b, 00000011b, 11111000b, 00001111b, 11000011b, 00000001b, 11100001b, 11111111b
.db 10011000b, 00001111b, 11111111b, 11110000b, 00111110b, 00000011b, 11111000b, 00001111b, 10000111b, 00000000b, 11100000b, 11111111b
.db 10101000b, 00001111b, 10001111b, 11000000b, 00001110b, 00000001b, 11111000b, 00000011b, 00000011b, 00000000b, 11000000b, 01111111b
.db 10011000b, 00001111b, 00000111b, 11111010b, 00001110b, 00000011b, 11111000b, 00000000b, 00000011b, 00000000b, 00000000b, 01111111b
.db 10101000b, 00000111b, 00000011b, 11111111b, 11111110b, 00000001b, 11110000b, 00000000b, 00000011b, 00000000b, 00000000b, 01111111b
.db 10011000b, 00000110b, 00000011b, 11111111b, 11111110b, 01101111b, 11100000b, 11111100b, 00110011b, 00000000b, 00100000b, 01111111b
.db 11111000b, 00000000b, 00000011b, 10111111b, 11111111b, 11111111b, 11001111b, 11111111b, 11111111b, 00000111b, 11110000b, 11111111b
.db 10101000b, 00000000b, 00000011b, 11000000b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 00000111b, 11111111b, 11111111b
.db 11011000b, 00000011b, 00000011b, 11000000b, 00111111b, 11111111b, 11111111b, 11111111b, 11111111b, 10000111b, 11111111b, 11111111b
.db 11011000b, 01111111b, 10000011b, 11000000b, 00111111b, 11111111b, 11111111b, 11111111b, 11111001b, 11000111b, 11111111b, 11111111b
.db 11111011b, 11111111b, 10001111b, 11000000b, 01111110b, 01111100b, 00000000b, 00111111b, 11100000b, 11100011b, 11111111b, 11111111b
.db 11111111b, 11111111b, 00001111b, 11000000b, 01111110b, 00111110b, 00000000b, 00011111b, 10000000b, 00111000b, 11111111b, 11111111b
.db 11111111b, 11111110b, 00011111b, 11000000b, 11000000b, 00000011b, 00000111b, 00001110b, 00000000b, 00001110b, 01111111b, 11111111b
.db 10011111b, 11111100b, 00111111b, 11000000b, 11000000b, 00000011b, 00000111b, 00001110b, 00000000b, 00000011b, 01111111b, 11111111b
.db 11011111b, 11111100b, 01111111b, 11000000b, 11000001b, 00000011b, 00000111b, 10001110b, 00000111b, 00000011b, 10111111b, 11111111b
.db 11011111b, 11110001b, 11100011b, 11000000b, 11000001b, 11100011b, 00000111b, 10001110b, 00000111b, 00000011b, 11111111b, 11111111b
.db 10011111b, 11100001b, 11100011b, 11000000b, 11000001b, 11000011b, 00000111b, 10001110b, 00000111b, 00000011b, 11111111b, 11111111b
.db 11111111b, 10011111b, 10000011b, 11000000b, 11000001b, 11000011b, 00000110b, 00000110b, 00000111b, 00000011b, 11111111b, 11111111b
.db 10011111b, 11111111b, 00000011b, 11000000b, 11000001b, 11000011b, 00000100b, 00001110b, 00000111b, 00000011b, 11011111b, 11111101b
.db 10111111b, 11111110b, 00000011b, 11000000b, 11000001b, 11000011b, 00000000b, 00011110b, 00000111b, 00000011b, 10001111b, 11111000b
.db 10011111b, 11111100b, 00000011b, 11000000b, 11000001b, 10000011b, 00000000b, 01111000b, 00000111b, 00000011b, 10001111b, 11111000b
.db 10111111b, 11111000b, 00000011b, 10000000b, 11000000b, 00000011b, 00000000b, 01111000b, 00000111b, 00000011b, 10001101b, 11011000b
.db 10011111b, 11111110b, 00000000b, 00000000b, 11000000b, 00011111b, 10000000b, 00111110b, 00000111b, 00000001b, 10001000b, 10001000b
.db 11111111b, 11111110b, 00000000b, 00000000b, 11000000b, 00111111b, 00000000b, 00111110b, 00000111b, 00000000b, 10001000b, 10001000b
.db 10011111b, 11111110b, 00000000b, 00000000b, 11000000b, 11111111b, 00000100b, 00111110b, 00000111b, 00000011b, 10001000b, 10001000b
.db 10101111b, 11111110b, 00000111b, 11000000b, 11000001b, 11111011b, 00000100b, 00011110b, 00000111b, 00000011b, 10001011b, 11001000b
.db 10011111b, 11111110b, 00000011b, 11000000b, 01000001b, 11100011b, 00000110b, 00011110b, 00000111b, 00000111b, 10001110b, 01001000b
.db 10101111b, 11111110b, 00000011b, 11000000b, 11000001b, 00000011b, 10000111b, 00001110b, 00000111b, 00000111b, 10001100b, 01001000b
.db 11111111b, 11111110b, 00000011b, 11000000b, 11000000b, 00000011b, 00000111b, 00001110b, 00000111b, 00000011b, 10011000b, 01001000b
.db 10011111b, 11111110b, 00000011b, 11000000b, 11111000b, 00011111b, 00000111b, 10001110b, 00000111b, 00000011b, 10110000b, 11001000b
.db 10101111b, 11111110b, 00000011b, 11000000b, 11111110b, 00011111b, 00000111b, 10001110b, 00000111b, 00000111b, 11100001b, 10001000b
.db 10011111b, 11111110b, 00000011b, 11000000b, 11111110b, 00111100b, 00000001b, 10001110b, 00000111b, 00000011b, 11000011b, 10001000b
.db 10101111b, 11111110b, 00000011b, 11000000b, 11111111b, 01111111b, 11111111b, 11000111b, 11000000b, 00000011b, 10000110b, 10001000b
.db 11111111b, 11111110b, 00000011b, 11000000b, 11111111b, 11111111b, 11111111b, 11000011b, 11100000b, 00000111b, 10001100b, 10001000b
.db 10001111b, 11111110b, 00000011b, 10000000b, 01111111b, 11111111b, 11111111b, 11110001b, 11110000b, 01111111b, 10011000b, 10001000b
.db 10101111b, 11111110b, 00000011b, 00000000b, 00111111b, 11111111b, 11111111b, 11111000b, 11111000b, 11111111b, 10011101b, 11011000b
.db 10001111b, 11111110b, 00000011b, 11111111b, 11111111b, 11111111b, 11111111b, 11111110b, 00111001b, 11111111b, 10011111b, 11110000b
.db 11111111b, 11111110b, 00000011b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 10001110b, 00000000b
.db 10001111b, 11111100b, 00000001b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 10000011b, 00000000b
.db 10111111b, 11111000b, 00111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 10000001b, 00000000b
.db 10001111b, 11110011b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 10000001b, 00000001b
.db 11101111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11000011b, 00000011b
.db 10001111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11100110b, 00000111b
.db 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b, 11111111b
But after designing a screen of some sort, is there an easy way to quickly turn a .bmp file or something into something suitable for programming use, like the above example? I'm getting tired of manually typing this shit, it's a monk's job!

Thanks in advance!

33
ASM / Re: App-Page switching - How fast is that?
« on: October 22, 2010, 09:41:38 am »
There are some things that you can keep on multiple pages if you are not concerned about speed.  For my game, 16 KB (one page) is too little to make the game speed-efficient all the time.  So for when the player is doing nothing but looking at text and scrolling through menus, I keep THAT code on another page.  True, it means I use about 60 B_CALLS a second during that time, but because the code doesn't need to run as fast at that point, its a fair exchange for using the first page to run processor-intensive stuff.
Yes, I'm doing just that myself too. Though during the game, it loops a lot of pictures and loops ect. Since I have more levels than there fit on one page, I need to copy those pictures and loops to each page to make it speedy.
Waste of space (4 page App at the moment >.<) but the ROM is big enough ^_^.

34
ASM / Re: App-Page switching - How fast is that?
« on: October 22, 2010, 09:25:38 am »
Using Bcall...
Okay, thanks. I'll keep the info on the same page then, even if this means that I have the same stuff on multiple pages.

35
ASM / App-Page switching - How fast is that?
« on: October 22, 2010, 07:58:03 am »
Short question:
Is it for a routine that needs to run VERY fast better to keep all info on one page, or is switching between App pages not that slow to do?

36
ASM / Re: Direct Input + GetCSC = Fail?
« on: October 22, 2010, 07:17:49 am »
K, I'll try that.
May save a lot of work.

EDIT: Yay, works fine now! Thank you.

37
ASM / Re: Direct Input + GetCSC = Fail?
« on: October 20, 2010, 10:56:29 am »
I might be able to bypass the problem if... Can you use Get_CSC with cp skOn? Or is there no way to jump to a label when the ON button is pressed?

38
ASM / Re: Direct Input + GetCSC = Fail?
« on: October 18, 2010, 08:42:24 am »
It will probably fix the weird DEL thingy, but that is probably more of what you are doing when you see that DEL is being pressed.
So the error is in the Label tht Del jumps too? That's very possible.:) Though when I use onlyGetCSC and press Del, then all works fine. But I still can't stand that it crashes when using GetCSC for DEL when also using direct input for other buttons. It shouldn't , so there's likely to be something wrong...

Oh, and on a sidenote, noticed that you used two NOP commands for the delay. Quigibo once told me that you shouldn't use NOP commands for that, but rather use some dummy instructions that last the same time. Don't know why, but he seems to know alot, so I'd just take his advice on that one. :P

39
ASM / Re: Direct Input + GetCSC = Fail?
« on: October 17, 2010, 01:28:06 pm »
This would take care of quite a bit of the hassles you are having. Plus, it completely eliminates the GetCSC.
Okay, I'll try.
Though will it fix the weird "DEL" thingy too?
I'm talking about that this:
Code: [Select]
   LD     A, %10111111
    OUT    (1), A
ld b,%11101101
    IN     A, (1)
CP %11111111
JP Z, Label
will result in a jump to Label EVERY pass, even when the DEL button isn't being hold down.
It only does this with DEL, any other button works fine....

40
ASM / Direct Input + GetCSC = Fail?
« on: October 17, 2010, 07:57:05 am »
If I use Direct input OR GetCSC to react to keypresses, it works fine.
If I use them both however, GetCSC results in a crash:

This works:
Code: [Select]
    b_call _GetCSC
    CP     skDel
    JP     Z, Label
This works too:
Code: [Select]
    LD     A, %10111111
    OUT    (1), A
ld b,%11101101
    IN     A, (1)
    CP     %11101111
    JP     Z, presyequ
    CP     %11110111
    JP     Z, preswindow
    CP     %11111011
    JP     Z, preszoom
    CP     %11111101
    JP     Z, prestrace
    CP     %11111110
    JP     Z, presgraph
But here comes the fun thing, pressing DEL will result in Ram-Reset:
Code: [Select]
    b_call _GetCSC
    CP     skDel
    JP     Z, Label
    LD     A, %10111111
    OUT    (1), A
ld b,%11101101
    IN     A, (1)
    CP     %11101111
    JP     Z, presyequ
    CP     %11110111
    JP     Z, preswindow
    CP     %11111011
    JP     Z, preszoom
    CP     %11111101
    JP     Z, prestrace
    CP     %11111110
    JP     Z, presgraph
Now, an obvious solution would be:
Code: [Select]
    LD     A, %10111111
    OUT    (1), A
ld b,%11101101
    IN     A, (1)
    CP     %11101111
    JP     Z, presyequ
    CP     %11110111
    JP     Z, preswindow
    CP     %11111011
    JP     Z, preszoom
    CP     %11111101
    JP     Z, prestrace
    CP     %11111110
    JP     Z, presgraph
CP %11111111
JP Z, Label
BUT when I do that, it will go to "Label" each pass, no matter what buttons you press.
Am I missing something obvious here? How to make both DEL and the other buttons work?

41
ASM / Re: Disabeling the "ON" button during an App?
« on: October 15, 2010, 06:09:52 am »
If you are still using getCSC then yes, it will be less responsive because the interrupts aren't turned on for most of the time. Which would make the getCSC only check for keypresses once per loop. If you are using direct key presses, then it wouldn't have any affect, unless you didn't make the checking routine very well. ;)
Using GetCSC...
So I guess I replace it with a direct routine.
Though I'd have to fix the fact that holding down buttons will result in ALOT of keypresses, but I believe I already have a script for that somewhere.
Thanks.

EDIT: Haha, found a way to bypass the whole problem; just make sure people don't press the ON button at all:
Code: [Select]
in a,($04)
bit 3,a
jp z,Quit

42
ASM / Re: Executing "ret" twice?
« on: October 14, 2010, 03:15:23 am »
On an off-topic note, I fixed your forum signature because it was not showing up properly
Haha! That was a mindf**k to me.;) One moment my sign wasn't showing correctly and I was like "Meh, will fix that later", then I log in, and it was showing correctly... >.< Thanks though.
You know, you can save your stack pointer first and then return out of an arbitrary number of nested calls at once without memory leaks.
I'll try that, though my problem is still that it HAS to return to the base level by a RET command (for noob reasons).
But I guess that with your code that can be done easely.
Thanks Quigibo, you've saved my day once again.

EDIT:
Ah, figured out why/how Quigibo's script works.
Works PERFECTLY now, so problem solved. n_n

43
ASM / Re: Disabeling the "ON" button during an App?
« on: October 14, 2010, 02:56:57 am »
Is it a mindf**k of me, or does it seem to be slightly less responsive to the keypresses when using the code above?
Any theory that can back that up, or am I making up things here?

44
ASM / Re: Disabeling the "ON" button during an App?
« on: October 13, 2010, 04:55:54 am »
Like ThePenguis already said, it's fixed now.
This what I did with his solution:
Code: [Select]
   (...)
    b_call _GetCSC
    CP     skKey
    JP     Z, Label
AfterLabel:
di
ld a, %00001010
out (03), a
         (...)

Label:
   (...)
   JR   AfterLabel
If you put this in the loop, ON won't cause much trouble anymore.
(Though EXESSIVELY spamming the button will still result in a very occasional small slowdown, though the origional point was to prevent cheating, which is effectively impossible now;P)
Works good enough for me. :P
Thank you ThePenguin!

45
ASM / Re: Executing "ret" twice?
« on: October 12, 2010, 03:41:29 am »
Figured it out ~
All I needed to do was pop HL enough times to return to where I wanted it to:
Code: [Select]
RetMoar:
POP HL
POP HL
ret
I just didn't knew how calls and stacks worked, but by putting all your advices together, I've got a pretty clear idea now, and managed to fix my own problem (albeit a noob problem).
Thank you all!

EDIT:
Or so I thought...
It seems that the number of POPs required varies the whole time, which is odd...
Do more lines get executed after the GetCSC if you press a button?
Like:
Code: [Select]
    b_call _GetCSC
    CP     skDel
    JP     Z, Quit
    (...)                            ; Can this get executed, even though you press the Del button?
                                      ; If that's true, things just've gotten much more complicated :c

Quit:
POP HL
POP HL
ret

Pages: 1 2 [3] 4 5 ... 10