Jump to content
IGNORED

Why can't the Atari 2600 display better graphics?


pojr

Recommended Posts

I guess I never should say never. :)

 

After some more thinking and experimenting, I managed to create CX-80 and Amiga Mouse versions too! I also changed the CX-22 version to use the same code.

 

For those who are interested, here is the main kernel code:

; this polls the trackball every 9 scan lines:
    lda    SWCHA                ; 4
    lsr                         ; 2
    lsr                         ; 2
    lsr                         ; 2
    lsr                         ; 2
    tax                         ; 2
    clc                         ; 2 = 16
    ...
    txa                         ; 2
    ldx    lastTrack            ; 3
    sta    lastTrack            ; 3         0..15
    eor    NextTrackTbl,x       ; 4
    tax                         ; 2 = 14
    ...
    lda    diffXY               ; 3
    adc    AddTrackTbl,x        ; 4         adds $01 for X, $10 for Y
    sta    diffXY               ; 3
    lda    trackDir             ; 4         these are the lower 4 bits of SWCHA!
    ora    DirTrackTbl,x        ; 4         sets direction bits for X and Y
    sta    trackDir             ; 4 = 22    
It is not most efficient in ROM, but it can be spread over multiple scan lines, only uses 20 bits of RAM and works for all three supported controllers. SWACNT is set to %00001111 to be able to use the lower 4 bits as RAM replacement.

 

The resulting positions are updated outside the kernel based on diffXY and trackDir.

 

 

Assuming someone wishes to use an Atari ST mouse instead, they should use the CX-80 version, right?

Link to comment
Share on other sites

If you are using the lower 4 bits of SWCHA for ram just be careful, as from memory a high output can still be pulled down by a joystick. Might not matter in this case. Again thats from memory.

Yes, I think you are right. I could use the 4 unused bits from SWCHB instead... :ponder:

 

Yup, that works too.

Edited by Thomas Jentzsch
Link to comment
Share on other sites

Yes, I think you are right. I could use the 4 unused bits from SWCHB instead... :ponder:

 

Yup, that works too.

SWCHB has 3 unused bits. For the 4th bit maybe you can SEI, CLI. Should be okay for the 2600, but I can't speak for all of the clones.

 

I wouldn't use any of the Difficulty switches, BW/Color switch etc... for the 4th bit, because depending on the switch position you could have a short to ground while driving the output high.

Link to comment
Share on other sites

I guess I never should say never. :)

 

After some more thinking and experimenting, I managed to create CX-80 and Amiga Mouse versions too! I also changed the CX-22 version to use the same code.

 

Awesome work! FWIW, I ended up using the CX-22 version with my CX-80, as the CX-80 version didn't seem to work right... *confused*

 

... And now my 8yo is playing it, instead of going to bed. ;)

post-3025-0-34843400-1441860052_thumb.jpg

Edited by billkendrick
Link to comment
Share on other sites

 

Awesome work! FWIW, I ended up using the CX-22 version with my CX-80, as the CX-80 version didn't seem to work right... *confused*

 

... And now my 8yo is playing it, instead of going to bed. ;)

 

There's 2 different types of CX-80s. Yours, the first type, operates like a CX-22. The later works, well, like a CX-80. So if you get 2600 Missile Command-TB either in cart or ROM form, use the CX-22 version.

Link to comment
Share on other sites

 

Awesome work! FWIW, I ended up using the CX-22 version with my CX-80, as the CX-80 version didn't seem to work right... *confused*

 

... And now my 8yo is playing it, instead of going to bed. ;)

 

My CX-80 works like a CX-22 as well, appears to be a common thing.

 

I need to clean mine, movements not always smooth. Didn't see an obvious way to open it, probably screws under the rubber feet or something.

Link to comment
Share on other sites

 

My CX-80 works like a CX-22 as well, appears to be a common thing.

 

I need to clean mine, movements not always smooth. Didn't see an obvious way to open it, probably screws under the rubber feet or something.

 

So…what's the theory then… The later CX-80s that don't behave like CX-22s are the result of Atari Corp modding them to behave like ST mice and that Atari Inc had nothing to do with them behaving differently prior to July 1984?

 

Corp certainly didn't get Dan Kramer to mod them during that time. He was working on SECAM versions of the XL line before he quit Corp a few months after the "takeover".

Edited by Lynxpro
Link to comment
Share on other sites

 

So what's next, Thomas and OmegaMatrix? You guys going to do the formerly impossible and hack/improve Millipede, Crystal Castles, or Reactor for Trak-Ball support? :)

