I think some assemblers want (lev_tbl,d0.l,pc)
No, only if the value in D0 ever grows larger than 64K do you need to use D0.L in the index mode.
Search found 6 matches
- Tue Nov 01, 2022 12:20 pm
- Forum: Megadrive/Genesis
- Topic: Help in understanding 68K indexed indirect addressing
- Replies: 9
- Views: 5240
- Tue Nov 01, 2022 10:14 am
- Forum: Megadrive/Genesis
- Topic: Help in understanding 68K indexed indirect addressing
- Replies: 9
- Views: 5240
Re: Help in understanding 68K indexed indirect addressing
Oh, brain farted there, the first one has to be LEA LEA LEV_TBL(PC),A0 ASL.W #2,D0 ; I have to multiply the number from LEV_NR by 4x because I have an array every 4 bytes (.L). MOVE.L 0(A0,D0.W),A0 JMP (A0) Note that if LEV_TBL is close to the code (d8 displacement), it can also be (if I remember th...
- Tue Nov 01, 2022 1:41 am
- Forum: Megadrive/Genesis
- Topic: Help in understanding 68K indexed indirect addressing
- Replies: 9
- Views: 5240
Re: Help in understanding 68K indexed indirect addressing
JMP (A0) jumps to A0. You want to do something like
Code: Select all
MOVE.L LEV_TBL(PC),A0
ASL.W #2,D0 ; I have to multiply the number from LEV_NR by 4x because I have an array every 4 bytes (.L).
MOVE.L 0(A0,D0.W),A0
JMP (A0)
- Sat Jul 09, 2022 7:23 pm
- Forum: Megadrive/Genesis
- Topic: Hunting down remaining emulator bugs
- Replies: 3
- Views: 7133
Re: Hunting down remaining emulator bugs
Thanks for the hint! I tried making it so that register writes latch the lower part of the VDP address as genplusgx does, but that alone doesn't seem to do the trick. Can't really try latching the CD bits without significant effort (due to how I implemented all the nonsense), but I think CD1=1 CD0=0...
- Fri Jul 08, 2022 5:49 pm
- Forum: Megadrive/Genesis
- Topic: Hunting down remaining emulator bugs
- Replies: 3
- Views: 7133
Re: Hunting down remaining emulator bugs
If not, that's fine, too. It infact is. Anyways, if anyone wonders, I did infact figure out the shadow issue for Panorama Cotton... by way of writing a NeoGeo emulator with the same 68000 core and then debugging why Waku Waku 7 didn't boot on that. True big brain solution. (Note: the same issue als...
- Fri Feb 18, 2022 8:24 pm
- Forum: Megadrive/Genesis
- Topic: Hunting down remaining emulator bugs
- Replies: 3
- Views: 7133
Hunting down remaining emulator bugs
So, over the last year or so, I've assembled pieces of code that eventually congealed into a decently functional Megadrive emulator that runs on Parallax P2 microcontrollers (about ~7K lines of assembly, almost all written from scratch). It's a high-level emulator (68000/VDP/Z80/YM all run asynchron...