Make sure all machines support JSON-encoded resources with either 'longs' or 'data' arrays

This commit is contained in:
Jeff Parsons 2017-02-28 16:20:49 -08:00 • committed by Jeff Parsons
commit 51274c1a30
9 changed files with 25 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -205,7 +205,11 @@ ROM.prototype.doneLoad = function(sURL, sROMData, nErrorCode)
*/
var rom = eval("(" + sROMData + ")");
var ab = rom['bytes'];
var adw = rom['data'];
/*
* Resource 'longs' should always be 32-bit DWORD values, whereas 'data' bit lengths
* will vary according to the machine architecture for which the resource was designed.
*/
var adw = rom['longs'] || rom['data'];
if (ab) {
this.abROM = ab;

View file

@ -189,7 +189,11 @@ class ROM8080 extends Component {
*/
var rom = eval("(" + sROMData + ")");
var ab = rom['bytes'];
var adw = rom['data'];
/*
* Resource 'longs' should always be 32-bit DWORD values, whereas 'data' bit lengths
* will vary according to the machine architecture for which the resource was designed.
*/
var adw = rom['longs'] || rom['data'];
if (ab) {
this.abROM = ab;

View file

@ -209,7 +209,11 @@ class ROM extends Component {
*/
var rom = eval("(" + sROMData + ")");
var ab = rom['bytes'];
var adw = rom['data'];
/*
* Resource 'longs' should always be 32-bit DWORD values, whereas 'data' bit lengths
* will vary according to the machine architecture for which the resource was designed.
*/
var adw = rom['longs'] || rom['data'];
if (ab) {
this.abROM = ab;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long