Jump to content

Photo

Peg Solitaire source


9 replies to this topic

#1 Ninjabba OFFLINE  

Ninjabba

    Dragonstomper

  • 537 posts
  • Location:Lurking in the Darkness

Posted Sun Jan 29, 2012 5:08 AM

Attached is the source to Peg Solitaire containing the sound driver for chipper of Sage. I've compiled the project using cc65 (version 2.13.0 and 2.13.2), but because the template I use is limited to creating 256kb carts I thought to look into the latest cc65 snapshot (2.13.9). However, it looks like some changes broke the project as I get some errors using the latest version.

Code is a bit messy with some redundant functions/files, but spare time coding sessions are rare/precious and I haven't taken time to clean up the code. I see I accidentally added a debug folder from my eclipse project, which can be completely ignored.

Attached Files


Edited by Ninjabba, Sun Jan 29, 2012 5:21 AM.


#2 Ninjabba OFFLINE  

Ninjabba

    Dragonstomper

  • Topic Starter
  • 537 posts
  • Location:Lurking in the Darkness

Posted Sun Jan 29, 2012 8:04 AM

I've been hinted to try and include more colors into the background images. Is there any source I can look into?

#3 matashen OFFLINE  

matashen

    Moonsweeper

  • 455 posts

Posted Sun Jan 29, 2012 12:12 PM

Ask sage about the highcolor solution. He is the Master.

A question to sage about the chipper suport.
Can i use it the same way in the old cc65.

and after you importet the mod-file. Have you createt simple instruments? I ask, cause if i import a mod there is no intrument that makes any beep. I only see all notes while playing, but i hear nothing.

Regards Matthias

#4 Ninjabba OFFLINE  

Ninjabba

    Dragonstomper

  • Topic Starter
  • 537 posts
  • Location:Lurking in the Darkness

Posted Sun Jan 29, 2012 12:57 PM

Not sure how to put this in the right terminology, but you do need to create a simple-instrument for the notes that are displayed. So when I import a MOD, I have on a channel on a given time step displayed something like [5 D-4 1], where 5 refers to the simple-instrument.. so creating a sound for that simple-instrument will give you something playing.

#5 sage OFFLINE  

sage

    Dragonstomper

  • 576 posts
  • Location:Germany

Posted Mon Jan 30, 2012 11:51 AM

matashen: Check the video. ninjabba is right. automatic creation of instruments would be nice, but how do you do that? One can try to make a FT and get the base freq and add something simple which has the same freq. let me think about it.


old cc65 (aka newcc65), yes, works the same, see my example. BUT you need to recompile cc65 as there are some bugs to be fixed.

#6 sage OFFLINE  

sage

    Dragonstomper

  • 576 posts
  • Location:Germany

Posted Mon Jan 30, 2012 1:36 PM

added modified source and compiled windows binaries to my site, but have no chance to really test them.

#7 matashen OFFLINE  

matashen

    Moonsweeper

  • 455 posts

Posted Mon Jan 30, 2012 4:16 PM

Hi sage,

i looked at your site and must say WOW.

i will test it this week. Hope to have enough time for it and thanks.


Regards
Matthias

#8 karri OFFLINE  

karri

    Stargunner

  • 1,415 posts
  • Location:Espoo, Finland

Posted Wed Feb 15, 2012 8:23 AM

I just ported the code to the latest cc65 release flavour. Ninjabba requested to use a 512k cart size so this cart image is now based on 2048 bytes/block. Currently Ninjabbas code uses up 39031 bytes so there is still 485257 bytes to go.

Attached File  pegsolitaire512.zip   268.08KB   103 downloads

or just the sources

Attached File  pegsolitaire512src.zip   77.63KB   86 downloads

Enjoy,

Karri

Edited by karri, Wed Feb 15, 2012 8:31 AM.


#9 Ninjabba OFFLINE  

Ninjabba

    Dragonstomper

  • Topic Starter
  • 537 posts
  • Location:Lurking in the Darkness

Posted Wed Feb 15, 2012 9:07 AM

Thanks heaps!

Pity I'm at work now.. will have to wait ~3 hours to try it out. The latest cc65 version is 2.13.9 am I right? And that one has also support for different eeproms if I remember correctly?

#10 karri OFFLINE  

karri

    Stargunner

  • 1,415 posts
  • Location:Espoo, Finland

Posted Wed Feb 15, 2012 12:35 PM

I found out that the code had lots of unused pieces. Here is a compiled stripped down version wilth only the essentials.

Attached File  PegSolitaireV1_3.zip   210.52KB   103 downloads

You can compile it for different ROM sized by editing the file cart/lynxcart.cfg

For a 512k cart:

__BLOCKSIZE__: type = weak, value = 2048;

For a 256k cart:

__BLOCKSIZE__: type = weak, value = 1024;

For a 128k cart:

__BLOCKSIZE__: type = weak, value = 512;

--
Karri




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users