Jump to content
abaudrand

modifying the playfield with ASM?

Recommended Posts

Is it possible to use ASM within VisualBb to have a more accurate playfield? I've set a default resolution in the standard kernel with the default pfheight but I need to display three differents colors on the same row.

If it's possible, how should I proceed?

Share this post


Link to post
Share on other sites

You can change color on the fly in assembly, but the resolution is rather coarse compared to the normal playfield resolution - IIRC around 11 pixels across, using zero page memory loads. You won't have a lot of time left to do other things, like display players and missiles, while you're changing those colors.

 

There are some other tricks that might be performed, depending on your game requirements. With this kind of question, the quality of the answer you're going to get is proportionate to the level of detail you use when describing your game's display.

 

You might flicker 2 different playfields in 2 different colors. That would provide 4 colors in total (including the backgroud) but at least 2 of them would look flickery.

 

If you only need 8 pixels of the playfield and no players in your game, you could use the players in wide mode as the other colors of the playfield.

Edited by RevEng

Share this post


Link to post
Share on other sites

Thanks for the reply... Yes I have an horrible flickering which is okay on stella but dreadful on real hardware...

I want to make a background with 2 players sprites and no missiles nor ball. I'm flickering between two playfields but the result is not convincing... As the background is drawn, I can't use the ball or missiles shapes to fit the current design... damned :)

Share this post


Link to post
Share on other sites
Thanks for the reply... Yes I have an horrible flickering which is okay on stella but dreadful on real hardware...

Personally, I'm against Stella doing this clean frame blending by default (is there a way to turn it off for good?), because it leads programmers to believe that flicker looks OK, specially if they don't have means of testing on hardware, while 90% (just a guess!) of the time it doesn't. On real hardware, flickering is only really acceptable when the flickering areas are not too big (i.e. it's OK for sprites, but not for huge areas of the playfield) and/or when the brightness of the alternating colors isn't so different.

Share this post


Link to post
Share on other sites
Personally, I'm against Stella doing this clean frame blending by default (is there a way to turn it off for good?), because it leads programmers to believe that flicker looks OK...

I think that the stella phosphor/blending effect is only default-on for roms that are in stella's db and have the effect turned on there. This shouldn't be a problem with WIP roms.

 

Agreed that colors with similar luma are best to flicker together. I have a semi-abandoned WIP that uses that and flicker-blinds to create a 4 color playfield that isn't too hard on the eyes.

 

Another alternative is to draw one color on the odd lines and another on the evens. This isn't flickery at all, but it is a bit stripey.

Share this post


Link to post
Share on other sites

okay I will try to reduce the palette to only 3 colors and only do flickering on one part. I've also noted that to reduce flickering, you need to select colors within the same row on the TIA palette :) Regards...

Share this post


Link to post
Share on other sites

Is it possible to use ASM within VisualBb to have a more accurate playfield? I've set a default resolution in the standard kernel with the default pfheight but I need to display three differents colors on the same row.

If it's possible, how should I proceed?

It isn't possible using the standard kernel. You'll need to either modify the standard kernel-- which most likely means giving up something, or possibly multiple somethings, since there's really no free time available for adding color changes-- or you'll need to just write your own kernel.

 

Michael

Share this post


Link to post
Share on other sites

Is it possible to use ASM within VisualBb to have a more accurate playfield? I've set a default resolution in the standard kernel with the default pfheight but I need to display three differents colors on the same row.

If it's possible, how should I proceed?

It isn't possible using the standard kernel. You'll need to either modify the standard kernel-- which most likely means giving up something, or possibly multiple somethings, since there's really no free time available for adding color changes-- or you'll need to just write your own kernel.

 

Michael

 

Okay, I'll wait a while before trying this... sounds scary for the moment :)

Share this post


Link to post
Share on other sites

Just so I understand what you're trying to do, will it be an asymmetrical playfield, and what are the color changes supposed to look like? For example, are you trying to get three columns of colors (color changes in the same positions on each row)? For example, if you're using a reduced-width playfield-- say, 30 pixels-- that could be divided up as (1) leftmost 10 pixels = color A, (2) central 10 pixels = color B, and (3) rightmost 10 pixels = color C.

 

Michael

 

Edit: Or are you trying to get a choice of 3 colors at any pixel position? If that's the case, you could use flickering without having to use assembly or make a custom kernel, but the choice of colors would be limited, determined by which colors you flicker together. I can do a flicker demo to show you what I mean.

Edited by SeaGtGruff

Share this post


Link to post
Share on other sites

Just so I understand what you're trying to do, will it be an asymmetrical playfield, and what are the color changes supposed to look like? For example, are you trying to get three columns of colors (color changes in the same positions on each row)? For example, if you're using a reduced-width playfield-- say, 30 pixels-- that could be divided up as (1) leftmost 10 pixels = color A, (2) central 10 pixels = color B, and (3) rightmost 10 pixels = color C.

 

Michael

 

Edit: Or are you trying to get a choice of 3 colors at any pixel position? If that's the case, you could use flickering without having to use assembly or make a custom kernel, but the choice of colors would be limited, determined by which colors you flicker together. I can do a flicker demo to show you what I mean.

 

okay I guess I need to clarify what I'm trying to do. I've done a map where the player can choose where he(or she) want to go. Both players are used (0 and 1). I don't use missiles or ball (for now). I've drawn a map and I want to use at least 3 colors (forest, river and mountains) plus the background color. for the moment, I'm switching each frame between 2 playfield but the result is dreadful on real hardware (even pacman looks better).

I'm using the background kernel option for others levels of game so I could not have the green color for the forest part.

I guess it could work if I change the palette and use the method RevEng describes in his multicolour titlekernel exemple.

Edited by abaudrand

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...