C compiler

PM development, programming, hacking and all that fun stuff.
Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 7th, 2011, 17:15

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...

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 7th, 2011, 23:03

Another day another bomb, ops I mean version. Version 0.0014 first more or less functionally complete. I'll be happy to receive your bug reports!

New in this version is: initialization of global ans static variables and arrays, pm.h file for PM registers, starting position of the RAM variables can be set and last one is the awesome -help command line option. ;-)

Enjoy!
Z
.
Attachments
vbccpm_0014.zip
(294.91 KiB) Downloaded 362 times

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 8th, 2011, 21:40

TADA: Version 0.015 on your attention. This time only change is the obsoleted __rom attribute, use const instead. ;-)

At this point all of the items on the TODO list are either involving or non essential, so I'll name it alpha 1 version.

It is still full of bugs. Most notable ones: 1. comparison of unsigned numbers, 2 char/short on the stack make problems.
Attachments
vbccpm_0015.zip
(294.76 KiB) Downloaded 337 times

Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 9th, 2011, 21:25

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 works but the gfx is wrongly aligned. Please put that on top of your list :)

Chars are still causing trouble (i think when writing chars to ints).

Good job, keep it up!
Attachments
prc_test.zip
(15.74 KiB) Downloaded 344 times

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 9th, 2011, 21:29

Seems I spam this site the most... :oops: I use it as both release and change-log history.

Anyway ver. 0.016 features some fixes of unsigned comparison and also of short int handling. Also there is a new demo included with tile-map usage. :mrgreen:
Attachments
vbccpm_0016.zip
(295.02 KiB) Downloaded 348 times

User avatar
YasaSheep
Posts: 195
Joined: November 20th, 2005, 04:04
Location: Portland (Also the discord)
Contact:

Re: C compiler

Post by YasaSheep » June 9th, 2011, 23:44

When you're producing content, I'm sure nobody minds. ;]

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 10th, 2011, 00:20

Too bad we post simultaneously. I read you mind so fixed chars and alignment. Well in this revision is the 64 alignment too.
Attachments
vbccpm_0017.zip
(295.54 KiB) Downloaded 356 times

Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 10th, 2011, 01:53

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.
Attachments
prc_test.zip
(16.42 KiB) Downloaded 334 times

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 10th, 2011, 02:51

global char * fixed. return char top pri, now. here you go 0.018.
Attachments
vbccpm_0018.zip
(295.9 KiB) Downloaded 347 times

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 10th, 2011, 03:55

Wa do you intend to restart work on PkMn Orange now that we got semi-working C-compiler?

Oh, and the new version (0.019) of course - char return fix...
Attachments
vbccpm_0019.zip
(295.86 KiB) Downloaded 347 times

Post Reply