I'm taking a stab at Millipede (Atari). So far I've found the cycles I need, but it's not quite there yet as one of the PF2 writes is no longer at the correct cycle (48). So more shuffling is needed. I also haven't looked at all at the routine that positions the Millipede. I want to get another sample in there so that it is consitent. Then I have to add the 1 page LUT. If I had some cycles I could do some shifting and greatly reduce the table. As it is I was barely able to find the 22 cycles I needed, but even just 2 more cycles would be great (chops table in half). I'll keep trying. I wanted to expand the rom to 32kSC but I don't have cycles to bankswitch. So far everything I've looked at costs more cycles to decide on a path to load some values immediately vs lookup table.

 

More ram would make this trival as I could preload outside the kernel. Speaking of ram I still have to free some too. :ponder:

 

Haven't looked at Crystal Castles. I think that one has source code which makes things much easier.

  • Like 2
Link to comment
Share on other sites

I am working on Reactor. The kernel is a beast, took me a while to fully understand it. Now I have to rewrite large parts of the kernel to get the necessary cycles. Unlike Centipede, the extra RAM required seem to be no major problem. But I will probably have to optimize the code for space quite a bit.

 

BTW: How does arcade Reactor react to trackball input? It cannot be direct control like Missile Command or Centipede. There must be some momentum applied to the movement.

  • Like 2
Link to comment
Share on other sites

I'm taking a stab at Millipede (Atari). So far I've found the cycles I need, but it's not quite there yet as one of the PF2 writes is no longer at the correct cycle (48). So more shuffling is needed. I also haven't looked at all at the routine that positions the Millipede. I want to get another sample in there so that it is consitent. Then I have to add the 1 page LUT. If I had some cycles I could do some shifting and greatly reduce the table. As it is I was barely able to find the 22 cycles I needed, but even just 2 more cycles would be great (chops table in half). I'll keep trying. I wanted to expand the rom to 32kSC but I don't have cycles to bankswitch. So far everything I've looked at costs more cycles to decide on a path to load some values immediately vs lookup table.

 

More ram would make this trival as I could preload outside the kernel. Speaking of ram I still have to free some too. :ponder:

 

Haven't looked at Crystal Castles. I think that one has source code which makes things much easier.

 

How much of an increase of cart-based RAM would be needed? Isn't 2600 Millipede one of the carts that uses a SARA?

Link to comment
Share on other sites

I am working on Reactor. The kernel is a beast, took me a while to fully understand it. Now I have to rewrite large parts of the kernel to get the necessary cycles. Unlike Centipede, the extra RAM required seem to be no major problem. But I will probably have to optimize the code for space quite a bit.

 

BTW: How does arcade Reactor react to trackball input? It cannot be direct control like Missile Command or Centipede. There must be some momentum applied to the movement.

 

First of all, awesome news!

 

Do you have access to any of the arcade code? I'm going to go on a limb and assume the Parker Bros 2600 version is a 4K ROM and it doesn't contain any onboard RAM. What about bumping the ROM up to 8K or so for extra space, assuming that doesn't cause bankswitching issues or taxing the kernel?

Edited by Lynxpro
Link to comment
Share on other sites

Do you have access to any of the arcade code?

No, and currently don't have much access to the web at all. But if someone could check out the game on MAME, he could describe, how the ship reacts to mouse movements.

 

I'm going to go on a limb and assume the Parker Bros 2600 version is a 4K ROM and it doesn't contain any onboard RAM. What about bumping the ROM up to 8K or so for extra space, assuming that doesn't cause bankswitching issues or taxing the kernel?

Yes, the game is a stock 4K ROM. 8K would provide some easy ROM space, but that would also ruin a part of the challenge. :)

 

And it would not gain me any CPU cycles inside the kernel. So that rewrite has to happen anyway.

  • Like 1
Link to comment
Share on other sites

No, and currently don't have much access to the web at all. But if someone could check out the game on MAME, he could describe, how the ship reacts to mouse movements.

 

Yes, the game is a stock 4K ROM. 8K would provide some easy ROM space, but that would also ruin a part of the challenge. :)

 

And it would not gain me any CPU cycles inside the kernel. So that rewrite has to happen anyway.

 

It may ruin part of the challenge but at least moving to 8K wouldn't be "cheating" since other 2600 releases eventually did go to 8K. :) I briefly looked at the arcade original's specs and it certainly wasn't low-end equipment for 1982. Let's just say its ROM certainly wasn't 4K. :)

 

