Search found 30 matches

by furrykef
Thu Aug 14, 2008 11:52 pm
Forum: Megadrive/Genesis
Topic: Programming in C - Some doubts
Replies: 10
Views: 7915

Only if you compiled your binary with -O You'd have to be a fool not to use at least -O1, I think, unless maybe you're debugging. In any case, it's very stupid not to use the "volatile" because its inclusion will not hurt anything and its omission definitely can hurt something. Not to mention that ...
by furrykef
Tue Aug 12, 2008 3:08 am
Forum: Megadrive/Genesis
Topic: Programming in C - Some doubts
Replies: 10
Views: 7915

Why the value changes, instead of just using bitwise operators (&, |, ^, ~)? You don't seem to quite understand how memory-mapped I/O (often abbreviated MMIO) works... you're still thinking in terms of RAM. MMIO doesn't work like RAM, so forget what you know about it. In particular, GFXCNTL doesn't...
by furrykef
Mon Aug 11, 2008 9:58 pm
Forum: Hardware
Topic: An idea for a development pcb
Replies: 9
Views: 9362

I don't really think there's need for HW in MD dev anymore. You can do most debugging in Kmod, close to real HW testing in Fusion and that's really all you need. I use my MD2 usually to know that my code still runs on real HW and to listen music and play games as emu is still an emu. There's also t...
by furrykef
Mon Aug 11, 2008 9:57 pm
Forum: Controls
Topic: About Peripherals
Replies: 37
Views: 57682

Yes, and the Game Over screen from Zelda II read "Game Over: Return of Ganon".

Now back to your regularly-scheduled thread. :mrgreen:
by furrykef
Sun Aug 10, 2008 12:12 am
Forum: Controls
Topic: About Peripherals
Replies: 37
Views: 57682

HardWareMan wrote:Link is dead.
Game Over: Return of Ganon?
by furrykef
Fri Aug 01, 2008 10:55 pm
Forum: Megadrive/Genesis
Topic: ASM register management
Replies: 32
Views: 23696

Chilly Willy wrote:I can remember when I got Deep Blue C for the Atari and thought "why would anyone use this instead of assembly?" :lol:
If I had to work with a 6502, I'd ask that question too. :P
by furrykef
Fri Aug 01, 2008 5:06 pm
Forum: Megadrive/Genesis
Topic: ASM register management
Replies: 32
Views: 23696

At the end of the day, only two questions really matter: 1) Is the program free of bugs? 2) Does the program run fast enough to get everything done on every frame? As long as the answer to both questions is "yes", how you go about programming is irrelevant, really. It doesn't matter if your code is ...
by furrykef
Mon Jul 28, 2008 3:38 pm
Forum: Megadrive/Genesis
Topic: Bug in genesis.c?
Replies: 16
Views: 12971

According to the manual, the instruction doesn't have to run from RAM (although that is one way to do it), it just has to use RAM. So do those games do something like this?

Code: Select all

    move.l d0, -(a7)
    move.l (a7), GFXCTNL
    move.l (a7)+, d0
Or do they just do this?

Code: Select all

    move.l d0, GFXCTNL
by furrykef
Sun Jul 27, 2008 9:37 am
Forum: Megadrive/Genesis
Topic: Bug in genesis.c?
Replies: 16
Views: 12971

So are the docs completely wrong, or are there cases where you do indeed need to access RAM in the instruction where you activate DMA?
by furrykef
Sun Jul 27, 2008 9:31 am
Forum: Megadrive/Genesis
Topic: ASM register management
Replies: 32
Views: 23696

I think if you're using a word instruction with a byte in RAM, you have bigger problems... namely, loading/storing a garbage byte. Not to mention that loading a word from an odd boundary isn't slower, it's flat-out illegal (unless you write an appropriate exception handler as HardWareMan said, but I...
by furrykef
Sun Jul 27, 2008 8:27 am
Forum: Megadrive/Genesis
Topic: ASM register management
Replies: 32
Views: 23696

I'm not sure why you'd want to access a byte using a word access, unless you're operating on multiple bytes at a time, in which case you probably have already aligned the start of the table or whatever anyhow.

- Kef
by furrykef
Sun Jul 27, 2008 8:11 am
Forum: Megadrive/Genesis
Topic: ASM register management
Replies: 32
Views: 23696

In that case the situation is exactly as I thought it was... so then there would be no sense in which words are faster than bytes.

- Kef
by furrykef
Sun Jul 27, 2008 8:09 am
Forum: Megadrive/Genesis
Topic: Bug in genesis.c?
Replies: 16
Views: 12971

Sounds like you should revise your code. After all, bad comments are worse than no comments. ;)

- Kef
by furrykef
Sat Jul 26, 2008 11:46 pm
Forum: Megadrive/Genesis
Topic: ASM register management
Replies: 32
Views: 23696

Hmm. I wasn't aware there was such a penalty. Thanks.
by furrykef
Sat Jul 26, 2008 8:50 pm
Forum: Megadrive/Genesis
Topic: ASM register management
Replies: 32
Views: 23696

I'd probably keep all 8bit values padded as 16bit. It's quicker for a couple of reasons on the 68k. I don't think it's quicker, because, looking at the instruction counts, there are no instructions where a word is processed faster than a byte. But neither are there any instructions where a word is ...