Jump to content
IGNORED

Smooth scrolling


Asmusr

Recommended Posts

The 8-pixel wide strip of the map is running vertically from the top to the bottom of the map. It basically corresponds to one character column on screen, or better, on the whole map, since it doesn't end at the end of the visible screen. There would be 36 of such strips in the arcade version, or at most 32 in a hypothetical TI-99 version.

 

The numbers to be seen in the picture denote the pixel row on which the respective zig-zag line starts. The numbers converted by me (4, 10, 4, 4) denote the distance in pixel rows from one point to the next, so a number of 4 means that this line will end on the other side on the strip, 4 pixels lower than it started (or lower than the endpoint of the last line). Which relatively would mean the the first line starts at pixel row -10, the next one starts at pixel row -6, the next one starts at pixel row 4, the next one at pixel row 8, and the last one at pixel row 12. The pixel column, meanwhile, alternates between the left and right edge of the strip, so it doesn't have to defined explicitly.

Link to comment
Share on other sites

 

Hmm, now you mention it that does seem more logical. :) It would probably also be more efficient for building the name table.

 

Actually, after looking in Magellan, my map is organized like this:

 

00005

00045

00345

02340

12300

12000

10000

 

So in this case it makes sense to do what I did and store it as:

 

12345

12345

12345

Link to comment
Share on other sites

Just a little update to my demo, now with checkerboard tiles and corrected bass notes.

 

 

Regarding the music, I made a small Java program that reads an ePSGMOD file and adjusts the frequency of all zero volume notes in channel 2 by 15/16 (assuming all notes used to control periodic noise have zero volume). This compensates for the difference between the SN76489 and the TMS9919 sound chips. Let me know if anyone wants it.

Isoscroll.zip

  • Like 5
Link to comment
Share on other sites

  • 1 month later...

This thread is totally interesting and lead me to try out Magellan.

I always dreamed about some Mario like Jump'n'run with Horizontal Scrolling on the TI-99. Don't know whether I can program such a thing, but maybe together we can give it a try.

