Difference between revisions of "JSMESS"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[File:Jsmess in Chromium.png|thumb|upright=1.3|JSMESS emulating a CPC6128 in Chromium 30 on Linux (with copious debug messages)]]
 
[[File:Jsmess in Chromium.png|thumb|upright=1.3|JSMESS emulating a CPC6128 in Chromium 30 on Linux (with copious debug messages)]]
[[File:Jsmess firefox zoomed.png|thumb|upright=1.3|Running in Firefox 24 (same rendering resolution but using page zoom)]]
+
[[File:Jsmess firefox zoomed.png|thumb|upright=1.3|JSMESS in Firefox 24 (same rendering resolution but using page zoom to enlarge the CPC screen)]]
'''JSMESS''' ("JavaScript MESS") is a JavaScript translation of [[MESS]] that runs in modern web browsers like Chrome and Firefox and is in its public beta stage right now.
+
'''JSMESS''' ("JavaScript MESS") was an ongoing JavaScript port of MESS (now simply called [[MAME]] as of 0.162) for modern web browsers like Chrome and Firefox. JSMESS is used by the Internet Archive to make their Historical Software Collection playable in web browsers.
 +
 
 +
Since MAME 0.168 (released in November 2015), JSMESS is no longer necessary as MAME can compile to JavaScript (using Emscripten's emmake command) out of the box.[http://mamedev.org/releases/whatsnew_0168.txt]
  
 
==History and development roadmap==
 
==History and development roadmap==
Line 27: Line 29:
 
As of October 2013, sound only works in Firefox and not in Chrome/Chromium. Emulation speed in Firefox is better than in Chrome, presumably because Firefox has better support for Emscripten's asm.js-based JS code. Internet Explorer 10 was supposedly supported very well by earlier versions of JSMESS with up to [https://github.com/jsmess/jsmess/wiki/Status 100% emulation performance] (including working sound) but the current JSMESS exits with an Emscripten error in IE 10.
 
As of October 2013, sound only works in Firefox and not in Chrome/Chromium. Emulation speed in Firefox is better than in Chrome, presumably because Firefox has better support for Emscripten's asm.js-based JS code. Internet Explorer 10 was supposedly supported very well by earlier versions of JSMESS with up to [https://github.com/jsmess/jsmess/wiki/Status 100% emulation performance] (including working sound) but the current JSMESS exits with an Emscripten error in IE 10.
  
The joystick is mapped to Alt and the arrow keys by default.
+
The joystick is mapped to Alt and the arrow keys by default. The development version of JSMESS at archive.org also has support for USB gamepads but no sound.
  
==Usage on web pages and CPC demo page==
+
==Usage on web pages and CPC6128 demo page==
  
 
Right now the way to get JSMESS running on a page is to edit the top of messloader.js so that <tt>gamename</tt> points to a DSK file for drive A.
 
Right now the way to get JSMESS running on a page is to edit the top of messloader.js so that <tt>gamename</tt> points to a DSK file for drive A.
Line 35: Line 37:
 
Also, you need to provide the zipped ROM file. Note that the ROM file cpc6128.zip as on the demo page below also needs to contain the AMSDOS ROM from cpc464.zip because unlike regular MESS, JSMESS only loads a single ROM ZIP file per machine.
 
Also, you need to provide the zipped ROM file. Note that the ROM file cpc6128.zip as on the demo page below also needs to contain the AMSDOS ROM from cpc464.zip because unlike regular MESS, JSMESS only loads a single ROM ZIP file per machine.
  
This [http://mdoege.github.io/jsmess/ JSMESS CPC demo page] (with the [[Sub Hunter]] disc in drive A) also has a ZIP file download of the build with the JS, ZIPs, and HTML. Resolution is set to MODE 1 (384x272), but you can either set a higher resolution in messloader.js or use the zoom functionality of the browser to get a larger picture.
+
This [http://mdoege.github.io/jsmess/ JSMESS CPC demo page] (with the ''[[Sub Hunter]]'' disc in drive A) also has a ZIP file download of the build with the JS, ZIPs, and HTML. Resolution is set to MODE 1 (384x272), but you can either set a higher resolution in messloader.js or use the zoom functionality of the browser to get a larger picture.
  
 
==Links==
 
==Links==
 
;General info
 
;General info
*[http://jsmess.textfiles.com/ Official site]
+
*[https://github.com/jsmess/jsmess Official site]
 +
*[http://archive.org/details/internetarchivecelebration20131024?start=2544 Video of Jason Scott presenting JSMESS and the Historical Software Collection] at the Internet Archive
 
*[http://archiveteam.org/index.php?title=Javascript_Mess Archive Team wiki page] about JSMESS
 
*[http://archiveteam.org/index.php?title=Javascript_Mess Archive Team wiki page] about JSMESS
 
*[http://en.wikipedia.org/wiki/Jason_Scott_Sadofsky Jason Scott], initiator of the project, at Wikipedia
 
*[http://en.wikipedia.org/wiki/Jason_Scott_Sadofsky Jason Scott], initiator of the project, at Wikipedia
;Code and examples
+
;Code
 
*[https://github.com/jsmess/jsmess GitHub source code repository] (without any CPC makefiles right now)
 
*[https://github.com/jsmess/jsmess GitHub source code repository] (without any CPC makefiles right now)
 
*[https://github.com/mdoege/jsmess GitHub fork] with added CPC6128 makefiles
 
*[https://github.com/mdoege/jsmess GitHub fork] with added CPC6128 makefiles
*[http://mdoege.github.io/jsmess/ CPC6128/SubHunter demo page]
+
;Demos
 +
*[http://mdoege.github.io/jsmess/ CPC6128/Sub Hunter demo page]
 +
*[https://archive.org/details/consolelivingroom The Console Living Room] at the Internet Archive
  
 
[[Category:Emulator]]
 
[[Category:Emulator]]

Latest revision as of 11:40, 28 December 2015

JSMESS emulating a CPC6128 in Chromium 30 on Linux (with copious debug messages)
JSMESS in Firefox 24 (same rendering resolution but using page zoom to enlarge the CPC screen)

JSMESS ("JavaScript MESS") was an ongoing JavaScript port of MESS (now simply called MAME as of 0.162) for modern web browsers like Chrome and Firefox. JSMESS is used by the Internet Archive to make their Historical Software Collection playable in web browsers.

Since MAME 0.168 (released in November 2015), JSMESS is no longer necessary as MAME can compile to JavaScript (using Emscripten's emmake command) out of the box.[1]

History and development roadmap

The JSMESS project was originally proposed in a October 2011 blog post by Jason Scott (of textfiles.com, the Archive Team, and The Internet Archive). The idea was to have a system for preservation of old computers and game consoles that runs directly in the web browser without any plugins.

Initial progress was slow because the Emscripten transcompiler had to be fixed and improved during development. In 2013, JSMESS reached a fairly usable state and was declared to be in public beta.

Ideally JSMESS should later also have snapshot capabilities so if e.g. a certain feature is discussed on a web page, JSMESS can take you directly to that point in the game.

Also, keymapping and a virtual keyboard on the screen are planned for JSMESS, although in principle you should already be able to create keymaps in MESS and use them with JSMESS.

JSMESS development is headed toward its 1.0 release. The list of systems that are supposed to be officially supported by 1.0 also includes the CPC464/664/6128 (although the printer is erroneously listed as the program medium for the CPC).

Building from source

Unlike a normal port (that is translated only once), the JSMESS code is created by Emscripten directly from the MESS code every time you compile JSMESS. In the official version of JSMESS only a small selection of MESS machines can be compiled to JavaScript out of the box. Since compiling MESS in its entirety would create a JavaScript file that is far too big for web browsers to handle, one has to find out which parts of MESS are really needed for a given machine and create Makefiles with that subset. (JSMESS now also includes scripts that automate this task.)

It is recommended to build JSMESS modules on Linux which also makes it easier to install the dependencies for Emscripten. The basis for JSMESS is MESS 0.142 and a custom version of Emscripten.

A JSMESS fork that includes the necessary Makefiles to build the CPC6128 version exists.

Features and status

As of October 2013, sound only works in Firefox and not in Chrome/Chromium. Emulation speed in Firefox is better than in Chrome, presumably because Firefox has better support for Emscripten's asm.js-based JS code. Internet Explorer 10 was supposedly supported very well by earlier versions of JSMESS with up to 100% emulation performance (including working sound) but the current JSMESS exits with an Emscripten error in IE 10.

The joystick is mapped to Alt and the arrow keys by default. The development version of JSMESS at archive.org also has support for USB gamepads but no sound.

Usage on web pages and CPC6128 demo page

Right now the way to get JSMESS running on a page is to edit the top of messloader.js so that gamename points to a DSK file for drive A.

Also, you need to provide the zipped ROM file. Note that the ROM file cpc6128.zip as on the demo page below also needs to contain the AMSDOS ROM from cpc464.zip because unlike regular MESS, JSMESS only loads a single ROM ZIP file per machine.

This JSMESS CPC demo page (with the Sub Hunter disc in drive A) also has a ZIP file download of the build with the JS, ZIPs, and HTML. Resolution is set to MODE 1 (384x272), but you can either set a higher resolution in messloader.js or use the zoom functionality of the browser to get a larger picture.

Links

General info
Code
Demos