Giter Site home page Giter Site logo

webmsx's Introduction

WebMSX

WebMSX, or simply WMSX, is a new cross platform MSX emulator designed for the Web.

WebMSX is great for displaying MSX software running inside webpages. You can launch the emulator and load ROMs, DSK and CAS images with a single link. Join friends in multiplayer games or pair programming sessions with the new NetPlay! function.

Please go to https://webmsx.org to enjoy it online!

Refer to /doc for parameters reference and URL usage examples. Refer to /release for stable release files and deployment examples.

MSX and the MSX logo are shown here as a tribute. All trademarks are property of their respective owners.

New in Release 6.0

  • 3 MSX turbo R machines (Japanese, European, American)
  • V9990 video, Superimposed and Mixed modes, or Dual Screens
  • Improved CPU Turbo emulation and control, Z80/R800 speed settings
  • Improved Kanji support, with MSX-JE input editor and dictionary
  • 6 MSX1 Palettes. Color, B&W, Green and Amber CRTs with scanlines
  • New AZERTY key mapping. Simplified hotkeys

Features

  • 12 Generic machines (MSX1, MSX2, MSX2+, MSX tR). NTSC 60Hz or PAL 50Hz
  • V9918, V9938, V9958 and V9990 video, Superimposing, Mixed, Dual Screen modes
  • PSG, SCC, SCC-I, FM-PAC, PCM, MSX-MUSIC and OPL4-Wave sound
  • Kanji support, with MSX-JE Japanese text input editor and dictionary
  • Cross platform HTML5/JS. Runs in any Browser, tested in Chrome/Firefox/Safari
  • Show MSX software running on any webpage, or with a link to the WebMSX page
  • Finally enjoy MSX games on your iPhone/iPad! Installs as a WebApp, runs offline
  • Open files from local storage, iCloud, Google Drive, Dropbox, web links
  • NetPlay! Connect several users on the same Virtual MSX machine over the internet
  • CPU and VDP Turbo modes up to 8x, with manual or software activation
  • Load Cartridge ROMs, HardDisk (Nextor), Disk and Tape images
  • Powerful Drag & Drop system for loading media files
  • Dynamically import files to any MSX disk drive, automatic image creation
  • Savestates support. Export and share Savestate files and links
  • Customizable Keyboard, Joysticks, Joykeys, and Mouse controllers
  • Customizable Touch Controls/Virtual Keyboard for mobile devices (iOS, Android)
  • Joykeys support. Emulates MSX Joysticks using Host Keyboard
  • Virtual buttons. Maps Host Joystick buttons to MSX Keyboard keys
  • Easily toggle extensions like SCC+, SCC, PAC, MegaRAM, Nextor, DoublePSG, etc.
  • Adjustable speed, Pause and Frame-by-frame advance
  • PSG/SCC/OPLL Stereo Sound simulation, configurable
  • Copy & Paste text, Screen Capture, Debug modes
  • CRT Scanlines, resizable Screen, Full Screen and Full Windowed modes
  • 6 MSX1 Palettes. Color, B&W, Green and Amber phosphor simulation
  • Javascript API for loading media and machine control

About the MSX turbo R machines

We still have some limitations on the tR and R800 emulation in this release. There is no PCM and MIDI support yet, and R800 CPU advanced timing may not be completely accurate. Also, R800 emulation hits very hard on the emulator performance, so it may not run smoothly on all devices, specially smartphones. There are options to tweak the R800 timing and clock speed from 0.5x to 2.0x.

About the V9990 Video chip

The current V9990 implementation also has some limitations on the Command Termination and Horizontal INTs. But none of the available/tested software seemed to rely on the incomplete functions.

About the light C-BIOS version

The light version with only C-BIOS ROMs can be found at: https://webmsx.org/cbios

About the NetPlay! feature

WebMSX 5.0 brings NetPlay!, in which any number of users may connect and control the same virtual MSX machine. To access the feature, open the NetPlay! control dialog available on the System Menu (Power button).

One user must be the "Server" and start a NetPlay! Session. Just choose a name for the Session, or let the emulator generate it randomly, then hit "START". Once the Session is started and active, other users may join the Session simply by entering the same Session name and hitting "JOIN". All users connected have complete control over the machine, except that only the Server user may load/change media files (ROMs, Disks, etc). All features of the emulator work during NetPlay! Any Client user may leave the Session at any time, but only the Server user may end the Session completely.

Be careful not to make your Session name public! Anyone that knows your Session name will be able to join it while its active. Send the session name only to people you want to invite. Another way of sharing your Session to users is sending them a link that will open the emulator and join the session automatically. In the NetPlay! dialog, once you are Hosting a Session, there will be a link button on the upper right, that will generate the link and copy it to your clipboard.

IMPORTANT: NetPlay! performance is completely dependent on the network quality. The lower the network latency between users, the better. Higher bandwidths with higher latencies won't help much. The Client may need some time to find and connect do the Server. It uses a specialized P2P protocol, and tries to use STUN to traverse NATs/routers so users don't have to worry about IPs and opening ports. Use at your own risk! :-)

To make all this work seamlessly, WebMSX uses modern Web technologies including WebRTC, which are supported by all major browsers and platforms. Unfortunately, those technologies may still not be available on Apple iOS, so NetPlay! may not work on those devices.

About the Nextor Hard Disk Drive

