@gaialabs/core 0.1.12 → 0.1.13
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 +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BitStream,
|
|
1
|
+
import { BitStream, RomProcessingConstants, Op, RegisterType, Address, ChunkFileUtils, BlockReaderConstants, createTableEntry, ChunkFile, BinType, createChunkFileFromDbFile, createChunkFileFromDbBlock, LocationWrapper, CompressionRegistry, Word, Byte, StatusFlags, AddressSpace, AddressType, MemberType, readJsonFile, getDirectory, TypedNumber, AsmBlock, Long, summaryFromSupabaseByProject, crc32_buffer, DbRootUtils } from '@gaialabs/shared';
|
|
2
2
|
|
|
3
3
|
// src/rom/project.ts
|
|
4
4
|
var QuintetLZ = class _QuintetLZ {
|
|
@@ -713,9 +713,11 @@ var AddressingModeHandler = class {
|
|
|
713
713
|
case "Immediate":
|
|
714
714
|
this.handleImmediateMode(code.mnem, context.size, operands, reg);
|
|
715
715
|
break;
|
|
716
|
+
case "AbsoluteIndexedIndirect":
|
|
717
|
+
this.handleAbsoluteMode(code.mnem, void 0, context.nextAddress, reg.dataBank, operands, reg, true);
|
|
718
|
+
break;
|
|
716
719
|
case "AbsoluteIndirect":
|
|
717
720
|
case "AbsoluteIndirectLong":
|
|
718
|
-
case "AbsoluteIndexedIndirect":
|
|
719
721
|
case "Absolute":
|
|
720
722
|
case "AbsoluteIndexedX":
|
|
721
723
|
case "AbsoluteIndexedY":
|
|
@@ -845,19 +847,20 @@ var AddressingModeHandler = class {
|
|
|
845
847
|
const stackOperations = new StackOperations(reg, this._blockReader);
|
|
846
848
|
stackOperations.handleStackOperation(mnemonic);
|
|
847
849
|
}
|
|
848
|
-
handleAbsoluteMode(mnemonic, xBank1, next, dataBank, operands, registers) {
|
|
850
|
+
handleAbsoluteMode(mnemonic, xBank1, next, dataBank, operands, registers, isIndexedIndirect = false) {
|
|
849
851
|
let refLoc = this._dataReader.readUShort();
|
|
850
852
|
const isPush = this.isPushInstruction(mnemonic);
|
|
851
853
|
if (isPush) {
|
|
852
854
|
refLoc++;
|
|
853
855
|
}
|
|
854
|
-
const isJump = isPush || this.isJumpInstruction(mnemonic);
|
|
856
|
+
const isJump = isPush || isIndexedIndirect || this.isJumpInstruction(mnemonic);
|
|
855
857
|
const bank = xBank1 ?? (isJump ? this._dataReader.position >> 16 : dataBank ?? 129);
|
|
856
858
|
const addr = new Address(bank, refLoc);
|
|
857
859
|
if (addr.isROM) {
|
|
858
860
|
const wrapper = new LocationWrapper(addr.toInt(), AddressType.Offset);
|
|
859
861
|
if (isJump) {
|
|
860
|
-
const
|
|
862
|
+
const type = isIndexedIndirect ? "*Code" : "Code";
|
|
863
|
+
const name = this._blockReader.noteType(wrapper.location, type, isPush, registers);
|
|
861
864
|
if (isPush) {
|
|
862
865
|
operands.push(`&${name}-1`);
|
|
863
866
|
return;
|