Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Assembler question, if i may:
Source code line 283 has this instruction:

bit #$80

In the .prg file this is translated as opcode $89, which is illegal opcode NOP imm.

How is that working?

Especially since XA says: "undocumented opcodes are intentionally not supported."


And when i compile your source code, the generated code is partly at different locations. Weird.

(+1)

P.S. Fun litte game! I won! ;-)

(1 edit)

Yes, you are right. That instruction is wrong. It was supposed to be simply bit $80 and test the acculumator. Somehow, the assembler didn’t flag this. It still works because it is effectively a NOP as you mentioned, and the lda PLAYER_HP_H on line 281 already sets the negative flag appropriately. Good catch! That line can be removed. I’ll fix it along with an upcoming feature update.

The version of xa that I have is 2.4.0 and it was installed from the standard Ubuntu 24.04 repository. This change looks like it was introduced in 2.4.1 and Ubuntu hasn’t updated yet.