Jump to content
IGNORED

JS7800: Atari 7800 JavaScript Emulator


raz0red

Recommended Posts

Hi all-

 

For the past several months I have been working on a JavaScript port of Wii7800, my Wii port of the ProSystem emulator. This really started out as an exercise to learn some newer web APIs, but has progressed to the point where I figured it is worth sharing. 

 

You can find it at the following location:

 

https://raz0red.github.io/js7800

 

It does not currently support mobile (something I plan to add in the future), and requires an updated version of a modern browser (Chrome, Firefox, Safari) on newer hardware to run without lags.

 

It also definitely lacks the accuracy of the latest 7800 emulators, such as the excellent A7800. This is something I also hope to work on integrating in the future. However it does include my Wii modifications to ProSystem, so it should support most cartridge formats, larger sizes, improved bank switching, updated header detection, improved Pokey support, partial XM support, etc.

 

Some of its features include:

 

  • Global high score support: For games that support the High Score Cartridge (HSC), I have set up a central server that will serve and persist high scores. Towards the end of the default cartridge list (below emulator), you will find a collection of excellent homebrew titles that support global high scores (grouped in the category, "High Score Compatible").  It is worth noting that not all variants of these cartridges are supported globally. This is due to the fact that the scoring models may have changed between releases. You can find a raw dump of the compatible cartridges, identified by MD5 hash, here.
  • USB Controller support: Modern controllers such as Xbox, Playstation 3 or newer, and Switch should work. Dual-analog controls are also supported for Robotron and TiME Salvo.
  • Customizable cartridge lists: By default, the cartridge list drop-down menu contains a collection of excellent homebrew titles. But, you can also define and share your own lists. I have documented the list format along with a step by step tutorial on the Wiki found here that shows how to create and share a list.
  • Drag-and-drop ROMs: You can drag-and-drop ROM links directly into JS7800 and they will load. As shown in the image below, a ROM link is being dragged from the AtariAge forum into JS7800 and loaded. It is also worth noting, that you typically need to start the drag on top of the download count (as shown below). This feature makes it pretty easy to navigate AtariAge and try the latest homebrew releases without downloading them directly. (JS7800 also supports drag-and-drop of local files)

 

draglink.gif

 

There is a "help/info" button located below the emulator that provides fairly detailed documentation. 

 

I also want to personally thank RevEng, PacManPlus, and mksmith for graciously answering all of my annoying questions. ?

 

Finally, I tried to contact most homebrew developers to obtain permission to include their ROMs in the default list of cartridges. However, if for some reason you do not want your title included, please just let me know. I will immediately remove it from the default list.

 

As this is fairly early, I am sure a number of defects exist. Please just let me know what is happening and I will try my best to address it.

 

Thanks a lot,

Chris

 

Edited by raz0red
  • Like 13
  • Thanks 4
Link to comment
Share on other sites

The online high score tables adds a new dimension... when someone bumps your high-score down in the table, it's motivation to come back and do the same to their score. Just like the good old days, at the arcade. :D

 

Great job, Chris! ?

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

31 minutes ago, RevEng said:

The online high score tables adds a new dimension... when someone bumps your high-score down in the table, it's motivation to come back and do the same to their score. Just like the good old days, at the arcade. :D

 

Great job, Chris! ?

Thank you very much, I really appreciate it! Also, thanks again for all the help.

 

Sadly, all my scores in Scramble have already been topped... ?

 

Chris

  • Like 1
Link to comment
Share on other sites

1 hour ago, Synthpopalooza said:

This has all the same POKEY emulation quirks as Prosystem... i.e. some things will work on it and not in A7800, and vice versa.

Yes, that is not too surprising. However, if you look at the code, you will see it is quite a bit different than the version that is part of the last ProSystem release (includes updates to Ron Fries PokeySound). Also, it adds support for RANDOM and POTS. The latter is needed to support the way a number of cartridges detect the presence of XM and Pokey chips. But, you are absolutely correct, the Pokey sound is far from perfect. 

 

Chris

 

  • Like 2
Link to comment
Share on other sites

One thing I have noticed, as a rule:  Any POKEY music relying on standard AUDCTL=$00 8-bit mode, or anything using 16-bit AUDCTL=$50 or $28, with the $Ax pure tone square setting, seems to be ok.  When you move into other settings ... it's hit or miss.  So I use A7800 and ProSystem both for testing my music.

  • Like 1
Link to comment
Share on other sites

35 minutes ago, Synthpopalooza said:

One thing I have noticed, as a rule:  Any POKEY music relying on standard AUDCTL=$00 8-bit mode, or anything using 16-bit AUDCTL=$50 or $28, with the $Ax pure tone square setting, seems to be ok.  When you move into other settings ... it's hit or miss.  So I use A7800 and ProSystem both for testing my music.

Ah, interesting, that is a really great insight. 

 

Just out of curiosity, have you heard of, or experienced similar issues with Pokey on Atari 8-bit computer emulators? The reason I ask is that it appears that most of the emulators out there leverage some variant of Ron Fries' PokeySound. If other emulators are not having the same issues, it is most likely an issue with the way PokeySound is being driven from ProSystem. Sorry if this has already been discussed previously. 

 

Thanks a lot,

Chris

Edited by raz0red
Link to comment
Share on other sites

Hey Chris...Thanks for offering this to the community.  The high score system being in place for people to literally compete globally is definitely a huge plus and the interface is quite nice.  

 

One item that needs considerable improvement though is the 'hot' palette it inherited from the ProSystem emulator. 

 

It contains many 'impossibles' with the handpicked values found within that palette; especially regarding the $1x, $Ex, $Fx ranges, the overall bright red look of $2x, $3x, $4x, a strong sudden ramp up of contrast or/and saturation in the middle of the luminance ramp for hues, among other oddities:

 

image.thumb.png.85d00a6ef125aa26d1f3123f48d6710f.png

 

A more feasible and in the 'realm of possibilities' color palette - striving for a 'hot' palette (~27.7 degree shift) - appears more like this:

 

7800HOT.thumb.PNG.eeda1c7bbd085144d7f9779dc0e558d1.PNG

 

Not sure, if there is an easy way to import a Prosystem *.pal file, or need the hex values in some other format, or something different altogether, but if interested and needed, I can contribute data.

  • Like 3
Link to comment
Share on other sites

2 minutes ago, Trebor said:

Hey Chris...Thanks for offering this to the community.  The high score system being in place for people to literally compete globally is definitely a huge plus and the interface is quite nice.  

 

One item that needs considerable improvement though is the 'hot' palette it inherited from the ProSystem emulator. 

 

It contains many 'impossibles' with the handpicked values found within that palette; especially regarding the $1x, $Ex, $Fx ranges, the overall bright red look of $2x, $3x, $4x, a strong sudden ramp up of contrast or/and saturation in the middle of the luminance ramp for hues, among other oddities:

 

image.thumb.png.85d00a6ef125aa26d1f3123f48d6710f.png

 

A more feasible and in the 'realm of possibilities' color palette - striving for a 'hot' palette (~27.7 degree shift) - appears more like this:

 

7800HOT.thumb.PNG.eeda1c7bbd085144d7f9779dc0e558d1.PNG

 

Not sure, if there is an easy way to import a Prosystem *.pal file, or need the hex values in some other format, or something different altogether, but if interested and needed, I can contribute data.

Wow, that is great! thanks for the feedback.

 

It would be great to work with you to integrate it. I will send you a PM and we will make this happen. I will also integrate it into the Wii port.

 

Thanks again,

Chris

  • Like 2
Link to comment
Share on other sites

This is going to come out of left field a bit - but is there any way your recent Prosystem source of the Wii Port can be folded into the Retroarch/libretro build? I love the fact that some kind soul ported prosystem into Retroarch, as it drives my PS3 and Retropie emulators, but it was ported from really old source code, like I think from Prosystem 1.3e or something. 
 

tl;dr version: 

 