To make the Hard Disk Drive available, you must first activate the Hard Drive Extension, through the Extensions Menu on the user interface, or by using the respective Presets. The Hard Disk device may be placed "before" the Floppy Drives, so it will appear on the system as Drive A, or "after" the Floppy Drives, so it will appear as Drive C. The position depends on which Slot the Extension is activated on. If using Presets, there are two available: HARDDISK will place the device as Drive A, and HARDDISKC will place it as Drive C. On the Hard Drive menu (HD icon), there are options to automatically create Empty and Boot disks of several sizes. You can also load DSK images, Files or ZIPs normally.

WebMSX Configuration and Launch Options

Several parameters are available for customizing the emulator. They can be changed either directly in Javascript if you are hosting the emulator in your own page, by loading a Configuration File, or via URL Query Parameters if you are creating links or bookmarks to open the emulator, or just using it in your browser.

All parameters are in the form of properties in the global object WMSX. Just set these object properties in Javascript, or use URL Query parameter/value pairs. For example:

WMSX.ROM = "files/Game.rom";      is the same as      https://webmsx.org?ROM=files/Game.rom

To load an external Configuration File, set the CONFIG_URL parameter. The config file must be a valir JSON object. This object's properties will be merged with the standard configuration properties. For example:

WMSX.CONFIG_URL = "files/CustomMachines.json";     or     https://webmsx.org?CONFIG_URL=files/CustomMachines.json

All emulator Savestates, Settings and Preferences can be stored in multiple isolated spaces, using the Environments feature. Just set the ENVIRONMENT parameter (or E for short) to any number in the 1..99 range. For example:

WMSX.ENVIRONMENT = 2;     or     https://webmsx.org?E=2

Another important concept is the use of configuration Presets. Some configurations are a bit complicated and may require setting various parameters in conjunction. For those cases, its easier to use a Preset that will automatically set all the relevant parameters for a specific task. You may specify any number of Presets to be used by setting the PRESETS parameter (or P for short) with a comma separated list of the Preset names to apply. For example:

WMSX.PRESETS = "RAM128, NODISK";     or     https://webmsx.org?P=RAM128,NODISK

IMPORTANT: Any parameter setting via Javascript must be done AFTER importing the webmsx.js file.

Media Loading

The emulator can be set to automatically load files like ROMs, DSK and CAS images. Additionally, files can be loaded and automatically injected into any of the Disks Drives, without having to first create an image. Image files may be compressed in ZIP or GZIP formats. If several Disk images are found in a ZIP file, all of them (up to 10) will be loaded in the Drive Stack. Available parameters:

Parameter Function Shortcut for URL form
CARTRIDGE1_URL URL of ROM image file to load in Slot 1 ROM, CART1
CARTRIDGE2_URL URL of ROM image file to load in Slot 2 CART2
CARTRIDGE1_FORMAT Force ROM Format for Cartridge in Slot 1 ROM_FORMAT, CART1_FORMAT
CARTRIDGE2_FORMAT Force ROM Format for Cartridge in Slot 2 CART2_FORMAT
DISKA_URL URL of Disk image file to load in Drive A: DISK, DISKA
DISKB_URL URL of Disk image file to load in Drive B: DISKB
HARDDISK_URL URL of Disk image file to load in the Hard Drive HARDDISK
DISKA_FILES_URL URL of file or ZIP (for several files) to load in Drive A: DISK_FILES, DISKA_FILES
DISKB_FILES_URL URL of file or ZIP (for several files) to load in Drive B: DISKB_FILES
HARDDISK_FILES_URL URL of file or ZIP (for several files) to load in Hard Drive HARDDISK_FILES
TAPE_URL URL of Tape image file to load TAPE
STATE_URL URL of SaveState file to load STATE, SAVESTATE
AUTODETECT_URL URL of file to load with media auto-detection AUTODETECT, AUTO, ANY

ROM Format (or Mapper Type)

The ROM Format is auto-detected. To force a format, set the CARTRIDGE1_FORMAT and CARTRIDGE2_FORMAT parameters, or access the User Interface. You can also put the format specification in the ROM file name, between brackets. Example: Game [KonamiSCC].rom

Valid Formats

Normal, Mirrored, NotMirrored, ASCII8, ASCII16, Konami, KonamiSCC, KonamiSCCI, ASCII8SRAM2, ASCII8SRAM8, ASCII16SRAM2, ASCII16SRAM8, MegaRAM, GameMaster2, KoeiSRAM8, KoeiSRAM32, Wizardry, FMPAC, FMPAK, MSXDOS2, Majutsushi, Synthesizer, RType, CrossBlaim, Manbow2, HarryFox, AlQuran, AlQuranDecoded, Halnote, SuperSwangi, SuperLodeRunner, Dooly, Zemina80in1, Zemina90in1, Zemina126in1, MSXWrite, KonamiUltimateCollection

Choosing a Machine

There are 12 different generic machines. The default machine is the MSX2+, and the emulator will try to auto-detect your region. You can ask for a specific machine by setting the MACHINE parameter (or M for short) with the respective Machine ID:

