Page 3 of 6

Re: Kernel "upgrade" -- Beta 6

Posted: Fri Dec 23, 2011 2:51 am
by uze6666
Bump! I've updated the main post with beta 6. It's the final version. If nobody find bugs, I will commit to SVN after the holidays.

-Uze

Re: Kernel "upgrade" -- Beta 6

Posted: Fri Dec 23, 2011 8:29 am
by HardlyUnique
Nice job!

One thing I've noticed is that the curr_field variable seems to have suffered from bitrot since 3.2. It's only implemented in video modes 1, 2 and 4. I'm currently making use of it for my Closed-Caption API so if it's not too much trouble, can you please re-implement it for every mode?

Also, while I'm on the subject, I've noticed that it's inconsistent with the bootloader. That is, if I load my game from the SD initially or by choosing to launch-to-game on reset, one field is curr_field=0. If I launch the same title from the SD menu and it's been programmed, the other field is curr_field=0. It does this every time.

Is it possible to rewrite the way curr_field is updated during VSYNC and ensure that it will always be consistent? Like, ensure that curr_field will always = 0 on odd fields?

Re: Kernel "upgrade" -- Beta 6

Posted: Fri Dec 23, 2011 6:24 pm
by uze6666
Sure, I'll look into it, shouldn't be a big deal. :)

-Uze

Re: Kernel "upgrade" -- Beta 6

Posted: Fri Dec 23, 2011 11:24 pm
by HardlyUnique
Thanks! :mrgreen:

Re: Kernel "upgrade" -- Beta 6

Posted: Mon Dec 26, 2011 6:00 am
by nebososo
GCC 4.6.2 wants all the PROGMEM arrays to be const.

Code: Select all

../../kernel/uzeboxCore.c:65:4: error: variable 'eeprom_format_table' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
../../kernel/uzeboxCore.c:118:5: error: variable 'io_table' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
../../kernel/uzeboxSoundEngine.c:146:14: error: variable 'patchCommands' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
../../kernel/videoMode3/videoMode3.c: In function 'RestoreBackground':
../../kernel/videoMode3/videoMode3.c:50:16: warning: unused variable 'a' [-Wunused-variable]
../../kernel/videoMode3/videoMode3.c:49:19: warning: unused variable 'j' [-Wunused-variable]
../../kernel/uzeboxVideoEngine.c: At top level:
../../kernel/uzeboxVideoEngine.c:264:15: error: variable 'fader' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
Also the new emulator source before the release would help ;).
And I think you mentioned earlier you that SDL.dll wasn't needed (I might be wrong), I had to download it for it to run on wine.

Thanks, Uze.

Re: Kernel "upgrade" -- Beta 6

Posted: Mon Dec 26, 2011 7:34 pm
by uze6666
Ah crap, why in the world did they not generate warnings instead... :roll: Oh well, I'll revise that. Don't worry for the emulator source, I will commit it also. I wanted to be sure I didn't screwed up anything. I commented out the uncompleted SD code to reduce size and improve speed. I guess I must have a copy of SDL.dll on my path somehow, never mind what I said then...

-Uze

Re: Kernel "upgrade" -- Released!

Posted: Fri Jan 13, 2012 8:01 am
by uze6666
The kernel upgrade is complete...at last! Check the main post for more details. I've commited everything to the trunk. Before that I created tag 3.3 to hold the stable code. The emulator v1.15 can be built from the source or downloaded pre-built with sources and demos here. Note that all compiled demos requires uzem v1.15 or otherwise there will be no image rendered.

There will undoubtedly be some little bugs, so let me know if you find some. 2-3 games still need little fixes and don't compile so I have commented them out of the main makefile (for now). Also I still have to fix Nebososo's issue with GCC 4.6.2.

Hope it will be useful to you guys! :)

Re: Kernel "upgrade" -- Released!

Posted: Fri Jan 13, 2012 4:55 pm
by nebososo
;) Awesome. I'll see what I can do about GCC 4.6.2.

Thanks, Uze.

Re: Kernel "upgrade" -- Released!

Posted: Sat Jan 14, 2012 3:12 am
by uze6666
I'll see what I can do about GCC 4.6.2.
It's ok, I've added const keywords to all PROGMEM declare, in kernel and demos too. :)

Re: Kernel "upgrade" -- Released!

Posted: Sat Jan 14, 2012 4:04 am
by nebososo
uze6666 wrote:
I'll see what I can do about GCC 4.6.2.
It's ok, I've added const keywords to all PROGMEM declare, in kernel and demos too. :)
Great, but you missed one tricky declaration:

Code: Select all

const char *brickAnim[] PROGMEM
Should have been

Code: Select all

const char * const brickAnim[] PROGMEM
Some of the demos weren't using the proper avr-size flags on Linux, so I included that in my commit too. I believe it's working on windows too, but just to be sure, someone should test it.

It compiled just fine, except for a couple of unused variables warnings.

Code: Select all

../../kernel/videoMode3/videoMode3.c:50:16: warning: unused variable 'a' [-Wunused-variable]
../../kernel/videoMode3/videoMode3.c:49:19: warning: unused variable 'j' [-Wunused-variable]
I didn't remove these ones, I wasn't sure if those addresses were being used by a weird hack. :lol: