Jump to content
Asmusr

F18A Zaxxon demo

Recommended Posts

Rasmus, you misunderstand. I don't feel that I to have to say that, it is just my feeling. Since 10 years on AtariAge, I think that I had said three times my preference for the 9918A rather than the F18A (but I have absolutely nothing against this VDP), each time I saluted your great work.  Clearly these messages seems to be against the tide and stayed in some minds ^_^
I already saluted your work on this this Zaxxon demo, and I don't doubt that you make miracles in it with the powerful F18A (and you push it to its limits. I am sincerely happy with that.
I am just a TI-99/4A and year 80 hardware nostalgic, and when I see a recent program that push its limits, I can't help thinking what my reaction could have been if this program was unveiled in years 80. Here is what is impress me.
Mizapf has well understood one of my thoughts. At a time, I was worried, I thought that new software developments were slowly going to forget the original hardware of the 99/4A , but we have the proof that it is not the case. So, I am happy that everybody can find its pleasure in all the new developments 🙂

  • Like 6

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, Asmusr said:

Or actually I would scroll the name table for every 16 frames, 2 characters left and one down, at which point I would move reset the scroll registers. If I masked the top row I could get away with a single page name table, but I won't go down that road until I need the extra RAM.

Actually I don't need to scroll the name table at all. I can just draw a column in the masked area and keep updating the scroll registers, and because the screen wraps it works just like that. I already changed the code. Thank you to @FarmerPotato for putting me on the right track.

 

Edit: now the VDP memory map looks like this, with room for 64 sprite patterns:

nametb equ  >0000                      ; Name table base
namet0 equ  >0000                      ; Name table page 0 (64 bytes free)
tilatb equ  >0400                      ; Tile attribute table
spratb equ  >0500                      ; Sprite attribute table (640 bytes free)
namet1 equ  >0800                      ; Name table page 1 (64 bytes free)
nam2tb equ  >0c00                      ; Name table 2 base (64 bytes free)
ptrntb equ  >1000                      ; Pattern table base
ptrnt0 equ  >1000                      ; Pattern table plane 0
ptrnt1 equ  >1800                      ; Pattern table plane 1
ptrnt2 equ  >2000                      ; Pattern table plane 2
sprptb equ  >2800                      ; Sprite pattern table base
sprpt0 equ  >2800                      ; Sprite pattern table plane 0
sprpt1 equ  >3000                      ; Sprite pattern table plane 1
sprpt2 equ  >3800                      ; Sprite pattern table plane 2

 

Edited by Asmusr
  • Like 6

Share this post


Link to post
Share on other sites
9 hours ago, fabrice montupet said:

Rasmus, you misunderstand. I don't feel that I to have to say that, it is just my feeling. Since 10 years on AtariAge, I think that I had said three times my preference for the 9918A rather than the F18A (but I have absolutely nothing against this VDP), each time I saluted your great work.  Clearly these messages seems to be against the tide and stayed in some minds ^_^
I already saluted your work on this this Zaxxon demo, and I don't doubt that you make miracles in it with the powerful F18A (and you push it to its limits. I am sincerely happy with that.
I am just a TI-99/4A and year 80 hardware nostalgic, and when I see a recent program that push its limits, I can't help thinking what my reaction could have been if this program was unveiled in years 80. Here is what is impress me.
Mizapf has well understood one of my thoughts. At a time, I was worried, I thought that new software developments were slowly going to forget the original hardware of the 99/4A , but we have the proof that it is not the case. So, I am happy that everybody can find its pleasure in all the new developments 🙂

It's great that you no longer feel worried. Then we won't need this discussion again.

  • Like 2

Share this post


Link to post
Share on other sites

Dear god, first was the rxb vs omega-ti wars, now its going to be the fabrice montupet vs asmusr wars?
Can't we all just get along?

Share this post


Link to post
Share on other sites
On 3/3/2021 at 9:31 PM, wierd_w said:

the approach I would investigate first, is creative use of mirrored, or rotated data in the sprite definitions, to get "not easily noticed" edits of the graphic data, so that repetition/consolidation of the data can be increased.

Yes. The F18A can mirror sprites both vertically and horizontally by setting bits in the 4th attribute byte. If I run out of patterns again, I'm going to use that approach for something like this explosion where you would hardly notice if the left and the right sides were mirrored. 