Machine Machine ID Specific Machine Machine ID
MSX tR Auto-detection MSXTR MSX tR American (NTSC 60Hz) MSXTRA
MSX tR European (PAL 50Hz) MSXTRE
MSX tR Japanese (NTSC 60Hz) MSXTRJ
MSX2+ Auto-detection MSX2P MSX2+ American (NTSC 60Hz) MSX2PA
MSX2+ European (PAL 50Hz) MSX2PE
MSX2+ Japanese (NTSC 60Hz) MSX2PJ
MSX2 Auto-detection MSX2 MSX2 American (NTSC 60Hz) MSX2A
MSX2 European (PAL 50Hz) MSX2E
MSX2 Japanese (NTSC 60Hz) MSX2J
MSX1 Auto-detection MSX1 MSX1 American (NTSC 60Hz) MSX1A
MSX1 European (PAL 50Hz) MSX1E
MSX1 Japanese (NTSC 60Hz) MSX1J

It's possible to define additional Custom Machines, by loading an external Configuration File (CONFIG_URL parameter). Contact the author for details!

Enabling Extensions

The emulator supports several Extensions, or optional components that can be turned on/off. Some are in the form of expansion cartridges that can be inserted in either Slot 1 or 2. We use Presets to make configuring Extensions easier:

Extension Default in Machine Presets
Hard Disk interface (Nextor) -- HARDDISK, HARDDISKC, NOHARDDISK
Floppy Disk interface with 2 drives All DISK, NODISK
Standard RAM Mapper, adjustable size MSX2 or higher RAM128..RAM4096, RAMNORMAL
Kanji Characters with MSX-JE Japanese MSX2 or higher KANJI, NOKANJI
V9990 Video -- V9990
MSX-MUSIC sound with BASIC extension MSX2 or higher MSXMUSIC, NOMSXMUSIC
OPL4 Wave sound -- OPL4
Double PSG -- DOUBLEPSG
SCC-I Sound Cartridge with 128K RAM -- SCCI, SCCI2 (in Slot 1/2)
SCC Sound Cartridge -- SCC, SCC2 (in Slot 1/2)
PAC SRAM Cartridge -- PAC, PAC2 (in Slot 1/2)
MegaRAM Cartridge -- MEGARAM, MEGARAM2 (in Slot 1/2)

Loading BASIC files and Typing commands after launch

The emulator can be set to automatically Run/Load BASIC programs after launch, or type any commands or text in the BASIC prompt. NOTE that these are not necessary for AUTOEXEC.BAS and AUTOEXEC.BAT files, or if you have loaded a Tape Image file (in which case the emulator will automatically detect and Run the first program in the Tape). Available parameters:

Parameter Action
BASIC_RUN Run the specified file
BASIC_LOAD Load the specified file
BASIC_BRUN Run the specified bynary file
BASIC_BLOAD Load the specified bynary file
BASIC_TYPE Type the specified text
BASIC_ENTER Type the specified text then hit ENTER

Controlling boot speed and automatically pressing keys at boot time

Parameter Action
FAST_BOOT Boot at max. speed
BOOT_KEYS Keys to keep pressed at every boot, comma separated
BOOT_KEYS_ONCE Same as above, but only on first boot (do not use both)
BOOT_KEYS_FRAMES Optional number of frames for Boot Keys

Launch URL Examples

WebMSX is great for displaying MSX software in the web. With a simple URL, you can launch the emulator and automatically load and run anything. You may combine several settings and media loading options in a single link. Here are some examples:

  • To load a game in ROM format:
https://webmsx.org?ROM=https://gamesarchive.org/Goonies.rom
  • To load a game in a ZIPped Disk Image and insert a SCC+ Sound Cartridge:
https://webmsx.org?DISK=https://gamesarchive.org/SDSnatcher.zip&PRESETS=SCCI
  • To launch an European MSX1 machine, loading a Disk image and then run a BASIC program:
https://webmsx.org?MACHINE=MSX1E&DISK=https://basicmuseum.org/Demos.dsk&BASIC_RUN=Bubbles.bas

Presets Reference

Preset Description
HARDDISK, HARDDISKC, NOHARDDISK Hard Drive Extension
DISK, DISKA, NODISK Floppy Drives Extension
RAMMAPPER, RAM128 - RAM4096, RAMNORMAL RAM Mapper Extension & sizes
V9990 V9990 Video Extension
KANJI, NOKANJI Kanji ROM Extension
MSXMUSIC, NOMSXMUSIC, DOUBLEPSG, OPL4 Sound Devices Extensions
SCCI, SCCI2, SCC, SCC2 SCC+/SCC Cartridge (in Slot 1/2)
PAC, PAC2 PAC SRAM Cartridge (in Slot 1/2)
MEGARAM, MEGARAM2, MEGARAM256 - MEGARAM2048 MegaRam Cartridge (in Slot 1/2) & sizes
VSYNCON, VSYNCOFF, VSYNCDISABLED VSync options
ALLSTEREO, ALLSTEREO2 Stereo simulation for all devices (default/variation)
PSGSTEREO, PSGSTEREO2 PSG Stereo simulation (default/variation)
SCCSTEREO, SCCSTEREO2 SCC Stereo simulation (default/variation)
OPLLSTEREO, OPLLSTEREO2 OPLL Stereo simulation (default/variation)
ALTSLOTCONFIG Alternate Slot Configuration. RAM at Primary Slot 3
BOOSTED Boosted Machine with HardDisk and CPU/VDP 3x Turbo

Parameters Reference

Parameter (+ new) Default Description
ENVIRONMENT 0 Emulator Environment. Isolate Savestates & Preferences. 1..99
CONFIG_URL -- Configuration file to merge. Processed before URL parameters
MACHINE -- Machine Type. Leave blank for auto-detection
PRESETS -- Configuration Presets names to apply, comma separated
CARTRIDGE1_URL -- URL of ROM image file to load in Slot 1
CARTRIDGE2_URL -- URL of ROM image file to load in Slot 2
CARTRIDGE1_FORMAT -- ROM Format for Cartridge in Slot 1
CARTRIDGE2_FORMAT -- ROM Format for Cartridge in Slot 2
DISKA_URL -- URL of Disk image file to load in Drive A:
DISKB_URL -- URL of Disk image file to load in Drive B:
HARDDISK_URL -- URL of Disk image file to load in the Hard Drive
DISKA_FILES_URL -- URL of file or ZIP (for several files) to load in Drive A:
DISKB_FILES_URL -- URL of file or ZIP (for several files) to load in Drive B:
HARDDISK_FILES_URL -- URL of file or ZIP (for several files) to load in Hard Drive
TAPE_URL -- URL of Tape image file to load
STATE_URL -- URL of SaveState file to load
AUTODETECT_URL -- URL of file to load with media auto-detection
SLOTXY_URL -- URL of ROM file to load in Slot X-Y (X,Y are numbers). Omit Y for primary slot
SLOTXY_FORMAT -- ROM Format for Slot X-Y loaded above
NETPLAY_JOIN -- Join NetPlay! Session automatically
NETPLAY_NICK -- NetPlay! Nickname, optional
BASIC_RUN -- Run the specified file name
BASIC_LOAD -- Load the specified file name
BASIC_BRUN -- Run the specified binary file name
BASIC_BLOAD -- Load the specified binary file name
BASIC_TYPE -- Type the specified text
BASIC_ENTER -- Type the specified text then hit ENTER
BOOT_KEYS -- Keys to keep pressed at every boot, comma separated
BOOT_KEYS_ONCE -- Same as above, but only on first boot (do not use both)
BOOT_KEYS_FRAMES -1 Number of frames for Boot Keys. -1: auto; > 0: frames
FAST_BOOT 0 Number of frames for Fast Boot. 0: off; 1: auto (same as Boot Keys frames); > 1: number of frames
VDP_TYPE -1 VDP Chip. -1: auto; 1: V9918; 2: V9938; 3: V9958
+ VDP_PALETTE 2 MSX1 Palette. 0: WebMSX Original; 1: V9918; 2: V9928; 3: V9938; 4: Toshiba; 5: Fujitsu FM-X
RTC_ACTIVE -1 RTC Chip. -1: auto; 0: not present; 1: present
RAMMAPPER_SIZE 512 RAM Mapper size when active. 64, 128, 256, 512, 1024, 2048, 4096, in KB
RAMNORMAL_SIZE 64 Normal RAM size when active. 16..64, in KB
VOL 1.0 Master Volume factor
SPEED 100 Default emulation speed (in %)
SCREEN_ELEMENT_ID "wmsx-screen" HTML Element ID to place the Emulator Screen
ALLOW_URL_PARAMETERS true Allows overriding any parameters via URL query parameters
AUTO_START true Auto-Start the emulator as soon as ready
AUTO_POWER_ON_DELAY 1200 Auto-Power-ON after specified msecs. -1: no Auto-Power-ON
MEDIA_CHANGE_DISABLED false Block user from changing Media (Cartridges, Disks, etc)
SCREEN_RESIZE_DISABLED false Block user from changing Sreen size
SCREEN_FULLSCREEN_MODE -1 FullScreen mode. -2: disabled; -1: auto; 0: off; 1: on (Full Screen); 2: on (Full Windowed)
SCREEN_FILTER_MODE -3 Screen CRT Filter level. -3: user set (default auto); -2: browser default; -1: auto; 0..3: smoothing level
SCREEN_CRT_SCANLINES -1 Screen CRT Scanlines. -1: user set (default off); 0: off; 1..10: level
SCREEN_CRT_PHOSPHOR -1 Screen CRT Phosphor Effect. -1: auto (off); 0: off; 1: on
SCREEN_DEFAULT_SCALE -1 Screen size. -1: auto; 0.5..N in 0.1 steps
SCREEN_DEFAULT_ASPECT 1.14 Screen Aspect Ratio (width) in 0.1 steps
SCREEN_CONTROL_BAR 1 Screen Bottom Bar controls. 0: on hover; 1: always
SCREEN_FORCE_HOST_NATIVE_FPS -1 Force host native video frequency. -1: auto-detect. Don't change! :-)
SCREEN_VSYNC_MODE -2 VSync mode. -2: user set (default auto); -1: disabled; 0: off; 1: auto (on when available)
+ SCREEN_VIDEO_OUT -1 Video output. -1: auto; 0: Internal VDP; 1: External V9990; 2: Superimposed; 3: Mixed; 4: Dual (main: Internal); 5: Dual (main: V9990)
+ SCREEN_COLORS 0 CRT color type. 0: Color; 1: B&W; 2: Green Phosphor; 3: Amber Phosphor
AUDIO_MONITOR_BUFFER_BASE -3 Audio buffer base size. -3: user set (default auto); -2: disable audio; -1: auto; 0: browser default; 1..6: base value. More buffer = more delay
AUDIO_MONITOR_BUFFER_SIZE -1 Audio buffer size. -1: auto; 256, 512, 1024, 2048, 4096, 8192, 16384: buffer size. More buffer = more delay. Don't change! :-)
AUDIO_SIGNAL_BUFFER_RATIO 2 Internal Audio Signal buffer based on Monitor buffer
AUDIO_SIGNAL_ADD_FRAMES 3 Additional frames in internal Audio Signal buffer based on Monitor buffer
+ R800_CLOCK_MODE 0 R800 CPU Clock. 0: auto; (0..2]: R800 CPU clock multiplier
+ R800_TIMING 1 Precise R800/S1990 timings. 0: off, 1: on; 2: VDP waits only. Turn off for faster and lighter emulation
Z80_CLOCK_MODE 0 Z80 CPU Clock. 0: auto (soft-turbo possible); (0..8]: CPU clock multiplier
VDP_CLOCK_MODE 0 VDP Command Engine Clock. 0: auto (soft-turbo possible); (0..8]: Engine clock multiplier; 9: instantaneous
Z80_SOFT_TURBO_MULTI 1.5 Z80 CPU clock multiplier when in AUTO mode and activated by software. 1..8: multi
VDP_SOFT_TURBO_MULTI 1 VDP Command Engine clock multiplier when in AUTO mode and activated by software. 1..9: multi
+ CPU_SOFT_TURBO_AUTO_ON 0 Automatically activate the CPU Soft Turbo when supported by machine. 0: off, 1: on
+ CPU_FAKE_TR_TURBO -1 Simulated tR CHGCPU Turbo activation. -1: auto; 0: off; 1: on. Auto ON for 2+, never for tR
+ CPU_PANA_TURBO -1 Simulated Panasonic Turbo activation. -1: auto; 0: off; 1: on. Auto ON for 2+, never for tR
JOYSTICKS_MODE 0 Joysticks (on Host) controls. -1: disabled; 0: auto; 1: auto (swapped)
JOYKEYS_MODE -1 JoyKeys controls. -1: disabled; 0: enabled at port 1; 1: enabled at port 2; 2: enabled at both ports; 3: enabled at both ports (swapped)
MOUSE_MODE -1 Mouse controls. -1: disabled; 0: auto; 1: enabled at port 1; 2: enabled at port 2
TOUCH_MODE 0 Touch controls. -1: disabled; 0: auto; 1: enabled at port 1; 2: enabled at port 2
+ MOBILE_MODE 0 Forced Mobile interface mode. -1: disabled; 0: auto; 1: enabled
DEBUG_MODE 0 Debug Modes. 0: off; 1..7: mode. Don't change! :-)
SPRITES_DEBUG_MODE 0 Sprites Debug Modes. 0: off; 1: unlimited; 2: no collisions; 3: both. May cause problems :-)
KEYBOARD_JAPAN_LAYOUT 1 Japanese keyboard layout. 0: ANSI, 1: JIS
ROM_MAX_HASH_SIZE_KB 5120 Maximum ROM size for Hash calculation
HARDDISK_MIN_SIZE_KB 720 Minimum file size to be accepted as HardDisk image (besides all valid Floppy formats)
MEGARAM_SIZE 2048 MegaRAM size in KB
DISK_ROM_START_PAGE 0 Change starting page for ROMs > 16KB when format is DiskPatch. 0..1
PSG_VOL "f" PSG Volume adjust: 0..f (hex digit). Set globally or for each channel (4 values)
PSG_PAN "8" PSG PanPot adjust: 0; 1..8..f (hex digit). Set globally or for each channel (4 values)
SCC_VOL "f" SCC Volume adjust. Same as above (5 values)
SCC_PAN "8" SCC PanPot adjust. Same as above (5 values)
OPLL_VOL "f" OPLL Volume adjust. Same as above (14 values)
OPLL_PAN "8" OPLL PanPot adjust. Same as above (14 values)
PAGE_BACK_CSS -- CSS to modify page background color. Applied to the body element