Can someone with trackball equipment and MAME assist Thomas by playing the arcade original? Or one with the actual cabinet? :)

Link to comment
Share on other sites

I made an error in my code. I was using an EOR shortcut to eliminate an AND table, but some of the AND values were zero and it doesn't work. Now I'm back to trying to find many cycles. My current thoughts are expand the rom and try to do another LUT for the indirect jumps. I want to load value directly wherever I can to save cycles. Problem is bankswitching adds a lot of cycles. I have a few ideas to try.

  • Like 1
Link to comment
Share on other sites

I guess I never should say never. :)

 

After some more thinking and experimenting, I managed to create CX-80 and Amiga Mouse versions too! I also changed the CX-22 version to use the same code.

 

I finally had the chance to test out the CX-22 version on my Cuttle Cart 2. Works great!

 

Unfortunately I couldn't test the CX-80 one because I have one of those strange CX-80s with the CX-22 innards.

 

Thanks Thomas!

Link to comment
Share on other sites

Ha! Well I didn't really have anything to do with Thomas's hack, but it's a nice touch iesposta.

 

I tried Millipede again on the weekend, but still no luck. Tough little bugger. I have a few more things to try. I have expanded bankswitching working and new indirect jumps in place. I'm just on edge for cycles, and there are a couple of bugs (at least) to work out.

Link to comment
Share on other sites

Ha! Well I didn't really have anything to do with Thomas's hack, but it's a nice touch iesposta.

 

I tried Millipede again on the weekend, but still no luck. Tough little bugger. I have a few more things to try. I have expanded bankswitching working and new indirect jumps in place. I'm just on edge for cycles, and there are a couple of bugs (at least) to work out.

Wasn't all that foreign language code you were passing around have one of your ideas responsible for making it possible? I must have misunderstood.

(If it was hard to find pieces of RAM, there sure was plenty of leftover ROM space, or ROM wasted on the previous programmer, because I see in the ROM the entire string of: "Centipede CX-22 Hack v1.1 (NTSC) © 2015 Thomas Jentzsch" lol !)

Link to comment
Share on other sites

Yes, ROM was no problem for Centipede. There are quite some unused areas and I found traces of Galaxian code/data. Probably the same EPROM was used for both games during development.

 

Also I found some (unused) data which also shows in Dig Dug and Millipede, but at completely different addresses. No clue what that means,

 

BTW: Reactor is THAT close! :)

  • Like 2
Link to comment
Share on other sites

Yes, ROM was no problem for Centipede. There are quite some unused areas and I found traces of Galaxian code/data. Probably the same EPROM was used for both games during development.

 

Also I found some (unused) data which also shows in Dig Dug and Millipede, but at completely different addresses. No clue what that means,

 

BTW: Reactor is THAT close! :)

That is amazing there are traces of other games code!

Although I do the same thing today in bB.

I'll take what works, change it with a new idea, comment out or move code I might need later.

 

I was just reintroduced to Arcade Reactor in a MAME cabinet with trackball.

I was so used to the Atari 2600 I forgot the original used a trak-ball.

Both versions are a strange game with great sound!

 

Thanks again for Centipede. It is so much better with trak-ball!

I would always skip it and play Millipede, but now Centipede will get regular play.

Link to comment
Share on other sites

That is amazing there are traces of other games code!

Although I do the same thing today in bB.

I'll take what works, change it with a new idea, comment out or move code I might need later.

I don't think those bytes came from assembling Centipede. They are just unused bytes. When you burn an EEPROM, those unused bytes are not overwritten (to save time). So when the same EPROM is used during development of different games, you can find those traces.

 

I was just reintroduced to Arcade Reactor in a MAME cabinet with trackball.

I was so used to the Atari 2600 I forgot the original used a trak-ball.

How does the arcade react to trackball input? Can you point the ship with it or are you giving it momentum in a direction? Or...?

 

I would always skip it and play Millipede, but now Centipede will get regular play.

I suppose you will skip again when Omegamatrix is done. ;)
Link to comment
Share on other sites

How does the arcade react to trackball input? Can you point the ship with it or are you giving it momentum in a direction? Or...?

 

I suppose you will skip again when Omegamatrix is done. ;)

I was trying to say even if both have trak-ball control, I will still play Millipede more, but Centipede is improved so much it will be played and not skipped.

Atari got the sound better in Millipede.

It is more harsh and annoying in Centipede.

 

Reactor control is the same as Centipede or Missile Command.

It just moves like a mouse pointer. No momentum in moving.

The particles you push and that bump into you slide your ship around.

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