Jump to content

Photo

New Multiplayer Atari 2600 Emulator


101 replies to this topic

#26 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Thu Apr 26, 2012 2:26 PM

I use "32kSC" in the game code, but I'm not sure what the official method is called. It might be F4SC, but maybe someone with more brains can verify that.

Sure, it's attached. It displays "480 colors" by mixing the 128 NTSC color palette. I think I was wrong about the illegal opcodes-- I forgot that I call the "SLEEP" macro to sleep for an odd number of cycles, which means (since I didn't include the "no illegal opcodes" option) that it uses at least one illegal opcode.


Guys I have released version 1.01 of the emulator with better support for batari ROMs.
Your ROMs should work now!
Could you guys test them please?

Regards,
Peccin

#27 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,455 posts
  • Location:Georgia, USA

Posted Thu Apr 26, 2012 6:52 PM

Yes, it works better with my 480 colors ROM-- but there still seems to be a glitch, because the left and right sides of the display are dark blue or dark purple-blue and they should be gray. I'm using the playfield and the ball to cover up the background color at the left and right edges of the screen so I can make the grid look ideally-spaced, and the playfield and ball should be gray but they're dark blue/purple-blue, therefore the glitch seems to have something to do with the COLUPF register-- or maybe it's because I set the COLUPF at the beginning of the program and don't keep setting it again on each frame, and somehow the color of the playfield and ball is getting wiped out after the program starts. The same ROM runs perfectly in Stella, so I know the program isn't wiping out COLUPF, but I'll check my program's source to see if I can figure out what might be happening.

#28 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 25,118 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Apr 26, 2012 7:49 PM


I use "32kSC" in the game code, but I'm not sure what the official method is called. It might be F4SC, but maybe someone with more brains can verify that.

Sure, it's attached. It displays "480 colors" by mixing the 128 NTSC color palette. I think I was wrong about the illegal opcodes-- I forgot that I call the "SLEEP" macro to sleep for an odd number of cycles, which means (since I didn't include the "no illegal opcodes" option) that it uses at least one illegal opcode.


Guys I have released version 1.01 of the emulator with better support for batari ROMs.
Your ROMs should work now!
Could you guys test them please?

Regards,
Peccin


Thanks. I was out most of the day, so I have to get some sleep now. I'll try it as soon as I wake up.

#29 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Thu Apr 26, 2012 10:11 PM

Yes, it works better with my 480 colors ROM-- but there still seems to be a glitch, because the left and right sides of the display are dark blue or dark purple-blue and they should be gray. I'm using the playfield and the ball to cover up the background color at the left and right edges of the screen so I can make the grid look ideally-spaced, and the playfield and ball should be gray but they're dark blue/purple-blue, therefore the glitch seems to have something to do with the COLUPF register-- or maybe it's because I set the COLUPF at the beginning of the program and don't keep setting it again on each frame, and somehow the color of the playfield and ball is getting wiped out after the program starts. The same ROM runs perfectly in Stella, so I know the program isn't wiping out COLUPF, but I'll check my program's source to see if I can figure out what might be happening.


Please tell me, which color number you are setting to COLUPF?

I did a trace in the emulator, and COLUPF is being set 3 times at the beggining:
$00
$00
$80 - and then its not set anymore.

So the color is $80, and in my palette its a blue! :-)

Something must be wrong in my palette... or maybe there is a bug somewhere thats making the number be $80.
Do you set it literally, or is it a result of some computation? BCD mode?

I'm afraid it could be a bug in the processor instructions... But a bug like this would have produced severe results before...

Peccin

#30 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 25,118 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Apr 27, 2012 2:25 AM

I tried Seaweed Assault. The game sounds great and is mostly working great. Problem is that the health bar on the bottom left is a little messed up and so is the score once you start shooting bits of seaweed.

#31 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Fri Apr 27, 2012 11:42 AM

I tried Seaweed Assault. The game sounds great and is mostly working great. Problem is that the health bar on the bottom left is a little messed up and so is the score once you start shooting bits of seaweed.

Yes I noticed that... I have no idea why though.... :-)
Regarding the score, its very strange. The numbers are like "rolling" just like in a gas station pump, you know what I mean? I almost thought that was somehow intentional.

