Pac-It for Pokemon Mini

PM development, programming, hacking and all that fun stuff.
User avatar
YasaSheep
Posts: 205
Joined: November 20th, 2005, 04:04
Location: Portland (Also the discord)
Contact:

Re: Pac-It for Pokemon Mini

Post by YasaSheep »

Your code doesn't make a lot of sense. Tilemap indexes top out at 255 and I don't see why you would store it in a pointer.

Say 0 is at 48 ($30) which is where it is in ASCII.

Code: Select all

mov x1, TILEMAP
mov a, 48
mov [x1], a
This will place a 0 in the upper left corner.

To place it in a certain position, use TILEMAP + offset
VirtualChris
Posts: 153
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Pac-It for Pokemon Mini

Post by VirtualChris »

Thank you! This works a lot better.
In my game, the score is a timer: minutes and seconds. I'm going to have a timer variable. When I'm coding in other platforms, I'd need the timer to count to about 60 to add a second. Would this be the same, and if not, how many ticks does the timer need to do for one second?
VirtualChris
Posts: 153
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Pac-It for Pokemon Mini

Post by VirtualChris »

Why won't this work?

Code: Select all

Timerr:
		mov		a, [why]
		inc		a
		mov		[why], a
		cmp		a, 60
		jz		ihatethis
	
		ret
		
ihatethis:


	mov x1, TILEMAP+47
	mov a, 98
	mov [x1], a

	ret
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Pac-It for Pokemon Mini

Post by zoranc »

VirtualChris wrote:Why won't this work?
It should. Were is the "why" variable? Is it in the RAM, that is free to use? What happens?
VirtualChris
Posts: 153
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Pac-It for Pokemon Mini

Post by VirtualChris »

The seconds timer should move up to 1 instead of 0. Instead it ignores the line that tells it to and it stays at 0. I cleaned up the code for the game. I renamed "why" to "ticker" and the place the code is in is now called "game_timer". I thought it should work too, but it won't.
http://www.atari2600land.com/pokemonmini/marill9.zip
User avatar
YasaSheep
Posts: 205
Joined: November 20th, 2005, 04:04
Location: Portland (Also the discord)
Contact:

Re: Pac-It for Pokemon Mini

Post by YasaSheep »

I mean you're moving a static tile index into the position, 98, is that the right index? Also, obviously, it wouldn't go above 1, even if 98 was 1, but I assume you know that and this is just test code.
VirtualChris
Posts: 153
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Pac-It for Pokemon Mini

Post by VirtualChris »

Yes, I know it won't go above 1. The problem is it won't even get to 1. 98 is the right index because 97 is 0. All the numbers are located off screen.
VirtualChris
Posts: 153
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Pac-It for Pokemon Mini

Post by VirtualChris »

I fixed it!
What happened is I put this in the beginning:

Code: Select all

.orgfill 0x1000   # first part of RAM is VRAM
.orgfill 0x1800
And it works now.
Image
VirtualChris
Posts: 153
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Pac-It for Pokemon Mini

Post by VirtualChris »

Got a fish in the game.
Image

I have a question. I'd like to make the fish's start movement and whether he starts on the left or right random. Does the Pokemon Mini have a built-in RNG of some sort or do I have to rely on button pressing timing?
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Pac-It for Pokemon Mini

Post by zoranc »

I've used button pressing a while ago. Didn't find any better RNG...

I used to run an increment of a variable until a button is pressed. For action game more appropriate would be to have a timer running and on each button press add it to the random seed.
Post Reply