First thing I had to learn is that you can prepare multiple Screen Image Tables, but there are limits where you can define the pointer to the one which is active. So you can only activate it at 16 defined spots in VDP, namely at each begin of a 1024 bytes area in the VDP. Either at >0000, >0400, >0800,..., >3C00. So no smooth pointer adaptions to simply get the next row from memory onto the screen :(

Then I read about Graphics Mode I versus Mode II versus Half-Bitmap Mode.

Since horizontal scrolling is limiting the colors on a pixel line quite similar in all the modes, I wanna start with the easiest and most familiar mode for me: Graphics Mode I. The color limits are really tricky to overcome when doing smooth scrolling, you can see a few tries on that in my map below.

I guess such a game is hard enough to try it without backscrolling. Haven't decided yet whether i shall scroll 1 pixel, 2pixel or 4pixel at once, will decide that later. Of course all would be easier if I can scroll 8 pixels (1char) at once, but I read that such a scrolling looks blocky to those who tried that option.

So far I drew 4 screen maps in Magellan in Mode I, made sure about color transitions, and triggered the export for 'Assembler Character Transition Data'.
The created assembler source seems to be for the PC, not the TI. Any guidance for the next steps would be more than welcome.
Are there any steps within the tools left or am I on my own with the data statements now?

Attached is a PNG of the map

post-27826-0-27718700-1388182260_thumb.png

 

The assembler output:

map1.asm

 

The Magellan file:

map1b.zip

  • Like 2
Link to comment
Share on other sites

So far I drew 4 screen maps in Magellan in Mode I, made sure about color transitions, and triggered the export for 'Assembler Character Transition Data'.

The created assembler source seems to be for the PC, not the TI. Any guidance for the next steps would be more than welcome.

Are there any steps within the tools left or am I on my own with the data statements now?

 

Great to see a new game project. I will do my best to help.

 

I see that you have made 4 individual 32x24 screens in Magellan instead of one 128x24 map. The latter would be a better starting point for smooth scrolling.

 

There are only 48 horizontal character transitions in your map, which is good. If you go above 128 you will be limited to 2 pixels scrolling (assuming that you want to keep all scrolled patterns in VDP RAM, which I would highly recommend.)

 

I will be happy to put together a modified version of one of my demos for you that can scroll your map right or left. Just give me a few days...

Link to comment
Share on other sites

Thanks, I will look at them tonight.

 

Just to clarify that the assembler output from Magellan is just the data (map, color table, scrolled patterns). You also need an assembler program to perform the scrolling. This can be programmed on a PC (look in the "TI-99/4A development resources" thread for tools), or if you have lots of patience, directly on the TI.

Link to comment
Share on other sites

RasmusM,

 

Can we do vertical and horizontal scrolling in the same map? That is a MAP 128x128 or 128x96 etc.

 

I know you have shown both vertical and horizontal scrolling and the zaxxon-ish scroll also. I think you did one block H then one block V , HVHVHVH..

So, that kinda answers my question, But I want to be certain...

 

Thanks,

Gene

Link to comment
Share on other sites

RasmusM,

 

Can we do vertical and horizontal scrolling in the same map? That is a MAP 128x128 or 128x96 etc.

 

I know you have shown both vertical and horizontal scrolling and the zaxxon-ish scroll also. I think you did one block H then one block V , HVHVHVH..

So, that kinda answers my question, But I want to be certain...

 

Thanks,

Gene

 

Like this?

http://www.youtube.com/watch?v=RKkWAUJ2H1k

  • Like 4
Link to comment
Share on other sites

Thx for clarifying that RasmusM, here are updated files...

 

Here is the source code ('Horizontal graphics scroll.a99') to produce a smooth scrolling version of your map. I intend to include the source with Magellan at some point, which explains the formal comments at the beginning, but you're welcome to remove all that.

 

A disk image with an assembled version is also included. Load and Run E/A#3 DSK1.HGSCRLC. You can change scrolling direction (left/right) using the joystick. Note that it is possible to move outside of the map if you insist.

 

When exporting from Magellan, don't include character numbers. This will mess up the display since the numbers will be treated as pattern data. You don't need to generate scrolled character frames either (although I have included them here). My code (HSCRL routine) will scroll the patterns for you while they are uploaded to VDP RAM, and leaving the scrolled patterns out will save a lot of CPU RAM. For demonstration I have included another routine (CPYPAT) that simply copies the scrolled patterns generated by Magellan to VDP RAM. You can try that if you like, but for future work I suggest to use the HSCRL routine and exclude the scrolled patterns from the Magellan export.

 

I don't know how important performance is for you? This demo is using up to about 40% of a 60Hz screen update cycle. It's the same algorithm I used for TI Scramble. It could be made somewhat more efficient by moving central copying loops (VMLW, VMLWH) into scratch pad. And if you have enough RAM to spare you can make two copies of you map (one with the most significant bit set) and reduce it to use only about 20% of a cycle by eliminating the slow VMLWH.

 

The source code is not that well documented, so please ask any number of questions you like.

 

HorizontalScroll.zip

  • Thanks 1
Link to comment
Share on other sites

That is a cool demo..

 

I was thinking of doing a racing game.. ( intellivision Auto Racing style )

 

Car is fixed position ( rotates ) but the course would scroll in required directions.

 

I guess, I would need a scroll engine that allows me to build maps.

 

To Dream!

 

It's possible, but the graphics would have to be very simple. Try to make a mock-up of your map in Magellan and we can discuss how to scroll it...

Link to comment
Share on other sites

Wow :-o !

Just saw this on Classic99. A big thank you for your invested time, effort and help.

Will try to investigate the code and understand what is happening. I have some assembler experience, but not too much yet.

I agree that Graphic Mode I is capable of even doing a sidescroller like this and beats bitmap mode by keeping memory requirements low.

Today I spent time to rework the Graphics to further avoid the horizontal color limits and get a better look.

Link to comment
Share on other sites

Some more examples of smooth scrolling on MSX1/V9918

 

Princess Quest (vertical and horizontal):

http://www.youtube.com/watch?v=mPQ3PsrqpeU

 

Pippols by Konami:

http://www.youtube.com/watch?v=y2se7byPKjA

 

Theseus by ASCII:

http://www.youtube.com/watch?v=k73p_KP0em4

 

Crusader:

http://www.youtube.com/watch?v=ZruRcSKsJPQ

 

Circus Charlie (uses some sprites overlay in some areas to hide scrolling glitches):

http://www.youtube.com/watch?v=Now42DgefPQ

 

Malaika:

http://www.youtube.com/watch?v=dH6gtS_2iGM

  • Like 1
Link to comment
Share on other sites

About msx1 scrolling, it is possible to have

- Sprites perfectly active (no cloning)
- Double buffering with two pages with 256 tiles per page

 

Try this rom on any msx emulator

 

https://sites.google.com/site/testmsx/Home/double-buffer-in-screen-2-on-msx/URIDx2.rom?attredirects=0&d=1

 

The trick is to use hybrid mode masking only colors.

 

When you mask only colors, you have:

2k color, masked for all charsets
2k pattern, not masked
2k pattern, not masked

 

You can have 2 such 6k banks, with 256 available chars.

 

VDP register setup for the two pages:

page0: color = &h0000, pattern = &h2000
page1: color = &h2000, pattern = &h0000

Each page takes 6K to be updated
All 32 sprites are available without cloning
The only side effect is that the top third of the screen cannot be used for tiles, as it hosts data for lower 2/3.
Here more details:
Edited by artrag
  • Like 2
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...