webmsx's People

Contributors

cat2151 avatar ppeccin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webmsx's Issues

Can we load a disk and start some program (not autoexec)

We are building a site with a database of all listings published in MSX Compute Magazine (late 80's). You have been in touch with Hayo before I think.

For most programs it works fine, we create a URL like:

http://webmsx.org/?MACHINE=MSX2E&DISKA_FILES_URL=http://www.msxcomputermagazine.nl/archief/listings/mcmd56.di1/sneeuw&BASIC_RUN=sneeuw

And the emulator starts and runs the file. Nice.

But, some software needs more files, or loads pictures for instance. So we would like to load multiple files and/or the full disk image, and then start the specific program. I've tried:

http://webmsx.org/?DISKA_URL=http://www.msxcomputermagazine.nl/archief/disks/mcmd15.di1&BASIC_RUN=sneeuw

but that starts autoexec, not 'sneeuw'.

Is there any way to do this currently?

MSX-Audio (Y8950) support

Has been reported/requested before, just making an issue for this.

Quite a popular sound expansion (in the form of the Philips NMS-1205 Music-Module) in the Dutch indie/demo/tracker scene.
The 1205's on-board ADPCM 32 KB sample RAM can/could be expanded to 256 KB, which is used by some software (including the Unknown Reality demo).

The sound chip is also supported by some titles from Compile.

➡️ Support according Generation MSX.

REQ: Key Press during boot-up

Would it be possible to add the possibility to virtually push a certain key during boot, specifically the CTRL so you can boot with 1 drive, clearing up some extra memory.

URL special characters in DISKA_FILES_URL

I'm trying to load

http://webmsx.org/?MACHINE=MSX1E&DISKA_FILES_URL=http://www.msxcomputermagazine.nl/archief/listings/mcmd01.di1/blue%26pin&BASIC_RUN=blue%26pin

Note the url escaped & in the filename 'blue&pin'.

the basic_run works, but the file doesn't. The request the emulator makes to my server is:

54.147.43.152 - - [01/Feb/2017:10:27:25 +0100] "GET /listings/mcmd01.di1/blue HTTP/1.1" 404 508 "-" "-"

note filename is missing '&pin'. And the resulting 404 error.

looks like the emulator doesn't escape the filename. I think it should, although i could probably make it work by escaping twice ;-)

I would prefer not to change the weird (but historically correct) filenames of course.

change machine to gradiente 1.1

is there any option to change the machine to use Gradiente 1.1 rom for example? Did not find anything in the documentation about it.

Media is not mounted correctly when external BIOS and SubROM are used

Media is not mounted correctly when external BIOS and SubROM are used. When the media is mounted, the new drive is not created and all available drives in a system always return "Disk offline" error.

Example of mounted media not working with external BIOS and SubROM:
https://webmsx.org/?BIOS_URL=http://www.podrezov.com/webmsx/yis805.rom&BIOSEXT_URL=http://www.podrezov.com/webmsx/yis805sub.rom&P=RAM128,NOMSXMUSIC?DISK_FILES=https://wiki.yola.ru/_media/msx2scrn.bas&BASIC_RUN=msx2scrn.bas

Without the external BIOS and SubROM this works:
http://webmsx.org/?DISK_FILES=https://wiki.yola.ru/_media/msx2scrn.bas&BASIC_RUN=msx2scrn.bas

Please fix, thanks.

Wrong RAM allocation for Yamaha MSX2 machines with external BIOS

The RAM is allocated in subslot 3.0 instead of 3.2 for the Yamaha MSX2 machines. There should be a way to specify the RAM location in the settings because a lot of software assumes that RAM is in 3.2 and won't work if RAM is in a different subslot. Example URL showing the wrong RAM subslot allocation:

https://webmsx.org/?BIOS_URL=http://www.podrezov.com/webmsx/yis805.rom&BIOSEXT_URL=http://www.podrezov.com/webmsx/yis805sub.rom&P=RAM128,NOMSXMUSIC&CARTRIDGE1_URL=http://www.podrezov.com/webmsx/TESTRAM.ROM

Default Yamaha YIS805 machine slot configuration:
https://www.msx.org/wiki/Yamaha_YIS-805

Pointer lock to gamewindow

On a multimonitor setup when playing a mouse game like breaker if I move the mouse too far to the right or left, the position get's weird, is it possible to lock the mouse to the game window or only send mouse data when the mouse pointer is actually within the webmsx rectangle?

Impact of browser security/privacy measures & configuration on performance

This first occured to me when running Nyrikki's Fin Lander (a 10-line BASIC program) in Firefox Quantum (59 beta) (as opposed to 52 ESR) - the game seemed to run slower (confirmed for sure by the slow rate at which the end of stage tune played). I noticed wmsx Error: Could not detect video native frequency. V-Synch DISABLED! in the console.

Seemed to be the privacy.resistFingerprinting setting at play here (when set to true).
And I think in the future privacy.reduceTimerPrecision will be an issue as well.

The latter I believe will be by enabled by default in FF59, with a precision of 20us (which is already in effect since FF 57.0.4, but will however be raised to 2ms in FF60). privacy.resistFingerprinting is false by default.

Workaround (for now) is making sure privacy.resistFingerprinting is set to false.
Setting privacy.resistFingerprinting.reduceTimerPrecision.microseconds to 0 wasn't enough so it seems.

I didn't look into Chrome.

Resources:

https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
https://blog.mozilla.org/security/2018/01/03/mitigations-landing-new-class-timing-attack/

Ingame music issues

In game music sounds awful; I guess that is my setup; Ubuntu linux with Chrome. But any idea why it happens as video sound + browser game sound for non webmsx stuff sounds great. When I am running something like Metal Gear 1, Chrome pulls a consistent 50% CPU in top; not more not less.

Setting up a Custom MSX machine

Webmsx has the possibility to run ROMs and DSK from Internet. Please add a feature to use specific MSX machine's ROMs that could be loaded from Internet as well. For example in the "Select Machine" add a dialog called "Custom MSX". From this dialog a user should be able to select the machine type (MSX1/2/2+), color system (PAL/NTSC), region (USA/EU/JAPAN) and the machine's BIOS file(s). Thanks.

Example: I would like to run the specific MSX2 machine - the Yamaha MSX2 YIS503IIIR to be able to see the Russian letters in the software that I use. There's no such possibility at the moment. But replacing the BIOS ROM and SUBROM that you use in a similar MSX2 configuration with the specific Russian-localized machine's BIOS and SUBROM files would solve the problem.

Issues using bluetooth keyboard (iOS)

When trying to use a Bluetooth keyboard under iOS, input will often get stuck repeating the last few characters. Turning off the Bluetooth keyboard does not stop the repeats.

Is there an API?

Is there a way to (for example) load a new ROM image into a cartridge slot through Javascript?
Use case: an online emulator where visitors can select a ROM from a list of games.
Instead of reloading the entire emulator, I'd like to load a ROM image as if it was loaded via the "Load ROM image" option in the "Cartridge 1" menu you can use from the toolbar of the emulator.
Something like this:

WMSX.loadCartridge(1, 'games/game.zip'); // 1 = cartridge 1

Is there (or will there be) anything like this available? Thanks for considering!

Japanese keyboard _ ろ key operation is not suitable (\ key)

Japanese MSX users confirmed that they can not enter the _ ろ key (\ key), and I reported it.

Japanese MSX can not input "\". (The corresponding code is assigned "¥")
Therefore, if we enter the relevant key, no input is entered and the Shift key is entered "_".

1462575717

Subslotting Slot 0

I defined a new machine (MSX2 Middle East PAL) using the following configuration:

_MSX2M: { _INCLUDE: "_MSX2BASE", BIOS_URL: "@ax370bios.rom", BIOSEXT_URL: "@ax370ext.rom | @ax370arab.rom", BOOT_DURATION_AUTO: 400 },

The machine works well, except when loading an Arabic rom in one of the external cartridges! In this case, the emulator does not load the Arabic font (ax370arab.rom) and hence the Arabic rom does not work.

I want to put ax370arab.rom in slot 0 along with the ax370bios.rom, so the Arabic font is always loaded. Any idea how I can do this?

Thank you.

Loading a state resets the sprites mode

WebMSX: 5.0.4
Browser: Firefox 54.0
OS: Fedora 24

Steps to reproduce: Load this state file. Set sprites mode to "both". Save the state either as a file or internally. Load the newly saved state. Sprites mode is set to "normal" again.

Wrong drive allocation when connecting a DSK image to a machine with internal disk ROM

I observed the wrong drive allocation when connecting a DSK image to a machine with internal disk ROM in the SubROM. The connected disk image becomes C: instead of A:

Example URL where my DSK image becomes C: drive after booting, disks A: and B: are offline:
https://webmsx.org/?BIOS_URL=http://www.podrezov.com/webmsx/yis805.rom&BIOSEXT_URL=http://www.podrezov.com/webmsx/yis805sub.rom&P=RAM128,NOMSXMUSIC&DISKA_URL=http://www.podrezov.com/webmsx/prog1.dsk

Machine configuration:
https://www.msx.org/wiki/Yamaha_YIS-805

Cannot load files with spaces on their names

I've tried to load some files using JavaScript and I have noticed that the emulator fails to load them. I get a 404 not found error:

Could not load file(s):

No valid ROM, Cassette or Disk found.

Here's an example of one of my files: Andorogynus (Telenet Japan, 1987).zip

Hunchback crashes

I've been trying to get Hunchback working on WebMSX, but no matter what version (CAS, DSK or ROM) the game will not even show it's title screen.

Debugging

Thanks for the great work!

Is there an API for debugging? I see commented code for breakpoints in Z80.js and I tried rummaging through the WMSX.room.machine.* space; I can dump the regs;

WMSX.room.machine.cpu.toString()

but I haven't figured out how to dump memory or put a breakpoint and step etc. Is that in yet or that's just on the roadmap?

Cannot load userPreferences

Downloaded master branch from git today and generated a release version using Grunt.
When using this version, it says that wmsx.userPreferences.load() does not exist.

Feature request: Video & Audio recording

It would be nice to be able to make a recording (audio & video) of the emulation. Preferably with the posibility to switch the OSD (Hz change, etc..) on/off :)