Retroarch's current version of Prosystem doesn't have any of your awesome fixes, so if there's any way to patch that and submit it to their git, or maybe point me in the right direct as to how it differs - I would be eternally grateful. 

  • Like 1
Link to comment
Share on other sites

Also - the libretro git version Of Prosystem has the correct "hot" Trebor palette in it already, as part of the source code. (I ported it shortly after they added Prosystem to the official Retroarch build) So you could grab it from there and not have to manipulate all the values in a text editor.
 

https://github.com/libretro/prosystem-libretro

  • Like 1
Link to comment
Share on other sites

6 minutes ago, John Stamos Mullet said:

Also - the libretro git version Of Prosystem has the correct "hot" Trebor palette in it already, as part of the source code. (I ported it shortly after they added Prosystem to the official Retroarch build) So you could grab it from there and not have to manipulate all the values in a text editor.
 

https://github.com/libretro/prosystem-libretro

Great, thanks! I will check it out.

Link to comment
Share on other sites

21 minutes ago, John Stamos Mullet said:

This is going to come out of left field a bit - but is there any way your recent Prosystem source of the Wii Port can be folded into the Retroarch/libretro build? I love the fact that some kind soul ported prosystem into Retroarch, as it drives my PS3 and Retropie emulators, but it was ported from really old source code, like I think from Prosystem 1.3e or something. 
 

tl;dr version: 

 

Retroarch's current version of Prosystem doesn't have any of your awesome fixes, so if there's any way to patch that and submit it to their git, or maybe point me in the right direct as to how it differs - I would be eternally grateful. 

Sure, absolutely. Just send me a PM and we can figure out how to do that.

 

Thanks,

Chris

  • Thanks 1
Link to comment
Share on other sites

On 5/11/2020 at 7:33 PM, raz0red said:

USB Controller support: Modern controllers such as Xbox, Playstation 3 or newer, and Switch should work. Dual-analog controls are also supported for Robotron and TiME Salvo.

This is incredible! Just played a bunch of fav's with it! :) Thank you so much for creating this! People are awesome! 

 

Curious if there's any way to get paddles to work on this (e.g. Arkanoid, Super Circus Atari)? I have the "2600-dapter II" and was hoping there's a way!

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Kaboomer said:

Curious if there's any way to get paddles to work on this (e.g. Arkanoid, Super Circus Atari)? I have the "2600-dapter II" and was hoping there's a way!

Hi-

 

Thanks a lot for the kind words! Currently, there is not a way to use paddle controllers. There are a couple things that need to be done to make that happen.

 

First, paddle support needs to be integrated into JS7800. I did make some progress (as a POC) during my development on the latest version of the Wii port. I spent some time looking through the A7800 source, which has excellent support, and was able to make it function (albeit it was a quite hacky on my end).

 

The second thing that needs to be done is to add the ability to provide custom mappings from the HTML Gamepad API. The HTML Gamepad API provides a "standard" mapping that most modern controllers should map to. This essentially takes the common buttons of modern controllers and maps them to a standard layout. My guess is that the "2600-dapter II" may not map to the standard mapping, and therefore would need a custom mapping. You can actually test this if you go into the "Settings" portion of JS7800 and go to the Gamepads page. That page displays whether the connected controller(s) have a standard mapping. It will also indicate if the buttons (or paddle) is currently being mapped. If you press the buttons, etc. on a controller, a "white dot" will appear to show what 7800 control it is being mapped to (this is only applicable to joysticks at this time). The paddle controller, I assume, would need to map to an analog input. Further, this site, can be used to get more detailed information about the connected controller. I would be very curious to know what that site has to say about the "2600-dapter II". Does it map the POT movement to an analog input?

 

I do definitely want to add paddle support. I think the first step would probably be supporting it via mouse input (or touch once a mobile version of JS7800 is released). The second would be figuring out how to map adapters such as the "2600-dapter II" it to the HTML Gamepad API.

 

Thanks again,

Chris

Edited by raz0red
  • Like 4
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...