Menu, select game

SGDK only sub forum

Moderator: Stef

Post Reply
densir
Newbie
Posts: 4
Joined: Thu Jun 20, 2013 3:03 am

Menu, select game

Post by densir »

Hello
Long grass snake trying to make a menu to select games. Since I'm new to this, then spent a few months. On the hardware part is clear. but that's part of the Software can not finish. I understand that to choose one or another kind of game you want to record the value in the area $A13000-$A130FF and use !TIME as a gating signal. It is explained to me. But here it is impossible to come-in code. For the record I used the following code

asm volatile ("move.w #0x2700,%sr\n\t" "move.l #0x200000, %a0"
"move.b 1, ($A130F1)"
"move.b 2, (%a0)"
"move.b 0, ($A130F1)"
"move.w #0x2000,%sr\n\t" );

for softreset I use the code

asm volatile ( "move #0x2700,%sr\n\t"
"move.l 0,%a7\n\t"
"move.l 4,%a0\n\t"
"jmp (%a0)" );

When you compile the project I get a message

Error: syntax error --
statement `move.l #0x200000,%a0move.b 1,($A130F1)move.b 2,(%a0)move.b 0,($A130F
1)move.l 0,%a7' ignored
make: *** [C:/sgdk/src/main.o] Error 1

Syntax error. He tried to sort out their own but failed.

I tried to write a similar menu to BEX (basiegaxorz)

but there have another problems, problems with control in the game after the start menu and also failed to make the correct work softreset to provide a reset signal to the cartridge connector. The syntax of ASM in BEX and SGDK differ, creating new problems.

Please help, this project has been a very long time does not give me rest.
I would be grateful for any help
HardWareMan
Very interested
Posts: 753
Joined: Sat Dec 15, 2007 7:49 am

Post by HardWareMan »

Since this code must be launched from RAM, you should compile once code for bankswitching and resetetting at some RAM address. Then you use this precompiled code as binary data. Copy to destination RAM address and jump into it. For compile use pure M68K assembler.
Post Reply