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).
Why the "__rom" prefix for ROM arrays? I think it's common to move everything with "const" prefix into ROM.
C compiler
Re: C compiler
- Attachments
-
- 6color_c.zip
- 6 color demo in C
- (34.63 KiB) Downloaded 661 times
Re: C compiler
some fix with mul/div by const power of 2.
added a makefile.
added font created by friend of me who gave me permission to use it.
enjoy!
added a makefile.
added font created by friend of me who gave me permission to use it.
enjoy!
- Attachments
-
- vbccpm_0012.zip
- Version 0.012
- (292.71 KiB) Downloaded 632 times
Re: C compiler
Another day another release. This time chars are supported too!
@Lupin: your 6-color demo now runs in pure C too but of course it looks ugly with that speed.

@Lupin: your 6-color demo now runs in pure C too but of course it looks ugly with that speed.
- Attachments
-
- vbccpm_0013.zip
- (292.55 KiB) Downloaded 653 times
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...
Time to implement more PM specific functions...
Re: C compiler
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
.
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 638 times
Re: C compiler
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.

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 599 times
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 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!

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 606 times
Re: C compiler
Seems I spam this site the most...
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.

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.

- Attachments
-
- vbccpm_0016.zip
- (295.02 KiB) Downloaded 618 times
- YasaSheep
- Posts: 202
- Joined: November 20th, 2005, 04:04
- Location: Portland (Also the discord)
- Contact:
Re: C compiler
When you're producing content, I'm sure nobody minds. ;]
Re: C compiler
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 617 times