@gaialabs/core 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -28,7 +28,12 @@ var QuintetLZ = class _QuintetLZ {
|
|
|
28
28
|
dictionary.fill(_QuintetLZ.DICTIONARY_INIT);
|
|
29
29
|
let dictPosition = _QuintetLZ.DICTIONARY_OFFSET;
|
|
30
30
|
let outPosition = 0;
|
|
31
|
-
|
|
31
|
+
let dstLen = bitStream.readShort();
|
|
32
|
+
if (dstLen === 0) {
|
|
33
|
+
return srcData.slice(srcPosition + 2, srcStop);
|
|
34
|
+
} else if (dstLen & 32768) {
|
|
35
|
+
dstLen = 65536 - dstLen;
|
|
36
|
+
}
|
|
32
37
|
const outBuffer = new Uint8Array(dstLen);
|
|
33
38
|
while (bitStream.currentPosition < srcStop && outPosition < dstLen) {
|
|
34
39
|
if (bitStream.readBit()) {
|
|
@@ -859,7 +864,7 @@ var AddressingModeHandler = class {
|
|
|
859
864
|
if (addr.isROM) {
|
|
860
865
|
const wrapper = new LocationWrapper(addr.toInt(), AddressType.Offset);
|
|
861
866
|
if (isJump) {
|
|
862
|
-
const type = isIndexedIndirect ? "
|
|
867
|
+
const type = isIndexedIndirect ? "&Code" : "Code";
|
|
863
868
|
const name = this._blockReader.noteType(wrapper.location, type, isPush, registers);
|
|
864
869
|
if (isPush) {
|
|
865
870
|
operands.push(`&${name}-1`);
|
|
@@ -3780,7 +3785,7 @@ var RomGenerator = class {
|
|
|
3780
3785
|
}
|
|
3781
3786
|
async writeRom(blockLookup, entryPoints, chunkFiles, asmFiles) {
|
|
3782
3787
|
const romWriter = new RomWriter(entryPoints, "GAIALABS", "01JG ");
|
|
3783
|
-
for (const file of chunkFiles
|
|
3788
|
+
for (const file of chunkFiles) await romWriter.writeFile(file, blockLookup);
|
|
3784
3789
|
romWriter.writeHeader();
|
|
3785
3790
|
romWriter.writeEntryPoints(asmFiles);
|
|
3786
3791
|
romWriter.writeChecksum();
|