image.png.00b4d99cf8eb937479f46231af6f06f0.png

  • Like 1

Share this post


Link to post
Share on other sites

And another thing the F18A can do is to magnify individual sprites, so you could produce a fake 32x32 sprite from a single 16x16 pattern if you run out of patterns or sprites.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

This is the sprite sheet with what I consider the 64 most important 16x16 patterns for the first level. Note that the brick wall also exists as a sprite to allow the plane to fly behind it. Actually the F18A allows you to specify that specific characters/tiles should be displayed in front of sprites, but considering the already complex dynamic loading of the background characters, I don't think I will try to use that feature (edit: it would be great for a version of Commando).

 

sprite-sheet.png.4e5e6792fbe3b82232fb7ad1a18555bf.png

 

The pattern for the plane will have to be updated on the fly because it has 22 different patterns of its own, but that should be simple enough since there is always exactly one plane. For that I will probably borrow from The Mole's idea of compressing the patterns, storing them in the 2K extra VDP RAM, and using the GPU to update the live pattern.

 

Edit: Forgot to say that my next task will be to write some code to assign a palette of 8 colors to each of these 64 patterns in the most optimal ways. The background tiles are using 2 of the 8 palettes, and the tile layer 2 mask is using one, so I have at most 5 palettes left for the sprites. They are using 23 colors in total so it should be doable, but the colors may end up changing slightly. 

Edited by Asmusr
  • Like 10

Share this post


Link to post
Share on other sites

I did not realize Zaxxon was such a beast.  I need to go look at the schematics to see what the hardware was capable of doing.  Zaxxon was released in1982, so the computer had to have been designed in 1980 or 1981, which puts it right in the golden era.

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, matthew180 said:

I did not realize Zaxxon was such a beast.  I need to go look at the schematics to see what the hardware was capable of doing.  Zaxxon was released in1982, so the computer had to have been designed in 1980 or 1981, which puts it right in the golden era.

Apparently its capability for isometric perspective meant that it could transform a tile map like this into what we see in the game.

level1-org.thumb.png.4dc152fbbb082d6d0f464fb19998082d.png

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

It looks like every two scan lines are shifted by 1 pixel.  I will have to write a test program to do that and see what it looks like.

 

Edit:

Remember, these original computers running the arcade games were computers built with TTL-logic chips and 8-bit CPUs (mostly).  There will be limits to the complexity of what they were doing, and mostly limited to features you can achieve with bit-shifts, lookup tables, number flipping (to flip the display, for example), and counters.  Most of the video subsystems were just hardware support for addressing ROM and drawing the pixels, or taking sprite location information and drawing those at the right time.

 

I looked at the Zaxxon schematic last night.  It uses a single Z80 CPU and has a lot of ROM.  I did not decode the video circuits, but it did not look like anything too different from other arcade computers of the time.  I think what I mentioned originally will be pretty close to what the hardware offers as a built-in feature.

 

When I look at a screen shot of the original game compared to the image you posted, the vertical pixels are all still vertical, but the horizontal pixels become offset lines, which suggests a horizontal skew for every scan line or two, with a vertical scroll to achieve the effect.  Keep in mind, the original game has a vertical screen orientation.

Edited by matthew180
Additional thoughts
  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)
On 3/5/2021 at 7:08 PM, Asmusr said:

Forgot to say that my next task will be to write some code to assign a palette of 8 colors to each of these 64 patterns in the most optimal ways. The background tiles are using 2 of the 8 palettes, and the tile layer 2 mask is using one, so I have at most 5 palettes left for the sprites. They are using 23 colors in total so it should be doable, but the colors may end up changing slightly. 

It's an interesting challenge: given an image like this that you have to represent as sprites, and a limited number of palettes of 8 colors, how do you select the most optimal colors for each palette and the most optimal palette for each sprite?

Only people interested in retro computers care about this with respect to images, because images with palettes are a thing of the past.

The error function that has to be minimized is the color distance between each pixel in the original image and the image after the palettes have been selected. However, iterating through all the possibilities would be an enormous task.

