Three new video modes

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Three new video modes

Post by CunningFellow »

I'm going to do these video modes

Spectrum Mode
2 Bpp RamTile mode (Tempest mode minus the background)
1 Bpp RamTile mode with background (Mix of Tempest Mode for the background and modified Mode-6)

The point behind the two ramtile modes is to save flash. The current Tempest mode uses over half the flash just for render_line:


Spectrum Mode

288x224
8x8 tiles
Mixed tiles (128 ROM + 128 RAM)
16bit VRAM as FFFFBBBBTTTTTTTT (Foreground colour, Background colour, Tile)
V + H scrolling
3K of RAM for the video
8K+ of flash for render_line:


2 Bpp RamTile mode

256x224 (black vert borders)
8x8 tiles
128 Ram tiles only
8 bit VRAM
No scrolling
3K of RAM for the video
16K+ of flash for render_line:


1 Bpp RamTile mode with background

256x224 (black vert borders)
8x8 tiles
256 Ram tiles only
8 bit VRAM
No scrolling
single colour background bitmap stored in Flash or SD card
3K of RAM for the video
16K+ of flash for render_line:
hpglow
Posts: 269
Joined: Wed Apr 14, 2010 6:06 am

Re: Three new video modes

Post by hpglow »

I'm guessing that the two bit mode will look close to NES games? Looks interesting. Are you currently fleshing these out. A good flash saving mode may make games like Zelda more possible.
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Three new video modes

Post by CunningFellow »

I have done the maths on a spreadsheet to make sure they are possible. They all will use a code table (Like Tempest does) but because of more free cycles I can pack the code table tighter.

The "flash saving" I am talking about is relative to Tempest. All three of these modes will use more flash than most other modes.
User avatar
uze6666
Site Admin
Posts: 4823
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Three new video modes

Post by uze6666 »

Interesting modes! How's the colors gonna work with the 2bbp modes? One global 4 color palette?
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Three new video modes

Post by CunningFellow »

uze6666 wrote:Interesting modes! How's the colors gonna work with the 2bbp modes? One global 4 color palette?
Yes, same as Tempest mode. The 4 colours are held in 4 registers (R20, R21, R22, R1 in Tempest case).

They are global, but you could change them once per scanline if you where keen.
User avatar
Roukan
Posts: 113
Joined: Sat Oct 27, 2012 7:50 pm
Location: Lancashire / England

Re: Three new video modes

Post by Roukan »

CunningFellow wrote:I'm going to do these video modes

Spectrum Mode
2 Bpp RamTile mode (Tempest mode minus the background)
1 Bpp RamTile mode with background (Mix of Tempest Mode for the background and modified Mode-6)

The point behind the two ramtile modes is to save flash. The current Tempest mode uses over half the flash just for render_line:


Spectrum Mode

288x224
8x8 tiles
Mixed tiles (128 ROM + 128 RAM)
16bit VRAM as FFFFBBBBTTTTTTTT (Foreground colour, Background colour, Tile)
V + H scrolling
3K of RAM for the video
8K+ of flash for render_line:
Hi CunningFellow

It's been a while since I posted on the forums (though I do read them every week).

I meant to reply to this when I first read it as it caught my eye, but I got side tracked.

Is it possible to create a screen mode as close as possible to the the ZX Spectrum:

a) 256 x 192 resolution (32 x 24 tiles) = 768 bytes of RAM
b) 256 tiles as above 0-127 fixed definitions in flash / 128-255 redefinable in RAM = 1024 bytes of RAM
c) 32 x 24 screen attribute = 768 bytes of RAM
d) 8 colours as close to original supporting the bright bit (flash bit would be nice though I'm not sure if this would be viable)

If this is possible the big question is could/would you be able to find time to implement it?

I have some old unfinished projects + some floating around in my head that would be well suited to this mode.

Though your proposed mode above is very similar, it would be nice to have a bit more free RAM available to make use of as I don't mind the smaller screen real estate.


Regards


Roukan / Jim
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Three new video modes

Post by CunningFellow »

How do the

Bright bit
Flash bit

work?

There is 8 set colours for each foreground and background.

If bright is set then all 8 colours of both the FG and BG get brighter.

If Flash bit is set then FG and BG swap positions or does the FG disappear (become BG) ?

If the former then I think it's OK. The latter will be a bit harder and I am not sure I can do it without doing some spreadsheet work.
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Three new video modes

Post by CunningFellow »

oops - got that the wrong way.

Swap colours be hard.

FG goes invisible be easy.
User avatar
Roukan
Posts: 113
Joined: Sat Oct 27, 2012 7:50 pm
Location: Lancashire / England

Re: Three new video modes

Post by Roukan »

CunningFellow wrote:oops - got that the wrong way.

Swap colours be hard.

FG goes invisible be easy.
This link explains it all:-

http://en.wikipedia.org/wiki/ZX_Spectru ... or_palette

If the FLASH effect is not possible then a 16 colour palette would suffice as per your original spec BBBBFFFF.


Thanks for the reply / looking into this


Roukan / Jim
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Three new video modes

Post by CunningFellow »

No prob.

At the moment I am working on an instructable to help promote the coding challenge.

I'll try sneak the video mode in between that and finishing tempest.
Post Reply