Peccin

Edited by Paulo Peccin, Fri Apr 27, 2012 11:42 AM.


#32 RevEng ONLINE  

RevEng

    River Patroller

  • 3,435 posts
  • bit player
  • Location:Canada

Posted Fri Apr 27, 2012 6:25 PM

The numbers are like "rolling" just like in a gas station pump, you know what I mean? I almost thought that was somehow intentional.


The "gas pump" part is intentional, but the numbers displayed by the bB 6-digit score routine aren't correct. Check out the attached binary, which displays "012345" on real hardware and in stella, but "010305" in your emulator.

Attached File  012345.bin   4KB   62 downloads

That aside, excellent work!

#33 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 25,118 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Apr 27, 2012 7:04 PM

Here are two screenshots that show the messed up health bar on the left and the odd-looking score:

seaweed01.png

seaweed02.png

#34 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,455 posts
  • Location:Georgia, USA

Posted Fri Apr 27, 2012 8:28 PM

Please tell me, which color number you are setting to COLUPF?

I did a trace in the emulator, and COLUPF is being set 3 times at the beggining:
$00
$00
$80 - and then its not set anymore.

The first two times must be where batari Basic's startup code is initializing the page zero locations. It should be getting set only once during the initialization, but due to the way the TIA write addresses are mirrored it ends up getting set twice-- once by writing to address $08, and again by writing to address $48.

The third time is where my code is setting it. I'm actually setting it to $08, which is gray-- except, looking at my code I see that the # pound sign got left off, so it's setting COLUPF to the value in INPT0 rather than #$08 as I had intended. I never caught that "zero page load error" bug in my code before because whenever I run the ROM in Stella-- and also when I run it on my 7800 and 2600 with my Cuttle Cart 2 and Krokodile Kart-- it displays gray as I had expected.

#35 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Fri Apr 27, 2012 9:29 PM

Here are two screenshots that show the messed up health bar on the left and the odd-looking score:

seaweed01.png

seaweed02.png


I don't know if I understood it correctly. Is the "gas pump" effect intentional or not?
Is it displaying the wrong digits altogether or is it only the "rolling" that should not occur?

Peccin

#36 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 25,118 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Apr 27, 2012 9:40 PM

I don't know if I understood it correctly. Is the "gas pump" effect intentional or not?
Is it displaying the wrong digits altogether or is it only the "rolling" that should not occur?


I'm not seeing a rolling gas pump effect on my computer. I just get those weird dots and lines above the second number from the right (as seen in the screenshots when you click on them).

Here is a YouTube video that someone made of an old version of Seaweed Assault:

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

The score should look like that.

#37 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Fri Apr 27, 2012 9:44 PM

The first two times must be where batari Basic's startup code is initializing the page zero locations. It should be getting set only once during the initialization, but due to the way the TIA write addresses are mirrored it ends up getting set twice-- once by writing to address $08, and again by writing to address $48.

The third time is where my code is setting it. I'm actually setting it to $08, which is gray-- except, looking at my code I see that the # pound sign got left off, so it's setting COLUPF to the value in INPT0 rather than #$08 as I had intended. I never caught that "zero page load error" bug in my code before because whenever I run the ROM in Stella-- and also when I run it on my 7800 and 2600 with my Cuttle Cart 2 and Krokodile Kart-- it displays gray as I had expected.


WOW! This is getting interesting!
You mean that you get $08 by reading from INPT0 in real hardware, but get $80 in my emulator???

Thats funny, since only bit 7 from INPT0 should have meaning, right! How could I know what to read from INPT0 in bits 6-0? And without paddles connected...
Even with "correct" values for bit 7, you would end up reading $00 not $08.
Any suggestions?

Crazy stuff! (and lots of fun!)

Peccin

#38 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Fri Apr 27, 2012 11:29 PM

I'm not seeing a rolling gas pump effect on my computer. I just get those weird dots and lines above the second number from the right (as seen in the screenshots when you click on them).


Those dots and lines are the bottom part of the next digit. Thats why RevEng and I thought it were an intentional "gas pump" effect.
I don't know why yet. Something is wrong with the P0 part of the score digits.