I have already developed a heuristic for importing a sprite image into Magellan that works quite well, but I would be interested in suggestions for optimizations. My heuristic works like this:

  • For each sprite in the image: calculate the optimal palette (clamped at 8 colors).
  • Check if an existing palette contains the colors of the optimal palette. If yes use that palette.
  • If not, check if there is space in an existing palette for the optimal palette. If yes copy the colors into that palette.
  • If not, create a new palette if more palettes are available.
  • If not, find the existing palette that is the best fit and use that.

A major problem is that the order in which the sprites are processed determines which palettes are created first. But the entire image would have to be taken into account in order to determine the ultimate palettes.  

 

sprite-sheet.png

Edited by Asmusr
  • Like 3

Share this post


Link to post
Share on other sites

Ideally, if you could process your entire sprite sheet at once then you could take advantage of popularity and such. :)

 

Beyond that, no real suggestions.

 

Share this post


Link to post
Share on other sites

Think you could get this job.  I applied as a kid and never heard back....

 

image.thumb.png.78cecd06457e768c65ec2a2beb5df0b0.png

  • Like 4
  • Haha 1

Share this post


Link to post
Share on other sites
On 3/5/2021 at 8:08 PM, jrhodes said:

Dear god, first was the rxb vs omega-ti wars, now its going to be the fabrice montupet vs asmusr wars?
Can't we all just get along?

 

On 3/5/2021 at 9:28 PM, fabrice montupet said:

War??? There's no war! I appreciate a lot Rasmus and his work! I think that I have said it at many times :-)

 

I have many retro computers now. My first computer was a Ti994a, the next an Amiga 500, then once this bug bit starting early 2010's I acquired many more including Atari 2600 and 65XE, C64's, Spectrum +2, Amstrad CPC464, VIC20, PLUS4, Apple IIe

as well as lots of pc hardware.

 

You wanna know which one gets the 1st place Award for Wars starting amongst its followers,  it would have to be the Amiga. I don't think I'm exaggerating when I say it can get as bad as death threats.

Of course the Amiga itself is not to blame here, just some bad eggs ruining the fun for others.

 

In comparison just about every other retro community I have been a part of is 99% very friendly and just an occasional disagreement here and there.

 

Thanks Rasmus and all other Ti programmers for the wonderful miracles that have been performed on a computer that without You would still only have the

handful of games and tools available (compared to many other systems) that were around in 1984.

 

 

  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks @Asmusr for creating yet another amazing demo! I actually dusted my Amiga 1200 just a couple of weeks ago to try out Zaxxon on it, that was amazing. Even more amazing was to see you create the Zaxxon demo almost immediately after I did my trip on the memory lane.

 

While I think it's interesting to see what can be done with the original hardware and within its limits, I think it is equally if not more interesting to see how modern additions can bring the platform forward. The reason I created first my TMS99105 and FPGA versions of the TI-99/4A was not to recreate the original, but to see how the machine would feel if some of the original limitations were removed. In my thinking the reasons for limitations back in the day being driven by cost, strategic and design choices. Those limitations and design choices give the computer its character, but also make me feel that the computer is driving with handbrake on.

 

What keeps me interested in the TI-99/4A hobby is all the great work the community here is doing with the 99/4A, and the new software and hardware being made available. 

Edited by speccery
  • Like 4

Share this post


Link to post
Share on other sites

Latest version of the demo attached. Don't expect a lot of changes, but the number of sprites on screen can now exceed 32. 

zaxxon8.bin

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

Rasmus, do you use a C cross-compiler to make your games or do you program in straight assembly? You ability to churn out amazing software is bewildering...

  • Like 2

Share this post


Link to post
Share on other sites
4 hours ago, Vorticon said:

Rasmus, do you use a C cross-compiler to make your games or do you program in straight assembly? You ability to churn out amazing software is bewildering...

I program in straight assembly. The difficulty of setting up GCC on Windows means that I have never really investigated that option. But I probably wouldn't switch anyway since I like assembly and the control it gives you.

  • Like 7

Share this post


Link to post
Share on other sites
5 hours ago, Vorticon said:

...Your ability to churn out amazing software is bewildering...

I concur. One of  the  legendary 10X programmers perhaps.

It's a joy to behold.

 

  • Like 1

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