Search found 30 matches
- Sat Jul 26, 2008 7:59 pm
- Forum: Megadrive/Genesis
- Topic: Bug in genesis.c?
- Replies: 16
- Views: 15392
- Sat Jul 26, 2008 2:32 pm
- Forum: Megadrive/Genesis
- Topic: Bug in genesis.c?
- Replies: 16
- Views: 15392
- Sat Jul 26, 2008 9:37 am
- Forum: Megadrive/Genesis
- Topic: Bug in genesis.c?
- Replies: 16
- Views: 15392
Bug in genesis.c?
I'm converting dma_vram_copy from genesis.c into ASM and I think I found a bug in it, at least the version I have. (I got it from one of his examples, so maybe he's updated it since then...)
void dma_vram_copy(uint source,ushort dest,ushort len)
{
register volatile ushort *pw;
register uint *pl ...
void dma_vram_copy(uint source,ushort dest,ushort len)
{
register volatile ushort *pw;
register uint *pl ...
- Thu Jul 24, 2008 8:17 pm
- Forum: Megadrive/Genesis
- Topic: To NOP or not to NOP
- Replies: 16
- Views: 16189
For any more serious MD dev, you need a flashcart or something else to run your code on the real deal... there's a lot of stuff you can do in emulators and not on real HW. Try using BTST on VDP ;)
Well, sure, but I think the point still stands -- especially if the required delay might be slightly ...
Well, sure, but I think the point still stands -- especially if the required delay might be slightly ...
- Thu Jul 24, 2008 7:52 pm
- Forum: Megadrive/Genesis
- Topic: To NOP or not to NOP
- Replies: 16
- Views: 16189
- Thu Jul 24, 2008 4:31 am
- Forum: Megadrive/Genesis
- Topic: To NOP or not to NOP
- Replies: 16
- Views: 16189
- Wed Jul 23, 2008 6:40 pm
- Forum: Megadrive/Genesis
- Topic: To NOP or not to NOP
- Replies: 16
- Views: 16189
I found one doc that says you need 16 cycles. Two NOPs is eight cycles. I'm not sure whether or not the doc means you need 16 cycles before the next move instruction that accesses the register, or 16 cycles including the next move instruction. If it includes it, then it should work out to at least ...
- Tue Jul 22, 2008 9:14 pm
- Forum: Megadrive/Genesis
- Topic: Learning ASM
- Replies: 13
- Views: 13728
- Tue Jul 22, 2008 8:43 am
- Forum: Megadrive/Genesis
- Topic: ASM register management
- Replies: 32
- Views: 29319
- Tue Jul 22, 2008 8:22 am
- Forum: Megadrive/Genesis
- Topic: ASM register management
- Replies: 32
- Views: 29319
OK, I can see my line of thinking is not popular and it's not the "ASM way", so I will probably abandon this line of thinking. But for the sake of argument, I'll defend it anyway.
NEVER put anything on the stack if you have a free register. The more you keep stuff in registers, the faster it will ...
NEVER put anything on the stack if you have a free register. The more you keep stuff in registers, the faster it will ...
- Tue Jul 22, 2008 12:38 am
- Forum: Megadrive/Genesis
- Topic: To NOP or not to NOP
- Replies: 16
- Views: 16189
- Mon Jul 21, 2008 9:49 pm
- Forum: Megadrive/Genesis
- Topic: To NOP or not to NOP
- Replies: 16
- Views: 16189
- Mon Jul 21, 2008 9:45 pm
- Forum: Megadrive/Genesis
- Topic: ASM register management
- Replies: 32
- Views: 29319
- Mon Jul 21, 2008 8:46 pm
- Forum: Megadrive/Genesis
- Topic: To NOP or not to NOP
- Replies: 16
- Views: 16189
To NOP or not to NOP
I'm wondering when exactly you should use NOP. For instance, here's the read_joypad1 routine from genesis.c:
ushort read_joypad1()
{
register volatile uchar *pb;
ushort i, j;
pb = (uchar *) 0xa10003;
*pb = 0x40; /* check joypad */
asm("nop");
asm("nop");
i = *pb & 0x3f;
*pb = 0 ...
ushort read_joypad1()
{
register volatile uchar *pb;
ushort i, j;
pb = (uchar *) 0xa10003;
*pb = 0x40; /* check joypad */
asm("nop");
asm("nop");
i = *pb & 0x3f;
*pb = 0 ...
- Mon Jul 21, 2008 8:37 pm
- Forum: Megadrive/Genesis
- Topic: ASM register management
- Replies: 32
- Views: 29319
ASM register management
This is more of a general M68000 question than a Genesis question, but I figured I might as well post it here. :)
I decided to start coding a game entirely in ASM as a programming exercise of sorts. I've been well-acquainted with the general principles of ASM for probably over 10 years now, but I ...
I decided to start coding a game entirely in ASM as a programming exercise of sorts. I've been well-acquainted with the general principles of ASM for probably over 10 years now, but I ...