Search found 56 matches
- Sat May 05, 2018 9:17 am
- Forum: Megadrive/Genesis
- Topic: GAS: force move instead movea?
- Replies: 9
- Views: 8147
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...
- Sat May 05, 2018 8:32 am
- Forum: Megadrive/Genesis
- Topic: GAS: force move instead movea?
- Replies: 9
- Views: 8147
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...
- Thu Jan 11, 2018 8:27 am
- Forum: Megadrive/Genesis
- Topic: Undefined behavior for ABCD and SBCD
- Replies: 36
- Views: 43122
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...
- Wed Nov 22, 2017 4:30 am
- Forum: Megadrive/Genesis
- Topic: Sprite List Code Messed Up
- Replies: 28
- Views: 18289
Re: Sprite List Code Messed Up
I've got just shy of 100 transcribed which is pretty far from complete, though it probably covers a lot of the more "interesting" cases. I've thought about trying to make a concerted effort to transcribe everything, but I really want to try and decode the production micro/nanocode instead. Worked o...
- Tue Nov 21, 2017 8:26 pm
- Forum: Megadrive/Genesis
- Topic: Sprite List Code Messed Up
- Replies: 28
- Views: 18289
Re: Sprite List Code Messed Up
Obviously both things add cycles. "Register read + operation + register write" uses 2 cycles at microcode level. The person who 2 minutes ago was avoiding byte instructions because he believed, without evidence, that they were slower and 2 bytes longer is trying to argue about microcode? Fine, if y...
- Thu Nov 16, 2017 10:08 pm
- Forum: Megadrive/Genesis
- Topic: Sprite List Code Messed Up
- Replies: 28
- Views: 18289
Re: Sprite List Code Messed Up
FYI, I decided to completely ignoring your false equivalences with flat Earth and no one else in the solar system. "clr" always reads the operand first, no matter the address mode, because it shares microopcode with "move" like opcodes, this way pre-decrement and post-increment is supported, and the...
- Wed Nov 15, 2017 10:04 am
- Forum: Megadrive/Genesis
- Topic: Sprite List Code Messed Up
- Replies: 28
- Views: 18289
Re: Sprite List Code Messed Up
1) .b instructions are 2 byte larger (except for move) so they are necessarily slower. That is not true at all. This is true for immediate .l instructions, but for most other instructions, .b and .w differ by a couple of bits. Those that are different by more than a couple bits are generally shorte...
- Tue Nov 14, 2017 5:49 pm
- Forum: Megadrive/Genesis
- Topic: Sprite List Code Messed Up
- Replies: 28
- Views: 18289
Re: Sprite List Code Messed Up
Unless necessary avoid working with byte (.b) or long (.l) addressing , word (.w) it's ideal for most cases; because it's faster and avoids the use of extra instructions. .b is neither faster nor slower than .w, in general. In some cases, .b is faster (sCC instructions, bCC.s when branch is not tak...
- Fri Sep 01, 2017 3:34 pm
- Forum: Tools
- Topic: aPLib decruncher for 68000
- Replies: 48
- Views: 69255
Re: aPLib decruncher for 68000
Yeah, it can definitely achieve perfect compression with my generic LZSS backend; this format is a LZ variant. It won't be fast, though, because the sliding window is limited only by file size, as is the lenght of the lookahead buffer; because of this, match finding will dominate, and worst case per...
- Fri Sep 01, 2017 10:03 am
- Forum: Tools
- Topic: Algorithm for splitting sprites
- Replies: 70
- Views: 179443
Re: Algorithm for splitting sprites
The formula is just a function cost, then depending the user you can affect different cost to whatever you want (number of sprite, vram usage, scanline density..) This (which is what I had said before). There should be a way to specify what is more important to the person writing the game. Concrete...
- Fri Sep 01, 2017 9:19 am
- Forum: Tools
- Topic: aPLib decruncher for 68000
- Replies: 48
- Views: 69255
Re: aPLib decruncher for 68000
Can you give more details on this format? It sounds like the kind of thing that could be brought to perfect compression level using my generic LZSS backend.
- Wed Aug 30, 2017 8:25 am
- Forum: Tools
- Topic: Algorithm for splitting sprites
- Replies: 70
- Views: 179443
Re: Algorithm for splitting sprites
Except it minimizes neither of those measures... if you are willing to sacrifice a few extra tiles in VRAM. For example: _____JJJ____ __AAAAFFFF__ __AAAAFFFF__ __AAAAFFFF__ iIIbBBBEEEE_ IIIBBBBEEEE_ IIiBBBBDDD__ HhHHGGGDDD__ HhHHGGGDDD__ HHHHGGGCCCC_ _____KKCCCC_ _____kKCCCC_ This sacrifices 6 tiles...
- Tue Aug 22, 2017 11:09 am
- Forum: Megadrive/Genesis
- Topic: Shadow/Highlight
- Replies: 13
- Views: 13948
Re: Shadow/Highlight
Or use it to store the color for a light (e.g. Pulseman's watch) so it shows up lit while in shadow =P (ironic example since Pulseman doesn't ever use S/H) That is a very neat idea. What about when color 14 shows up in the tilemaps though? If memory serves, tilemaps (and the background) show up cor...
- Mon Aug 21, 2017 7:48 am
- Forum: Megadrive/Genesis
- Topic: Shadow/Highlight
- Replies: 13
- Views: 13948
Re: Shadow/Highlight
There's an issue regarding color 14 outside sprite highlight (which makes it show up normal even if it should default to shadowed). I don't recall the exact details, every time I try to bring it up I get it wrong =P But it's the only way to have a bright color in an otherwise shadowed graphic, whic...
- Thu Aug 17, 2017 7:40 am
- Forum: Tools
- Topic: Algorithm for splitting sprites
- Replies: 70
- Views: 179443
Re: Algorithm for splitting sprites
One thing I often see people forget about when discussing optimization is the goal of said optimization. For the MD, there are several potential goals which are often at odds with one another: minimal amount of tiles minimal number of sprites minimal amount of sprites per scanline minimal amount of ...