Search found 12 matches

by orthopteroid
Fri Mar 05, 2010 7:50 pm
Forum: Programming & Software
Topic: Code optimization
Replies: 14
Views: 2355

Re: Code optimization

I've noticed that avr-gcc appears to do some static code analysis that inlines and factors generated code. // note: b is not joypad mask but joypad bit-number (ie 12 instead of 2048) // this way we can use b as a guide to access the right bit in the second byte of the joypad memory. // pjs is a poin...
by orthopteroid
Sun Feb 28, 2010 5:30 am
Forum: Programming & Software
Topic: Saving high scores
Replies: 4
Views: 922

Re: Saving high scores

Awesome, guys. Thanks.

FYI though, it appears that EepromWriteBlock(...) scans blocks 2..63 but EepromReadBlock(...) only scans blocks 0..31
by orthopteroid
Fri Feb 26, 2010 4:36 am
Forum: Programming & Software
Topic: Saving high scores
Replies: 4
Views: 922

Saving high scores

So, is anyone trying to write high scores to flash/eeprom? Which should I use, and how should I declare the save location?
by orthopteroid
Thu Feb 25, 2010 6:08 am
Forum: Programming & Software
Topic: programming velocity using only integer arithmetic
Replies: 7
Views: 1451

Re: programming velocity using only integer arithmetic

I've come back to this after some fiddling around and decided to modify my videoMode3.h file thusly: struct SpriteStruct { #if SPRITE_SUBPIXELPOSITION_ENABLE == 0 unsigned char x; unsigned char y; #else union { struct { unsigned char yf; unsigned char y; }; unsigned short int y16; }; union { struct ...
by orthopteroid
Tue Feb 23, 2010 8:53 pm
Forum: Programming & Software
Topic: Makefile avr-size issue
Replies: 8
Views: 3424

Re: Makefile avr-size issue

Not really an issue, but makefile related... My makefile automatically runs my game in the after a build, but I occasionally get weird problems which I've tracked down to overflowing the 4k RAM limit as I don't have a makefile check for this. If it helps anyone else, here is a way of using gawk to d...
by orthopteroid
Tue Feb 23, 2010 8:50 pm
Forum: Programming & Software
Topic: Makefile avr-size issue
Replies: 8
Views: 3424

Re: Makefile avr-size issue

Not really an issue, but makefile related... My makefile automatically runs my game in the after a build, but I occasionally get weird problems which I've tracked down to overflowing the 4k RAM limit as I don't have a makefile check for this. If it helps anyone else, here is a way of using gawk to d...
by orthopteroid
Tue Feb 16, 2010 11:23 pm
Forum: Programming & Software
Topic: programming velocity using only integer arithmetic
Replies: 7
Views: 1451

Re: programming velocity using only integer arithmetic

I've been doing some fooling around with using fixed-point velocity on sprites and would like to share some code and some questions... I've noticed that SpriteStruct only contains x, y (for position) and tile (mode 3). For my fixed-point velocity approaches I create two new arrays, one for fractiona...
by orthopteroid
Wed Feb 10, 2010 6:19 am
Forum: Programming & Software
Topic: Code optimization
Replies: 14
Views: 2355

Re: Code optimization

For the '644 it would just be 4k(4096-3352)=744 data free and 64k(65535-10746)=54789 program free, if you don't mind manually figuring it out. Otherwise I'm not sure. LOL! Yes, I did seem to come across as a simpleton! I was actually wondering why .data is used for both sums... Output from avr-size...
by orthopteroid
Wed Feb 10, 2010 12:31 am
Forum: Programming & Software
Topic: Code optimization
Replies: 14
Views: 2355

Re: Code optimization

Hi all. A couple of questions... I've a non-debug build of a simple test app and was wondering if anyone might know why I find malloc and free lurking in my lss file... I don't call them and can't find any kernel sources that use them. How are these clib routines getting linked in there? avr-size re...
by orthopteroid
Mon Feb 08, 2010 7:25 pm
Forum: Games & Demos
Topic: Pong
Replies: 14
Views: 4400

Re: Pong

Thanks for educating the uninitiated - http://www.riffraffgames.com/cgi-bin/ab ... llywar.cgi appears to be a homebrew of that game. Looks like it was very fun.