Loading tape from local filesystem

Hi, i'm trying to launch WebMsx like a regular "offline emulator", by running chrome from the command like, calling the "embedded" release and passing it a tape and other configurations.

The launcher i came up with is the following:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-file-access-from-files --start-fullscreen "file:///C:/Users/xxx/dev/WebMSX/release/stable/5.4/embedded/index.html?SCREEN_FULLSCREEN_MODE=1&TAPE=file%3A%2F%2F%2FC%3A%2FUsers%2Fxxx%2Fdev%2FWebMSX%2Frelease%2Fstable%2F5.4%2Fembedded%2Fcaduta_massi.cas"

It all works except i cannot load the tape from the config option. First error i get is obviously "blocked by CORS policy", but the --allow-file-access-from-files parameter should bypass that. And indeed i don't get the CORS error anymore on the console, but i still have WebMSX giving error:

wmsx: Reading file from: file:///C:/Users/xxx/dev/WebMSX/release/stable/5.4/embedded/caduta_massi.cas
wmsx.js:352 Could not load file: file:///C:/Users/xxx/dev/WebMSX/release/stable/5.4/embedded/caduta_massi.cas
Error: 0

Any idea on how to bypass that ?

Overscan renders lines between the height toggle incorrectly

In the attached ROM file I have a screensplit which switches from 212 to 192 lines on line 210. After line 212 I switch back to 212 lines. This does enable overscan in WebMSX, however on lines 210 and 211 it does not show the correct image, rather, it shows the content of (I’m guessing) 20 lines above.

