From ef4f60166dc116845de0ef91e0e060b6b98aacfb Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 11 Aug 2020 18:02:04 -0700 Subject: [PATCH] support Odin (#28) --- src/anti-m.a | 7 +++++-- src/idalphabeta.a | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 src/idalphabeta.a diff --git a/src/anti-m.a b/src/anti-m.a index 6d721c4..a75f4d3 100644 --- a/src/anti-m.a +++ b/src/anti-m.a @@ -6,7 +6,7 @@ ;------------------------------- ; Anti-M ; a 4am hack -; (c) 2019 by 4am +; (c) 2019-2020 by 4am ; ; Permission is hereby granted, free of charge, to any ; person obtaining a copy of this software and associated @@ -187,6 +187,8 @@ Tracer bcc BeginTheBoot jsr IDProgame bcc BeginTheBoot + jsr IDAlphaBeta + bcc BeginTheBoot ; [execution falls through here] ; [and runs anyway] @@ -253,7 +255,7 @@ StringTable !word @mainmenu @header - !text "Anti-M v1.6 by 4am 2019-11-09" + !text "Anti-M v1.7 by 4am 2020-08-11" !text "________________________________________",$8D !text $8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D,$00 @mainmenu @@ -270,3 +272,4 @@ StringTable !src "src/idprodos.a" !src "src/idprogame.a" !src "src/idpersonal.a" + !src "src/idalphabeta.a" diff --git a/src/idalphabeta.a b/src/idalphabeta.a new file mode 100644 index 0000000..1685cc9 --- /dev/null +++ b/src/idalphabeta.a @@ -0,0 +1,37 @@ +; Alpha-Beta tracer +; written by qkumba +; +; tested on +; - Odin +; +IDAlphaBeta + lda #8 + ldx #1 + ldy #15 + jsr CompareMemory + !byte $48 ;PHA + !byte $28 ;PLP + !byte $8C,$F4,$03 ;STY $03F4 + !byte $2C,$81,$C0 ;BIT $C081 + !byte $2C,$81,$C0 ;BIT $C081 + !byte $98 ;TYA + !byte $99,$08,$FF ;STA $FF08,Y + bcs @exit + +; patch code to offer magic values + lda #$A9 ;LDA + sta $833 + sta $83B + sta $841 + ldx #$FA + stx $834 + lda #$EA + sta $835 + sta $83D + sta $843 + inx + stx $83C + lda #3 + sta $842 +@exit + rts