Incredible how batari ROMs are good at showing emulation glitches! :-)

Peccin

#39 RevEng ONLINE  

RevEng

    River Patroller

  • 3,435 posts
  • bit player
  • Location:Canada

Posted Sat Apr 28, 2012 4:48 AM

Ok, I misunderstood what the "gas pump" effect was until RT posted his screenshot... Just guessing, but it sounds like there could be something off in your VDELP0/1 handling.

#40 stephena OFFLINE  

stephena

    River Patroller

  • 2,535 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Sat Apr 28, 2012 8:19 AM

It's good to see someone else interested in 2600 emulator development. But I have to ask, why didn't you consider collaborating on the Stella project? I've been asking for help and feedback for years now, and the duplication of effort seems to be somewhat of a waste. But it's good what you've accomplished so far.

#41 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Sat Apr 28, 2012 10:03 AM

It's good to see someone else interested in 2600 emulator development. But I have to ask, why didn't you consider collaborating on the Stella project? I've been asking for help and feedback for years now, and the duplication of effort seems to be somewhat of a waste. But it's good what you've accomplished so far.


Thanks stephena! I understand your point.
I started this project during a "sabbatical" period last year. I was a little tired of my job (basically management), and wanted to get my hands dirty again. I wanted to program something funny, and at the same time learn some Java. So I chose something that I had always wanted do make: an Atari emulator. It was a very good challenge, and I spent a little more than a month doing it and had a lot of fun.
I did it just for the pleasure, for the challenge and for the learning. I was so motivated and focused in doing it completely from scratch that I did not even run other emulators during development, nor used any library or engine. I did all simply by reading the tech specifications and by playing with a real 2600 and some carts that I have since 1984.

Then I showed it to my friends and they told me I had to publish it.

I respect Stella very much and would never intend to compete with it. Its a much more evolved and mature project than mine.
javatari is just another option, some Java code for people who like to learn, with still much to evolve.

Have you tried it?
Try multiplayer mode in a local network. Your feedback would be much appreciated!

Regards,
Peccin

#42 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,455 posts
  • Location:Georgia, USA

Posted Sat Apr 28, 2012 5:26 PM

You mean that you get $08 by reading from INPT0 in real hardware, but get $80 in my emulator???

Thats funny, since only bit 7 from INPT0 should have meaning, right! How could I know what to read from INPT0 in bits 6-0? And without paddles connected...
Even with "correct" values for bit 7, you would end up reading $00 not $08.
Any suggestions?

I don't understand it well myself, but there was a discussion of the "zero page load error" a few years ago. This refers to accidentally leaving off the # in a load instruction so you end up loading a value from page zero instead of an immediate value. Sometimes you get the results you were expecting-- which makes it harder to spot that the source code has a bug in that instruction-- or the results might be obviously wrong (different than expected). I think in cases where the address being read has only 1 or 2 connections to the data lines (on the TIA chip only D6 and D7 are bidirectional), there's a chance that the remaining bits will retain their 0 or 1 settings from when the address to be read was fetched by the CPU, or something like that. So if INPT0 is connected only to D7, the result of reading INPT0 could be %X0001000, where X is replaced by a 1 or 0 depending on what was read, and D0 through D6 retained their values from the address to be read ($08). But as I understand it, this isn't always the case.

#43 toymailman OFFLINE  

toymailman

    River Patroller

  • 2,034 posts

Posted Sat Apr 28, 2012 6:09 PM

I respect Stella very much and would never intend to compete with it. Its a much more evolved and mature project than mine.
javatari is just another option, some Java code for people who like to learn, with still much to evolve.

Something I have always hoped for is a multiplayer Stella. Can you help to incorporate this feature into Stella? Is there a way you can take what you learned to improve Stella in any other way? Just some thoughts.

#44 Keatah OFFLINE  

Keatah

    Quadrunner

  • 7,980 posts

Posted Sun Apr 29, 2012 2:55 PM

I like the idea of the simulated control panel. Can we have a 6-switch version? I always hated the small black difficulty switches.

I too would like to see a de-duplication of efforts. All we really need is one or two emulators at most!

Edited by Keatah, Sun Apr 29, 2012 2:56 PM.


