Frank the Fruit Fly

PM development, programming, hacking and all that fun stuff.
VirtualChris
Posts: 149
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Frank the Fruit Fly

Post by VirtualChris » February 16th, 2019, 02:05

How do I do 3 colors?
If I had to choose a version, I'd do this one:
http://www.atari2600land.com/pokemonmin ... 190212.zip

User avatar
RazorLeafAttack
PM.net Staff
Posts: 138
Joined: May 9th, 2017, 00:58

Re: Frank the Fruit Fly

Post by RazorLeafAttack » February 16th, 2019, 02:46

VirtualChris wrote:How do I do 3 colors?
Here's my basic understanding, which I think is just what zoranc was describing earlier...
The LCD can only refresh so quickly, so by flickering between 2 slightly different graphics where blacks are present in both and areas to be colored grey are black in only one version of sprite, so as it switches between the two, the pixels that are not black in both end up looking grey.

I made a sprite of a cute little egg with the two frames (left and center) that make up the artwork as it displays (right)
Egg Sprite - 3 colors.png
Egg Sprite - 3 colors.png (1.96 KiB) Viewed 1530 times

VirtualChris
Posts: 149
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Frank the Fruit Fly

Post by VirtualChris » February 16th, 2019, 03:45

I tried to make it switch between two screens like you said but the result was disastrous.
Attachments
titlegray.zip
(1.12 KiB) Downloaded 26 times

User avatar
RazorLeafAttack
PM.net Staff
Posts: 138
Joined: May 9th, 2017, 00:58

Re: Frank the Fruit Fly

Post by RazorLeafAttack » February 16th, 2019, 04:42

I don’t know the technical details from a developer’s perspective, but I’d check out some source code in the homebrew or demos section. You can prob find some code to work off of.

I’ll check out disaster.min shortly

Also, your game is now up on the homebrew page. Would you be able to provide a screenshot that exemplifies the glory of Frank?

VirtualChris
Posts: 149
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Frank the Fruit Fly

Post by VirtualChris » February 16th, 2019, 05:35

Here is the Pokemon Mini file and code.
Is it okay to wait on the title screen in case I get gray working?
Attachments
ftff19.zip
(13.7 KiB) Downloaded 30 times

zoranc
Posts: 294
Joined: August 13th, 2010, 18:13
Contact:

Re: Frank the Fruit Fly

Post by zoranc » February 17th, 2019, 14:32

Regarding the three colors the graphical explanation above was very good I think, so no need to add anything to it.

Now the implementation is little tricky, not much but still... So, 36 times per frame (maximum) the rendering chip copies video data to the LCD. That includes rendering sprites and tiles to the VRAM and copy of the VRAM to the LCD by driving LCD registers. Once this is done it safe to change the graphics data before the next PRC copy starts. The interrupt #1 (PRC Copy Complete) will trigger once it is safe to do the change.

What I do is set the flag in the interrupt handling routine and check the flag in my main loop (you also need to clear the interrupt flag ). The best practice is to spend as little time possible in the interrupt routines. Also writing to the VRAM directly takes lot of time hence best visual results are when you use tiles and sprites. They both can have two sets and the mentioned switch can just involve swapping their base address back and forth.

I don't feel like writing this in assembly. I intend to release the C compiler soon and the provide examples such as this in C. You can look at some of the examples in the homebrew section too.

VirtualChris
Posts: 149
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Frank the Fruit Fly

Post by VirtualChris » February 18th, 2019, 13:53

I tried to do it and got it working, but it kept doing weird stupid things like beginning when it wasn't supposed to, so I give up.

VirtualChris
Posts: 149
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Frank the Fruit Fly

Post by VirtualChris » February 18th, 2019, 14:04

Here's the screenshot I want in the FTFF page.
Attachments
franktitlescreen.png
franktitlescreen.png (2.71 KiB) Viewed 1483 times

User avatar
RazorLeafAttack
PM.net Staff
Posts: 138
Joined: May 9th, 2017, 00:58

Re: Frank the Fruit Fly

Post by RazorLeafAttack » February 19th, 2019, 21:15

VirtualChris wrote:Here's the screenshot I want in the FTFF page.
I got the screenshot up there now. If you want to provide a description/controls/anything else in the text on that page let me know. I just have a stupid one in there right now lol.

I hope you'll try getting 3 shades again at some point! I'm sure somebody here can take a look at the code and help correct whatever it was causing the sprite/tile swapping to act like that.

VirtualChris
Posts: 149
Joined: February 21st, 2015, 22:53
Location: United States
Contact:

Re: Frank the Fruit Fly

Post by VirtualChris » February 20th, 2019, 02:10

Here is the code and .pm file for the three colors if anyone wants to take a look.
Attachments
frank3colorfail.zip
(14.58 KiB) Downloaded 27 times

Post Reply