Switching line count of the V9958 never updates the current line counter, rather as I understand it it just changes the last display line, as well as the initial (negative) value of the line counter after the vertical sync/erase (+ display frequency offset + vertical offset + vertical adjust).

Test ROM: tiletile.rom.zip (KonamiSCC mapper)

Verified on openMSX and my turboR.

p.s. The window also doesn’t show 6 lines of overscan on both the top and the bottom. That’s fine, it’s overscan after all, but I still thought I should mention it.

Hydlide 2 Patched doesn't work correctly

When issuing the English Translation patch to the Hydlide ROM it doesn't work anymore on WebMSX.
IPS Patch: http://ips.tni.nl/rom/translations/
Patched file: http://www.file-hunter.com/MSX/Hydlide2.zip
This version works, but you can't save the player you have created (see this issue: http://www.romhacking.net/forum/index.php?topic=14328.0
After manually selecting the ASCI16SRAM2 mapper, the game crashes:
Patched file with correct rom-type: http://www.file-hunter.com/MSX/Hydlide2-2.zip
It seems that RuMSX even made a special ROM type for Hydlide II: http://www.emucr.com/2017/06/rumsx-v082.html

CPU Turbo modes don't function

I have added Illusion City to my site, but it keeps nagging me about the fact that that machine I have set is not running in Turbo mode. When I set the CPU to 4x speed through the Quick Options menu the CPU 4x appears and all works fine. But no matter which option I use:

