Log In  


Cart #17482 | 2015-12-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
20

Hello, this is my first attempt to code anything in this great virtual console.

It's just four effects I coded in my first few evenings since I bought the Pico-8.
I try to use the special modes at 0x5f2c to mirror some of the effects so that I have to draw less pixel.
Although, one can use the keys to go through all the modes, and based on the mode more or less pixels are drawn and the text are aligned accordingly.

A: changes mode
B: changes part

20


Thanks for sharing this, It's pretty interesting! I didn't even know about these graphical modes... I suppose I should really read that manual start to finish some time, even if I don't use all of it. :I

I have a question! Is it possible to draw the effect that uses these mirror modes, and then draw the text, without the text being mirrored?


No as far as I know, these are modes that mirror everything from one half or one quarter of the videoram so it will mirror everything (sprites, tiles, text, even poking at vram=0x6000). Also, they are not in the manual, it's like some strange undocumented feature/bug, not sure if it was intended. So, hmm.. technically they are not as useful for games, maybe for demoeffects only, unless there is an interesting game idea with mirrored screens.


you could draw to the spritesheet then use sspr to mirror/scale sections.


Damn, this is really impressive.


Oh, wow! I had no idea there were other graphic modes. BTW, pls, what's the difference between 0 and 4?


@Optimus6128: it's clearly not the sort of this that could result from a bug, so it's either debug/test code or not, but it was intended to behave like this.


AdamJ:

Looks like 0 and 4 are the same, since they are both not using the mode bits 0 and 1 control. I think this is the bit layout:

bit 0: enables mode on x axis
bit 1: enables mode on y axis
bit 2: 0 = 64-pixel mode, 1 = mirror mode


-- extra graphics modes
poke(0x5f2c, 0) -- standard 128x128
poke(0x5f2c, 1) -- 64x128
poke(0x5f2c, 2) -- 128x64
poke(0x5f2c, 3) -- 64x64
poke(0x5f2c, 4) -- standard 128x128
poke(0x5f2c, 5) -- mirror left half
poke(0x5f2c, 6) -- mirror top half
poke(0x5f2c, 7) -- mirror top-left quarter

I really wish that widescreen was available as an undocumented screen mode.


@matt

You could just launch the app with args to make it anamorphic.

Sample for 4x zoom 4:3:

-aspect 560 -scale 4 -width 750 -height 560

Sample for 4x zoom 16:9:

-aspect 747 -scale 4 -width 960 -height 560

And then deal with non-square pixels. Retro console and computer pixels were seldom square anyway, so it's technically part of the historic experience. :)

I'm not sure if the web player can do this, by the way, or if you can mark your cartridge as being meant for a certain aspect to auto-launch with it. But for playing with aspect for your own sake, it's an option.


nice workaround!

would love official support in player and web player.



[Please log in to post a comment]