Search found 94 matches

by Lupin
June 10th, 2011, 10:20
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

wow zoranc, i am just impressed! Very nice job. I wouldn't think you could fix it so fast. Looks like that problem kept you up late, hope you still got enough sleep :D

Very very nice... Yeah bigger projects shouldn't be much of a problem now (until you need more than 64kb :)).
by Lupin
June 10th, 2011, 01:53
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

Reading from global char* doesn't work yet... In this example i use a work-around. I am surprised it works for OAM[0].tile ^= 1;

Nice job on the align feature, works nicely.
by Lupin
June 9th, 2011, 21:25
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

hey zoranc, nice job. i wrote a small example to control the PRC. But i just noticed that there is no way to align arrays in memory. The PRC needs tiles to be aligned at 8 byte boundard and sprites at 64 bytes boundary. Please consider adding an option to do that. Attached you can find the code, it ...
by Lupin
June 7th, 2011, 20:02
Forum: Flash Carts
Topic: Help with flashing multiple roms
Replies: 5
Views: 21749

Re: Help with flashing multiple roms

I have uploaded my folder that i use for PokeFlash and the GUI:
http://lupin.shizzle.it/PokeFlash.zip
by Lupin
June 7th, 2011, 17:15
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

Good job zoranc, thank you. I think will write a new asm startup file which will initialize the global ram variables.

Time to implement more PM specific functions...
by Lupin
June 7th, 2011, 17:13
Forum: Flash Carts
Topic: Help with flashing multiple roms
Replies: 5
Views: 21749

Re: Help with flashing multiple roms

Did you download the latest version of PokeFlash?
http://www.pokemon-mini.net/development ... pokeflash/
by Lupin
June 5th, 2011, 01:34
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

Just coded a C version of my 6 color LCD demo... It can either be compiled with or without inline ASM. It's of course a lot slower without inline ASM. But even with inline ASM it's not looking as good as the ASM only version. Still need to use a workaround to write to memory addresses (wcp function)...
by Lupin
May 27th, 2011, 12:08
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

Small work-around: int strlen(__reg("x") char*) = "\t mov hl, x" "\t dec x\n"\ "_nextchr:\t inc x\n"\ "\t mov a, [x] \n"\ "\t cmp a, 0 \n"\ "\t jnz _nextchr\n"\ "\t sub x, hl\n"; // memcpy void memcpy(__reg("x"...
by Lupin
May 27th, 2011, 11:44
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

int main() { char str1[20] = {0, 10, 11, 0x0}; } main: sub sp,20 mov ba,vbcc___l60 mov [sp+0],ba vbcc___l59: add sp,20 ret vbcc___l60: .db 0 .db 10 .db 11 .db 0 .db 0, 0, 0, 0, 0, 0, 0, 0 .db 0, 0, 0, 0, 0, 0, 0, 0 Initialized arrays don't work... :( It reserves stack space (20 bytes) for the array...
by Lupin
May 27th, 2011, 11:33
Forum: PM Development Forum
Topic: C compiler
Replies: 58
Views: 111701

Re: C compiler

void test(char* a) { if(*a != 0) {} } ; .global test test: mov ba,[sp+3] mov a,[ba] ex ba,a mov x,ba vbcc___l45: vbcc___l46: vbcc___l44: ret mov a,[ba] does not exist. There is no instruction to ever use BA for addressing. Which registers can be used in inline asm? Which must be saved to stack? Fun...