'CPU_SOFT_TURBO_MULTI' => 4,
'CPU_TURBO_MODE' => 4,
'Z80_SOFT_TURBO_MULTI' => 4,
'Z80_CLOCK_MODE' => 4

The CPU x4 doesn't appear and the software seems to keep running on 3,57Mhz.
In the past the 'CPU_TURBO_MODE' => 4, seemed to work fine. I have added the files and the webpage is: https://www.file-hunter.com/MSX/index.php?id=illusioncity
I hope you can find out what I am doing wrong here.

Performance and webassembly

I just tested it on the browser of a Tesla Model S:

https://youtu.be/D4XYz8YLdlQ

It is pretty cool that it actually works but the experience isn't amazing as the emulator is running slow.

I was wondering how the core performance is. I read articles mentioning webassembly and just wondered if the emulator is making use of it.

Gamepad on iPad up and down swapped

Hi, the Steelseries Nimbus is viewed by WebMSX and works! The biggest issue is that the up and down direction are inverted. Only left analog stick is working. No way to riconfigure it (over mouse). Buttons are ok!
Thanks for this great project!

P.s. in order to enable it just open the ”steelseries nimbus” app and leave it open

cant type quotes

i cant type (double) quotes in de emulator, using my US keyboard. Using F2 (cload") and backspace is a workaround, but not a good one ;-)

changing keyboard type (alt-l) doesn't help.

same issue with ` ~ ^ ' " .... i think its related to the fact my ubuntu OS uses them as dead keys to allow combining them with letters like ö, so to get the quote i type quote / space: ".

can others type qoutes? is this issue known? If not i'll have a look in the code, see if i can find the cause and maybe fix it.

LZH decompression of disk images?

some archives have files available as LZH compressed disk images, e.g beamride.lzh. on-demand decompression of these disc images would make use of these files a lot more user friendly.

would it be feasible to try to uncompress given LZH image and proceed similar to what is done with ZIP disk images?
I have not tested compatibility with MSX files, but at least npm has lzh package available. I have used lhasa to decompress the files and then load the directory as disk to run that kind of images, which is doable, but cumbersome.

BASIC_ENTER doesn't seem to work?

I try

http://webmsx.org/?BASIC_ENTER=print%20%22hoi%22

expecting to have the print statement executed, but it I end up in an emulator just showing OK promt... Am i missing something?

The game Dires runs with corrupted graphics

The presentation runs fine, but when the game starts, the graphics are corrupted and the colors are incorrect.

The ROM type seems to be correctly detected as ASCII8SRAM2.

Please declare a license for the codebase

Several files mention this in the header:
// Copyright 2015 by Paulo Augusto Peccin. See license.txt distributed with this file.

But I could not find a license.txt file anywhere.

No sound iOS

Hi

I have been using webmsx for a few days on my iPad. I noticed today that sound stopped working. Is this a known issue?

Can BASIC_BLOAD and BASIC_BRUN be added?

we have some binary files on the disks that should be bloaded and run. Most importantly MemMan (but that would like MSXDOS as well, a different issue ;-) )

BASIC_BLOAD could do BLOAD "" (not needed now, but makes things consistent i think)
BASIC_BRUN could do BLOAD "",r (that is needed)

We could use BASIC_ENTER of course, but the above would be more clean I think...

PSG emulation sometimes off

I've noticed that the PSG emulation is sometimes off or incorrect. Two games that show this very well:

http://www.file-hunter.com/MSX/index.php?id=alibaba
Here the music is just off. The original game seems to play with the pitch of the notes a bit, generation a more eastern note-set.

http://www.file-hunter.com/MSX/index.php?id=chuckieegg
In this game, after the welcome noise, the PSG just goes crazy. I've tested about 10 versions in WebMSX and they all have the same problem, while functioning OK in multiple OpenMSX configurations.

Both games do display a warning in OpenMSX that they show behaviour which could damage the PSG in old systems. Maybe the PSG emulated in WebMSX is of that "older" type?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.