#45 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 25,118 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Apr 29, 2012 10:04 PM

I too would like to see a de-duplication of efforts. All we really need is one or two emulators at most!


I'm glad he made this version since it will be able to work online and the sound isn't screwed up like it is in JStella.

#46 Pioneer4x4 OFFLINE  

Pioneer4x4

    River Patroller

  • 2,014 posts
  • Atari + R.O.B. = Completed
  • Location:PA

Posted Mon Apr 30, 2012 4:59 AM

I like the idea of the simulated control panel. Can we have a 6-switch version? I always hated the small black difficulty switches.

While I woulnd't say hate, I do agree. 6 switch all the way.

#47 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Mon Apr 30, 2012 12:45 PM

Something I have always hoped for is a multiplayer Stella. Can you help to incorporate this feature into Stella? Is there a way you can take what you learned to improve Stella in any other way? Just some thoughts.


Yes, maybe it could be ported, but I'm not sure. The platforms are totally different, and probably the emulation strategies can also be very distinct.

Regarding the six switch panel version, I could try that... After I'm done with "more urgent" matters.... :-)

SeaGtGruff: thanks for the explanation. I think I get what you are saying, but I have decided not to replicate this "phenomenon" right now. So your ROM, for example, will work ok but with the lateral borders black, as you will read $00 from INPT0 instead of $08.
For me it sounds like a "bug" that should be detected and corrected.

You guys think that many ROMs/games will rely on this "zero page load error?

Peccin

#48 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,455 posts
  • Location:Georgia, USA

Posted Mon Apr 30, 2012 9:43 PM

SeaGtGruff: thanks for the explanation. I think I get what you are saying, but I have decided not to replicate this "phenomenon" right now. So your ROM, for example, will work ok but with the lateral borders black, as you will read $00 from INPT0 instead of $08.
For me it sounds like a "bug" that should be detected and corrected.

You guys think that many ROMs/games will rely on this "zero page load error?

It is a bug, and I've corrected it and recompiled my program, so it works correctly now in your emulator. I don't think any games "rely" on it, because it really is a bug, and as such it needs to be identified and corrected whenever it occurs. If I remember correctly, batari even wrote a utility that would scan a ROM and search for these errors, since they can be hard to catch otherwise due to the way they often "work correctly" in emulators or on some machines. But since the behavior isn't always consistent, a program should never intentionally include a "zero page load error."

#49 Rom Hunter OFFLINE  

Rom Hunter

    VCS Games Archivist

  • 8,167 posts
  • Obtainer of Rare Antiquities

Posted Tue May 1, 2012 3:31 AM

If this is going to be any better than the Java based emulator we use in our database, then perhaps it would be an idea to incorporate it into Atarimania.

Would you like this idea, Paulo?

I don't have the technical knowledge to confirm that it's indeed a better alternative than what we use, but perhaps you guys can tell me more about that.

8)

#50 Paulo Peccin OFFLINE  

Paulo Peccin

    Chopper Commander

  • Topic Starter
  • 111 posts
  • http://javatari.org
  • Location:Sao Paulo - Brazil

Posted Tue May 1, 2012 10:20 AM

Would you like this idea, Paulo?


Yes I like the idea! Thanks for considering this.

I don't know exactly which emulator you are using now (JStella, I suppose). In fact, I don't know much about other emulators. Javatari is my first try at developing an emulator, and I did it without much (if any) knowledge about what has already been around.
I did not even know about Atarimania. Incredible site, by the way! Congratulations.

What I know is that javatari still has several limitations that, for now, would be unacceptable to you.
It still does not support all types of bankswitching, and the automatic detection for the various schemes is still poor.
5 days ago it still did not even had support for illegal opcodes and batari ROMs... But it does now, I guess! :-)

It has some potential and interesting concepts, like the multiplayer mode, but it is not much "plug and play" yet.
You still cannot simply throw any ROM at it.
So, for now, I think we would better wait.

But this is the motivation I need to continue evolving the emulator. Thank you very much.
If I have the time to keep working on it, we can achieve what you need.

Which problems are you having with your current emulator?

Thanks,
Peccin

Edited by Paulo Peccin, Tue May 1, 2012 10:21 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users