Jump to content
IGNORED

Solaria's code


NRV

Recommended Posts

Hi, couldn't resist doing this..

 

Here is a port of the Solaria "teaser" done for our A8's (ntsc version only for now).

The original palette used the 256 colors of the 7800, so it loses some of the more subtle color variations of the background, but is more or less the same.

Also the scrolling text doesn't start from the bottom.. that maybe can be done, but it would be a pain in the ass x)

It can be moved down right now, but it doesn't look that good starting near the sun (it loses legibility).

 

post-11240-0-40551000-1523775737.png

 

I used most of the assets that Fragmare posted here http://atariage.com/forums/topic/277344-sword-of-solaria-final-fantasy-style-jrpg-7800-graphicsmusic-mockup/

 

Would post a video and talk more about the code later (source and all files included).

 

Regards!

 

Solaria.zip

Edited by NRV
  • Like 9
Link to comment
Share on other sites

Mini development blog:

 

The background color is changed every line with a big DLI, that starts at the top of the screen, and ends several scan lines after the bottom of the screen.

After the section of the DLI that controls the background colors, we do a lot of other things, like playing the RMT music, managing the logic state of the demo, or resetting some registers for the next frame.

 

There is no VBI, and the main code loop only have a "Here jmp Here" instruction.

If you want to see how much time is available per frame, just hold any CONSOL key (and set Altirra's overscan mode to "full").

 

Apart from changing the background colors, the "main" section of the DLI also modify other color registers, the P/M's (positions, colors and size) and the Prior register (yep, the timing was tight sometimes, so self modifying code was used in some points).

The title and the sun graphics are done in g15 mode. A part of the sun, the heroes and the terrain are done using all the P/M's. The scrolling text is in char mode Antic4.

 

The demo has 5 internal states:

- The title fade-in is done changing the value of 3 color registers.

 

- The background fade-in is done changing one pointer, so the DLI code take the background colors from a new table.

 

- The movement of the sun is done with horizontal fine scrolling (and updating the LMS's in the display list), using a wide screen mode. At the same time the P/M's position is updated.

 

- The movement of the title image that leaves the screen is done changing the LMS pointer for that area in the display list (no use of VSCROL here). At the same time, to avoid crossing a 4K area, or having a lot of empty memory after the image, I just start writing blank line instructions directly into the display list.

 

- When starting the movement of the scrolling text we change the display list for another with char lines.

Also we change the wide playfield mode to use narrow mode. This helps with the timing for the DLI, because of the badline for every char line used.

The movement of the text is done using vertical scrolling and updating the top LMS, as usual.

The color masks at the top and bottom are done updating the char colors. The only tricky part is the bottom mask, where you also need to change the P/M's priority per line (between been in top, and been behind).

 

There is no pal version for now. It would mean changing the colors, adjusting the times for every part and changing the music.

Trying to do 2 RMT's calls in the same frame could be difficult, but PAL has more time per frame. I don't know if that would sound correct.

The only "bad" thing of the NTSC version is that the sun looks "thin", if you use the correct pixel ratio (at least in Altirra).

 

There are a lot of comments in the code for anyone that want to take a look, but also many hard coded numbers x)

This was a fast, "just program, don't think" job, most of the time :)

 

Edited by NRV
  • Like 3
Link to comment
Share on other sites

Mini development blog:

 

The background color is changed every line with a big DLI, that starts at the top of the screen, and ends several scan lines after the bottom of the screen.

After the section of the DLI that controls the background colors, we do a lot of other things, like playing the RMT music, managing the logic state of the demo, or resetting some registers for the next frame.

 

There is no VBI, and the main code loop only have a "Here jmp Here" instruction.

If you want to see how much time is available per frame, just hold any CONSOL key (and set Altirra's overscan mode to "full").

 

Apart from changing the background colors, the "main" section of the DLI also modify other color registers, the P/M's (positions, colors and size) and the Prior register (yep, the timing was tight sometimes, so self modifying code was used in some points).

The title and the sun graphics are done in g15 mode. A part of the sun, the heroes and the terrain are done using all the P/M's. The scrolling text is in char mode Antic4.

 

The demo has 5 internal states:

- The title fade-in is done changing the value of 3 color registers.

 

- The background fade-in is done changing one pointer, so the DLI code take the background colors from a new table.

 

- The movement of the sun is done with horizontal fine scrolling (and updating the LMS's in the display list), using a wide screen mode. At the same time the P/M's position is updated.

 

- The movement of the title image that leaves the screen is done changing the LMS pointer for that area in the display list (no use of VSCROL here). At the same time, to avoid crossing a 4K area, or having a lot of empty memory after the image, I just start writing blank line instructions directly into the display list.

 

- When starting the movement of the scrolling text we change the display list for another with char lines.

Also we change the wide playfield mode to use narrow mode. This helps with the timing for the DLI, because of the badline for every char line used.

The movement of the text is done using vertical scrolling and updating the top LMS, as usual.

The color masks at the top and bottom are done updating the char colors. The only tricky part is the bottom mask, where you also need to change the P/M's priority per line (between been in top, and been behind).

 

There is no pal version for now. It would mean changing the colors, adjusting the times for every part and changing the music.

Trying to do 2 RMT's calls in the same frame could be difficult, but PAL has more time per frame. I don't know if that would sound correct.

The only "bad" thing of the NTSC version is that the sun looks "thin", if you use the correct pixel ratio (at least in Altirra).

 

There are a lot of comments in the code for anyone that want to take a look, but also many hard coded numbers x)

This was a fast, "just program, don't think" job, most of the time :)

 

 

 

cool... but you would add more to the pic... can you move the water little bit? below the scroller.... or make the water "sparkle"?

Link to comment
Share on other sites

I agree with both of you, but not for now x)

 

I also wanted to do that. Doing the movement with fine scrolling should be "easy".

Probably it would be better to merge the movement and the "sparkle" into animation frames, but someone would need to provide them to me :)

 

At some point I started looking at sunset gif's:

post-11240-0-13518100-1523905346.gif

post-11240-0-82552800-1523905362.gif

post-11240-0-25370600-1523905372.gif

 

Other ideas: a falling star at the end, the sun setting down slowly, some stars appearing at the top of the sky, the heroes jumping from the cliff..

Edited by NRV
  • Like 1
Link to comment
Share on other sites

I agree with both of you, but not for now x)

 

I also wanted to do that. Doing the movement with fine scrolling should be "easy".

Probably it would be better to merge the movement and the "sparkle" into animation frames, but someone would need to provide them to me :)

 

 

Other ideas: a falling star at the end, the sun setting down slowly, some stars appearing at the top of the sky, the heroes jumping from the cliff..

 

I'm on it. You want separate animation frames or palette shifting sparkles? ;)

 

I like the falling star idea! I was also thinking of having the shimmering line-scrolling or some small birds at the end maybe, but I didn't know if there would be enough resources left.

Edited by Fragmare
Link to comment
Share on other sites

I'm on it. You want separate animation frames or palette shifting sparkles? ;)

 

I like the falling star idea! I was also thinking of having the shimmering line-scrolling or some small birds at the end maybe, but I didn't know if there would be enough resources left.

Haha, if you are going to do it, full animation frames would be better and more flexible :P

Below the sun area you have 3 color registers available (you used two colors in the current sun reflection).

 

The falling star could be done with players, in the screen area over the sun.

The top of the sun is done with all the players at the end, so if there are small birds they should fly between the sun and the heroes (small area), or just over the sun.

 

Also, try to use the even luminances in the 256 color palette (0, 2, 4, .. 14), if you want a direct conversion for the A8 :)

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...