Search found 53 matches

by flamewing
Tue Dec 11, 2018 11:21 am
Forum: Megadrive/Genesis
Topic: 68k patents
Replies: 5
Views: 1766

Re: 68k patents

Ah, so you have information from the actual chip instead of from patents. Fair enough, I eagerly await the corrections :D
by flamewing
Mon Dec 03, 2018 8:21 am
Forum: Megadrive/Genesis
Topic: 68k patents
Replies: 5
Views: 1766

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...
by flamewing
Wed Nov 14, 2018 8:36 pm
Forum: Hardware
Topic: Controllers and wrong I/O pin directions
Replies: 9
Views: 2152

Re: Controllers and wrong I/O pin directions

Miquel wrote:
Wed Nov 14, 2018 6:59 pm
Assuming TH means high:
It doesn't: TH, TL, and TR are the names of pins used for I/O in the Mega Drive which can be configured for either input or output.
by flamewing
Sat Oct 13, 2018 10:28 am
Forum: Megadrive/Genesis
Topic: 68k patents
Replies: 5
Views: 1766

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...
by flamewing
Sat Sep 29, 2018 9:29 am
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 2080

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...
by flamewing
Tue Sep 25, 2018 9:26 am
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 2080

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...
by flamewing
Sun Sep 23, 2018 7:38 am
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 2080

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...
by flamewing
Fri Sep 21, 2018 5:20 pm
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 2080

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 ...
by flamewing
Wed Sep 12, 2018 9:30 am
Forum: Exodus
Topic: Exodus 2.1 release soon (Now available!)
Replies: 40
Views: 6237

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 ...
by flamewing
Tue Sep 04, 2018 12:19 pm
Forum: Exodus
Topic: Exodus 2.1 release soon (Now available!)
Replies: 40
Views: 6237

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...
by flamewing
Wed Aug 29, 2018 10:49 am
Forum: Megadrive/Genesis
Topic: 68000 programming optimization tips? (for speed)
Replies: 27
Views: 5562

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...
by flamewing
Mon Aug 27, 2018 9:32 am
Forum: Megadrive/Genesis
Topic: 68000 programming optimization tips? (for speed)
Replies: 27
Views: 5562

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...
by flamewing
Sat May 05, 2018 9:17 am
Forum: Megadrive/Genesis
Topic: GAS: force move instead movea?
Replies: 9
Views: 1794

Re: GAS: force move instead movea?

These two are identical, true; but note they use different addressing modes. Consider these differences: move.l 0x12345678, %a0 Reads longword at address 0x12345678, and stores value read on a0 lea 0x12345678, %a0 move.l #0x12345678, %a0 Stores 0x12345678 into a0. move.l 18(%a0, %d0.l), %a0 Computes...
by flamewing
Sat May 05, 2018 8:32 am
Forum: Megadrive/Genesis
Topic: GAS: force move instead movea?
Replies: 9
Views: 1794

Re: GAS: force move instead movea?

If you also look at pages 219 and 222 of M68000PRM, you can also see that move and movea use the same encoding; the only difference between them is that move does not accept destination address registers (page 220) but movea only accepts it. Assemblers typically allow you to write move instead of mo...
by flamewing
Thu Jan 11, 2018 8:27 am
Forum: Megadrive/Genesis
Topic: Undefined behavior for ABCD and SBCD
Replies: 36
Views: 10132

Re: Undefined behavior for ABCD and SBCD

this is true only for Sega emulators I guess. UAE-based emulators (incl. Atari ones like Hatari or Aranym) do that nearly 100% correct -- only a few cases of NBCD's V flag are wrong. Thanks for confirming that even the non-Sega emulators also got the BCD instructions wrong :-) (even if only slightl...