diff --git a/ga.js b/ga.js new file mode 100644 index 0000000..986e4d1 --- /dev/null +++ b/ga.js @@ -0,0 +1,12 @@ +/* google analytics */ + +var _gaq = _gaq || []; +_gaq.push(['_setAccount', 'UA-37232052-1']); +_gaq.push(['_setDomainName', 'scriptedamigaemulator.net']); +_gaq.push(['_trackPageview']); + +(function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); +})(); \ No newline at end of file diff --git a/index.css b/index.css index 282d2d9..8f385aa 100644 --- a/index.css +++ b/index.css @@ -41,7 +41,7 @@ body { left:0; margin:0; padding:0; - font-family:verdana; + font-family:verdana,serif; font-size:small; background-color:#fff; } @@ -81,7 +81,7 @@ body { background-color:#fcfcfc; } .config_simple_hof { - width:480px; + width:380px; margin:auto; padding:10px; border:1px solid #ccc; @@ -114,7 +114,6 @@ body { width:auto; } #config select { - border:0; border:1px solid #ccc; } #config .button { @@ -195,7 +194,7 @@ body { vertical-align:top; } -div.float_box { +/*div.float_box { overflow: hidden; width: 100%; } @@ -204,4 +203,4 @@ div.float_item { } div.float_clear { clear: both; -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/index.htm b/index.htm index c6c3a33..20ecadf 100644 --- a/index.htm +++ b/index.htm @@ -47,22 +47,11 @@

Welcome!

This site is the homepage of the project SAE, an experimental Amiga emulator in pure JavaScript and HTML5.
- SAE is based on WinUAE and does use the AROS-kickstart replacement. - For more details, please see the description.
+ SAE is based on WinUAE and does use the AROS-kickstart replacement. + For more details, please see the description.

Below you find a collection of pre-installed games and demos to play and test. Press the 'Config'-button to use your own roms or file-images, with advanced options.
-
- - Update 22.01.2013: The new game-database is now online. It's quite empty yet and will be filled with freeware and public-domain titles.
-
-
- - Your game or demo online
- If you want to have your game or demo on this site, please contact me. - It would be published under a free license, with a link to your homepage and would be free to play for everyone. - This is a non-profit site and an open-source project.
-
-
+
- + - + @@ -154,7 +143,14 @@ - + +
+ + Your game or demo online
+ If you want to have your game or demo on this site, please contact me. + It would be published under a free license, with a link to your homepage and would be free to play for everyone. + This is a non-profit site and an open-source project. +
@@ -533,7 +529,7 @@ Enabled - Move @@ -670,7 +666,7 @@
- + - + \ No newline at end of file diff --git a/index.js b/index.js index ac3d858..ae94e4c 100644 --- a/index.js +++ b/index.js @@ -14,15 +14,45 @@ const URL_TEAM_HOI = 'Team Hoi'; const URL_RETROGURU = 'retroguru'; +const URL_LOEWENSTEIN = 'Richard Löwenstein'; const db = [ /* name company year [disks] [change, turbo] [en,f1,f2,map] load [keys] immediate */ [ + ['Air Ace II', ['SEUCK', '-', 'Public Domain'], '1989', + ['Air Ace II.adf', false, false, false], [false, true], + [true, 16, 17, false], ['...takes very long.'], [], false + ], + ['Asteroids', ['Vertical Developments', '-', 'Public Domain'], '1979', + ['Asteroids.adf', false, false, false], [false, true], + [true, 16, 17, false], [], [], false + ], + ['Crazy Sue', ['Jumpshoe, Hironymous', '-', 'Public Domain'], '1991', + ['Crazy Sue.adf', false, false, false], [false, true], + [true, 16, 17, false], ['...can take some time.'], [], false + ], + ['Deluxe Galaga 2.4', ['Edgar Vigdal', '-', 'Freeware'], '1994', + ['Deluxe Galaga.adf', false, false, false], [false, true], + [true, 16, 17, false], [], [], false + ], ['Hoi', [URL_TEAM_HOI, 'Hollyware', 'Freeware'], '1992', ['Hoi (Disk 1).adf', 'Hoi (Disk 2).adf', false, false], [true, true], - [true, 16, 17, false], ['Press the LMB to skip the intro and insert the 2nd disk manually.'], [], false + [true, 16, 17, false], ['Press the LMB to skip the intro and insert the 2nd disk manually.

'+ + 'Cheat (move mouse-over)'], [], false ], + ['Norse Gods', [URL_LOEWENSTEIN, '-', 'Freeware'], '1991', + ['Norse Gods.adf', false, false, false], [false, true], + [true, 16, 17, false], [], [], false + ], + ['Pollymorf', ['Andrew Campbell', '-', 'Public Domain'], '1993', + ['Pollymorf.adf', false, false, false], [false, true], + [true, 16, 17, false], ['...takes some time, just wait.'], [], false + ], + /*['Rectum', ['Mathias Olsson', '-', 'Freeware'], '1992', + ['Rectum.adf', false, false, false], [false, true], + [true, 16, 17, false], ['Press the LMB to skip the intro...'], [], false + ],*/ ['Sqrxz', [URL_RETROGURU, '-', 'Freeware'], '2012', ['sqrxz.adf', false, false, false], [false, true], [true, 16, 17, false], ['The color-stripes are normal, just wait...'], [], false @@ -31,6 +61,14 @@ const db = [ ['sqrxz2.adf', false, false, false], [false, true], [true, 16, 17, false], ['After the start, click the RMB for the trainer menu.
The color-stripes are normal, just wait...'], [], false ], + ['Super Obliteration', ['David Papworth', '-', 'Freeware'], '1993', + ['Super Obliteration.adf', false, false, false], [false, true], + [true, 16, 17, false], [], [], false + ], + ['Tanx', ['Robertz Gaz', '-', 'Public Domain'], '1991', + ['Tanx.adf', false, false, false], [false, true], + [true, 16, 17, false], [], [], false + ] ], [ ['242', 'Virtual Dreams', '1992', @@ -78,6 +116,10 @@ const db = [ [true, 16, 17, false], ['Insert the 2nd disk manually and
click the RMB when done.'], [], true ], + ['HipHop Hater', 'Mathias Olsson', '1991', + ['HipHop Hater.adf',false,false,false], [false, true], + [true, 16, 17, false], [], [], false + ], ['Ice', 'Silents', '1991', ['Ice.adf',false,false,false], [false, true], [true, 16, 17, false], ['Press LMB at the intro-screen'], [], false @@ -134,12 +176,12 @@ var dbNum = 0; const aros_rom_file = 'aros-amiga-m68k-rom.bin'; const aros_rom_url = 'http://'+window.location.hostname+'/db/'+aros_rom_file; const aros_rom_size = 0x80000; -const aros_rom_crc = 0xea48b4d1; //0xfc4635e1; +const aros_rom_crc = 0x48dfadd; //0xea48b4d1 const aros_ext_file = 'aros-amiga-m68k-ext.bin'; const aros_ext_url = 'http://'+window.location.hostname+'/db/'+aros_ext_file; const aros_ext_size = 0x80000; -const aros_ext_crc = 0x60871435; //0xc612f82e; - +const aros_ext_crc = 0xaaf211d6; //0x60871435 + var mode = 0; var paused = false; var dskchg = false; @@ -163,42 +205,42 @@ function Cache() { var roms = [null,null]; var disks = []; - this.loadRom = function(num) { - if (roms[num]) { - console.log('loadRom.loadRom() %d is cached', num); - return roms[num]; - } - console.log('loadRom.loadRom() downloading %d', num); - - var url, size, crc; - switch (num) { - case 0: - url = aros_rom_url; - size = aros_rom_size; - crc = aros_rom_crc; - break; - case 1: - url = aros_ext_url; - size = aros_ext_size; - crc = aros_ext_crc; - break; - } - var data = loadRemoteSync(url); - if (typeof(data) == 'number') { - alert('Can\'t download '+url+' (http status: '+data+')'); - } else { - if (data.length == size) { - //console.log(dechex(crc32(data))); - if (crc32(data) == crc) { - roms[num] = data; - return data; - } else - alert('Wrong checksum for '+url+' (is $'+dechex(crc32(data))+', should $'+dechex(crc)+')'); - } else - alert('Wrong file-length for '+url+' ('+size+')'); - } - return null; - } + this.loadRom = function (num) { + if (roms[num]) { + console.log('loadRom.loadRom() %d is cached', num); + return roms[num]; + } + console.log('loadRom.loadRom() downloading %d', num); + + var url, size, crc; + switch (num) { + case 0: + url = aros_rom_url; + size = aros_rom_size; + crc = aros_rom_crc; + break; + case 1: + url = aros_ext_url; + size = aros_ext_size; + crc = aros_ext_crc; + break; + } + var data = loadRemoteSync(url); + if (typeof(data) == 'number') { + alert('Can\'t download ' + url + ' (http status: ' + data + ')'); + } else { + if (data.length == size) { + //console.log(dechex(crc32(data))); + if (crc32(data) == crc) { + roms[num] = data; + return data; + } else + alert('Wrong checksum for ' + url + ' (is $' + dechex(crc32(data)) + ', should $' + dechex(crc) + ')'); + } else + alert('Wrong file-length for ' + url + ' (' + size + ')'); + } + return null; + }; this.loadDisk = function(url) { for (var i = 0; i < disks.length; i++) { @@ -230,7 +272,7 @@ function Cache() { /*-----------------------------------------------------------------------*/ /* utils */ -function dump(obj) { +/*function dump(obj) { var out = ''; if (obj) { for (var i in obj) { @@ -238,10 +280,7 @@ function dump(obj) { } } alert(out); - /*var pre = document.createElement('pre'); - pre.innerHTML = out; - document.body.appendChild(pre);*/ -} +}*/ function crc32(str, crc) { @@ -289,11 +328,6 @@ function crc32(str, crc) { return crc < 0 ? crc + 0x100000000 : crc; } -function openNewTab(url) { - window.open(url, '_blank'); - window.focus(); -} - function getSelectValue(e) { for (var i = 0; i < e.length; i++) { if (e[i].selected) return e[i].value; @@ -329,7 +363,7 @@ function disabled(id, d) { document.getElementById(id).disabled = d ? 'disabled' : ''; } -function toggleFullScreen() { +/*function toggleFullScreen() { if ((document.fullScreenElement && document.fullScreenElement !== null) || // alternative standard method (!document.mozFullScreenElement && !document.webkitFullScreenElement)) { // current working methods if (document.documentElement.requestFullScreen) { @@ -348,40 +382,40 @@ function toggleFullScreen() { document.webkitCancelFullScreen(); } } -} +}*/ -function loadLocalId(id, callback) { +/*function loadLocalId(id, callback) { var e = document.getElementById(id).files[0]; var reader = new FileReader(); reader.onload = callback; reader.readAsBinaryString(e); -} +}*/ function loadLocal(e, callback) { var reader = new FileReader(); reader.onload = callback; reader.readAsBinaryString(e); } -function loadRemote(url, size, crc, callback) { +/*function loadRemote(url, size, crc, callback) { var req = new XMLHttpRequest(); req.open('GET', url, true); req.overrideMimeType('text\/plain; charset=x-user-defined'); - req.onreadystatechange = function(e) { - if (req.readyState == 4) { - if (req.status == 200) { - if (req.responseText.length == size) { - if (crc === false || crc32(req.responseText) == crc) - callback(0, req.responseText); - else - callback(1, crc32(req.responseText)); - } else - callback(2, req.responseText.length); - } else - callback(3, req.status); - } - } + req.onreadystatechange = function (e) { + if (req.readyState == 4) { + if (req.status == 200) { + if (req.responseText.length == size) { + if (crc === false || crc32(req.responseText) == crc) + callback(0, req.responseText); + else + callback(1, crc32(req.responseText)); + } else + callback(2, req.responseText.length); + } else + callback(3, req.status); + } + }; req.send(null); -} +}*/ function loadRemoteSync(url) { var req = new XMLHttpRequest(); req.open('GET', url, false); @@ -539,7 +573,7 @@ function getSimpleConfig() { config.chipset.mask = SAEV_Config_Chipset_Mask_OCS; config.chipset.agnus_dip = false; /* A1000 */ - config.chipset.collision_level = SAEV_Config_Chipset_ColLevel_None; + config.chipset.collision_level = (item !== null && item[0] == 'Deluxe Galaga 2.4') ? SAEV_Config_Chipset_ColLevel_Sprite_Playfield : SAEV_Config_Chipset_ColLevel_None; config.blitter.immediate = (item !== null && item[8]) ? true : false; config.blitter.waiting = config.blitter.immediate ? 0 : 1; @@ -680,6 +714,7 @@ function fireButtonName(fire) { case 145: return 'Scroll lock'; case 49: return '1'; case 50: return '2'; + default: return 'ERROR'; } } @@ -721,8 +756,8 @@ function setConfig() { e = document.getElementById('cfg_chipset_type'); switch (config.chipset.mask) { - case SAEV_Config_Chipset_Mask_OCS: e[0].selected = true; break - case SAEV_Config_Chipset_Mask_ECS_AGNUS: e[1].selected = true; break + case SAEV_Config_Chipset_Mask_OCS: e[0].selected = true; break; + case SAEV_Config_Chipset_Mask_ECS_AGNUS: e[1].selected = true; break; case SAEV_Config_Chipset_Mask_ECS_DENISE: e[2].selected = true; break } document.getElementById('cfg_chipset_cl_enabled').checked = config.chipset.collision_level != SAEV_Config_Chipset_ColLevel_None; @@ -809,7 +844,6 @@ function setConfig() { styleDisplayBlock('cfg_keyborad_grp', config.keyboard.enabled != 0); document.getElementById('cfg_ports_0_enabled').checked = config.ports[0].type != SAEV_Config_Ports_Type_None; - e = document.getElementById('cfg_ports_0'); switch (config.ports[0].type) { case SAEV_Config_Ports_Type_Mouse: document.getElementById('cfg_ports_0')[0].selected = true; break; case SAEV_Config_Ports_Type_Joy0: document.getElementById('cfg_ports_0')[1].selected = true; break; @@ -824,8 +858,7 @@ function setConfig() { styleDisplayInline('cfg_ports_0_grp', config.ports[0].type != SAEV_Config_Ports_Type_None); styleDisplayInline('cfg_ports_0_grp2', config.ports[0].type == SAEV_Config_Ports_Type_Joy0); - e = document.getElementById('cfg_ports_1_enabled').checked = config.ports[1].type != SAEV_Config_Ports_Type_None; - e = document.getElementById('cfg_ports_1'); + document.getElementById('cfg_ports_1_enabled').checked = config.ports[1].type != SAEV_Config_Ports_Type_None; switch (config.ports[1].type) { case SAEV_Config_Ports_Type_Joy1: document.getElementById('cfg_ports_1')[0].selected = true; break; } @@ -838,7 +871,7 @@ function setConfig() { setFireButton('cfg_ports_1_fire_2', config.ports[1].fire[1]); styleDisplayInline('cfg_ports_1_grp', config.ports[1].type == SAEV_Config_Ports_Type_Joy1); - e = document.getElementById('cfg_serial_enabled').checked = config.serial.enabled != 0; + document.getElementById('cfg_serial_enabled').checked = config.serial.enabled != 0; styleDisplayInline('dskchg_grp', 1); } @@ -848,6 +881,7 @@ function getMask(type) { case SAEV_Config_Chipset_Type_OCS: return SAEV_Config_Chipset_Mask_OCS; case SAEV_Config_Chipset_Type_ECS_AGNUS: return SAEV_Config_Chipset_Mask_ECS_AGNUS; case SAEV_Config_Chipset_Type_ECS_DENISE: return SAEV_Config_Chipset_Mask_ECS_DENISE; + default: return SAEV_Config_Chipset_Mask_OCS; } } @@ -1059,7 +1093,9 @@ function stop() { if (paused) { var e = document.getElementById('status_pr'); e.value = 'pause'; - e.onclick = function() { pause(1); } + e.onclick = function () { + pause(1); + }; paused = false; } if (dskchg) @@ -1078,14 +1114,16 @@ function stop() { document.body.style.backgroundColor = '#fff'; } -function reset(p) { +function reset() { SAE({cmd:'reset'}); } function pause(p) { var e = document.getElementById('status_pr'); e.innerHTML = p ? 'Resume' : 'Pause'; - e.onclick = function() { pause(1 - p); } + e.onclick = function () { + pause(1 - p); + }; paused = p; @@ -1203,7 +1241,8 @@ function romAROS() { document.getElementById('cfg_ext_addr')[0].selected = true; styleDisplayInline('cfg_ext_remove', 1); styleDisplayTableRow('cfg_ext_addr_grp', 1); - disabled('cfg_rom_aros', 0); + disabled('cfg_rom_aros', 0); + return true; } function romSelect() { @@ -1273,7 +1312,7 @@ function floppyUpdate(n) { function floppyInsert(n) { var e = document.getElementById('cfg_df'+n+'_file').files[0]; - var ok = false; + var ok = true; //false; if (!e) return; /*if (e.size == 0xDC000) { @@ -1290,7 +1329,7 @@ function floppyInsert(n) { } else alert('Invalid diskimage-size, 880 or 1460 kb.'); */ - ok = true; + if (ok) loadLocal(e, function (event) { config.floppy.drive[n].name = e.name; @@ -1435,7 +1474,7 @@ function dskchgInsert() { if (!dskchg) return; var n = getSelectValue(document.getElementById('cfg_dskchg_unit')); var e = document.getElementById('cfg_dskchg_file').files[0]; - var ok = false; + var ok = true; //false; if (!e) return; /*if (e.size == 0xDC000) { @@ -1450,8 +1489,7 @@ function dskchgInsert() { alert('DF'+n+' is configured as DD-drive (880kb), but you selected a HD-diskimage (1760kb).'); } else alert('Invalid diskimage-size, 880 or 1460 kb.'); - */ - ok = true; + */ if (ok) { loadLocal(e, function (event) { dskchgClose(); diff --git a/readme.htm b/readme.htm index 1fdd151..d00ccbd 100644 --- a/readme.htm +++ b/readme.htm @@ -5,12 +5,6 @@ -
@@ -101,39 +95,39 @@ @@ -284,7 +278,7 @@
Game -
Demo -