Search found 56 matches
- Sun Feb 20, 2022 7:57 pm
- Forum: Megadrive/Genesis
- Topic: EXG instruction encoding
- Replies: 4
- Views: 9266
Re: EXG instruction encoding
A biut late, but: In an asm file (generated by Exodus' active disassembly) there's an EXG instruction at a particular address, like this: EXG D2, D0 Viewing the same location in several emulators (Exodus, Regen) shows the same instruction[1]. The raw value is 0xC540. Howevever, when I assemble my ve...
- Tue Jul 13, 2021 7:47 pm
- Forum: Megadrive/Genesis
- Topic: VRAM write macro $3FFF mask
- Replies: 3
- Views: 6122
Re: VRAM write macro $3FFF mask
move.l #(vdp_cmd_vram_write)|((\addr)&$3FFF)<<16|(\addr)>>14, vdp_control add.l #vram_addr_plane_a, d1 ; Add VRAM address offset lsl.l #0x2, d1 ; Shift bits 14/15 of address to bits 16/17 lsr.w #0x2, d1 ; Shift lower word back swap d1 ; Swap address hi/lo ori.l #vdp_cmd_vram_write, d1 ; OR in VRAM ...
- Tue Feb 02, 2021 1:36 pm
- Forum: Megadrive/Genesis
- Topic: I'm officially building a microcode-level 68000 core
- Replies: 52
- Views: 134006
Re: I'm officially building a microcode-level 68000 core
Posting here because it might be useful for the effort: Danorf resurfaced last year with an updated yacht and a full transcription of US4325121. Here is a mirror of yacht v1.1, and here is a mirror of his transcription. Here is the thread in Atari Forums where he posted the updates. Edit: fixed the ...
- Tue Dec 11, 2018 11:21 am
- Forum: Megadrive/Genesis
- Topic: 68k patents
- Replies: 5
- Views: 12249
Re: 68k patents
Ah, so you have information from the actual chip instead of from patents. Fair enough, I eagerly await the corrections ![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)
- Mon Dec 03, 2018 8:21 am
- Forum: Megadrive/Genesis
- Topic: 68k patents
- Replies: 5
- Views: 12249
Re: 68k patents
I'm no aware about any patents with the microcode updated with DBcc and the actual exception processing. Yes, which is what I wanted to prove for sure. I'm not exactly sure what you mean by "the address error triggers". If you mean before exception logic microcode starts, then yes, of course, there...
- Wed Nov 14, 2018 8:36 pm
- Forum: Hardware
- Topic: Controllers and wrong I/O pin directions
- Replies: 9
- Views: 14060
- Sat Oct 13, 2018 10:28 am
- Forum: Megadrive/Genesis
- Topic: 68k patents
- Replies: 5
- Views: 12249
68k patents
I have been taking a dive in the 68k patents recently, trying to find if there was a version with a more recent version of the microcode. Additionally, I was also looking to see if any other patents might have the microcode from page 164 of US4325121, which is cut off, or maybe some additional infor...
- Sat Sep 29, 2018 9:29 am
- Forum: Megadrive/Genesis
- Topic: 68k edge case: btst dN,#immed
- Replies: 12
- Views: 17255
Re: 68k edge case: btst dN,#immed
Oooh, I didn't realize he had gotten that far with decoding the microcode. I'll definitely have to check that out when I get time. One other thing Galibert is doing which I think will be of interest to you and Nemesis is this simulator . It currently seems to simulate only microcode control flow, a...
- Tue Sep 25, 2018 9:26 am
- Forum: Megadrive/Genesis
- Topic: 68k edge case: btst dN,#immed
- Replies: 12
- Views: 17255
Re: 68k edge case: btst dN,#immed
How many instructions accept immediate as destination? Admittedly I'm just as clueless, but I wouldn't be surprised if that turns out to play a factor into it. According to PRM, and restricted to original 68000, one (this one). In 68020 and descendants, you can also do tst.x #immed, but I have no i...
- Sun Sep 23, 2018 7:38 am
- Forum: Megadrive/Genesis
- Topic: 68k edge case: btst dN,#immed
- Replies: 12
- Views: 17255
Re: 68k edge case: btst dN,#immed
Make me understand your dilemma, is your point that “btst. B d?, #immediate.b” uses the long mode instead of the byte mode? Meaning it performs like a “btst. L d?, #immediate.b” instead. No, the issuei found was that the timing for the instruction breaks the pattern of every other instruction: in t...
- Fri Sep 21, 2018 5:20 pm
- Forum: Megadrive/Genesis
- Topic: 68k edge case: btst dN,#immed
- Replies: 12
- Views: 17255
68k edge case: btst dN,#immed
So, I was reviewing some code optimizations I wrote some time back, when I case across one I had forgotten: btst.b d0,#SetMask This allows for quick testing if an element belongs to a small set, which is represented by SetMask. Remembering that this form of btst is modulo 8, this can be used if you ...
- Wed Sep 12, 2018 9:30 am
- Forum: Exodus
- Topic: Exodus 2.1 release soon (Now available!)
- Replies: 44
- Views: 130357
Re: Exodus 2.1 release soon (Now available!)
This is actually done properly already. The M68000 core in Exodus properly implements the TAS opcode, it's the VDP actually that breaks this. Ah, sorry, I was mixing up my emulators: it is actually higan which does it incorrectly by breaking the tas instruction on the 68k core. Also interesting is ...
- Tue Sep 04, 2018 12:19 pm
- Forum: Exodus
- Topic: Exodus 2.1 release soon (Now available!)
- Replies: 44
- Views: 130357
Re: Exodus 2.1 release soon (Now available!)
In terms of the Mega CD and the 32x, I do want to reach those systems eventually, but note that those addons greatly increase the complexity of the Mega Drive system as a whole, and emulating them accurately absolutely depends on good timing accuracy in particular. When you do get around to that: t...
- Wed Aug 29, 2018 10:49 am
- Forum: Megadrive/Genesis
- Topic: 68000 programming optimization tips? (for speed)
- Replies: 28
- Views: 38894
Re: 68000 programming optimization tips? (for speed)
I think it's meant to return -1, 0 or +1. At least that's what sign functions usually do. You guessed right. Still trying to get my head around it, mind you (mainly the NEGX). It's only purpose is to set X if d0 was nonzero. Note that subx d1,d1 preserves X, which is important for the next if d0 st...
- Mon Aug 27, 2018 9:32 am
- Forum: Megadrive/Genesis
- Topic: 68000 programming optimization tips? (for speed)
- Replies: 28
- Views: 38894
Re: 68000 programming optimization tips? (for speed)
Speaking of X, there is a neat thing you can do with it: add.w d0,d0 subx.w d1,d1 negx.w d0 addx.w d1,d1 The result: d1 = sign(d0). You can also use subx and addx to compute the min, max, and minmax of 2 numbers, but it is slower than the branch versions (but might be useful if you need the function...