Fixed FileDump for clients that request the "bytes" format
This commit is contained in:
parent
a408730928
commit
85e84d2322
3 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pcjs/1.16.0/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pcjs/1.16.0/machine.xsl"?>
|
||||||
<machine id="ibm5160" class="pc" border="1" pos="center" width="1000px" style="background-color:white">
|
<machine id="ibm5160" class="pc" border="1" width="1000px" pos="center" style="background-color:white">
|
||||||
<name>IBM PC XT (Model 5160), CGA, 256K, WIN101</name>
|
<name>IBM PC XT (Model 5160), CGA, 256K, WIN101</name>
|
||||||
<computer id="xt-cga-256k" name="IBM PC XT"/>
|
<computer id="xt-cga-256k" name="IBM PC XT"/>
|
||||||
<cpu id="cpu8088" model="8088" autostart="true"/>
|
<cpu id="cpu8088" model="8088" autostart="true"/>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pcjs/1.16.0/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pcjs/1.16.0/machine.xsl"?>
|
||||||
<machine id="ibm5160" class="pc" border="1" pos="center" width="1000px" style="background-color:white">
|
<machine id="ibm5160" class="pc" border="1" width="1000px" pos="center" style="background-color:white">
|
||||||
<name>IBM PC XT (Model 5160), CGA, 512K, WIN101</name>
|
<name>IBM PC XT (Model 5160), CGA, 512K, WIN101</name>
|
||||||
<computer id="xt-cga-512k" name="IBM PC XT"/>
|
<computer id="xt-cga-512k" name="IBM PC XT"/>
|
||||||
<cpu id="cpu8088" model="8088" autostart="true"/>
|
<cpu id="cpu8088" model="8088" autostart="true"/>
|
||||||
|
|
|
||||||
|
|
@ -399,11 +399,12 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offData)
|
||||||
FileDump.prototype.loadMap = function(sFilePath, done)
|
FileDump.prototype.loadMap = function(sFilePath, done)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* The HEX format doesn't support MAP files. For all other (JSON) formats, we assume that the JSON
|
* The BYTES and HEX formats don't support MAP files, because the clients expect those format requests
|
||||||
|
* to return an Array of bytes, not an Object. For all other (JSON) formats, we assume that the JSON
|
||||||
* is "unwrapped" at this point, and that even if loadMap() doesn't find a map file, it will still wrap
|
* is "unwrapped" at this point, and that even if loadMap() doesn't find a map file, it will still wrap
|
||||||
* the resulting JSON with braces.
|
* the resulting JSON with braces.
|
||||||
*/
|
*/
|
||||||
if (this.sFormat != DumpAPI.FORMAT.HEX) {
|
if (this.sFormat != DumpAPI.FORMAT.BYTES && this.sFormat != DumpAPI.FORMAT.HEX) {
|
||||||
var obj = this;
|
var obj = this;
|
||||||
var sMapPath = sFilePath.replace(/\.(rom|json)$/, ".map");
|
var sMapPath = sFilePath.replace(/\.(rom|json)$/, ".map");
|
||||||
if (str.endsWith(sMapPath, ".map")) {
|
if (str.endsWith(sMapPath, ".map")) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue