Skip to content

Reference measurement differences #1

@lgblgblgb

Description

@lgblgblgb

Thanks to @ki-bo we have some measurements of needed opcode cycles to be executed on MEGA65. Since I opted for different method to measure (mainly because Xemu's precision is not enough for that method), first, I wanted to know that my method gives the same values as his ones. The preliminary tests shows, that mostly it does (which is satisfying) however there are interesting differences I can't explain. Since most of the tests are OK and the method is really the same for all opcodes, I cannot simply explain this with my method, at least not easily. To be precise, I have all opcode tests (all MEGA65 opcodes, so of course all the ones from @ki-bo as well), and only 6 differs.

Though I am not ready yet to have all the opcodes tested what he did (and for sure, my goal is to test all opcodes), so far the differences (ref = @ki-bo's result, my = my measurement with megacyc):

ext opcode asm my ref result
$00 $21 AND ($nn,X) 7 8 MISMATCH
$00 $31 AND ($nn),Y 7 8 MISMATCH
$00 $32 AND ($nn),Z 7 8 MISMATCH
$00 $82 STA ($nn,SP),Y 42 7 MISMATCH
$02 $B2 LDA [$nn],Z 13 10 MISMATCH
$00 $E2 LDA ($nn,SP),Y 58 8 MISMATCH

Interesting that with addressing mode ($nn,X), ($nn),Y and ($nn),Z I have got different results (faster by one cycle).

UPDATE: there were false alarms here before: with INQ $nn @ki-bo mentioned below (#1 (comment)) this is a non-issue.

UPDATE: with newer MEGA65-core the RTS #$nn issue gone away as well.

UPDATE: the "SP" based ones are radically different! No idea what happens here. Now, I have all MEGA65 opcodes (hopefully ... I've already found one bug to mis-label one ...)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions