Monday, December 4, 2017

Updates

This weekend saw a few updates - nothing spectacular:

1) Some VIC fixes to adhere with proper data values (such as color registers and the upper 4 bits always being set)

2) Im now using the timer interrupt to slow things down for fast machines.  The easter egg game is actually playable now.  Timing isnt perfect, but its much closer.  (If you are running an older machine and it's too slow, I have removed frame skipping in this build.  If you complain enough, I can add it back in).

3) All three SID voices cause the speaker to make noise now.  And its not very pleasant.  For simple notes, the speaker works, but for (more commonly) SID music and such, it just doesnt even come close.  Eventually...

4) A new color palette - the last one seemed a little dark.  Also, I added scan lines.  I may map that to an ALT-S or something down the road as its more personal preference.  (or memory map it?)

5) Found a bug hiding inside the screen render code.  I have a test machine that gives a junk screen when it boots.  Something to do with the screen_refresh() function in the IO class.  Im thinking that that machine's video is higher and outside the range for whatever variable Im using when Im scaling the screen.  Ill come back to that, but if you have that problem, let me know.  QEMU, VirtualBox and other test machines I have dont do this, so not exactly sure just yet.

Spent most of my free time working on timing and testing various programs to see how well the VIC emulation is working.  There's still a few strange things which I hope to work through.  A good example is when relocating the screen to bank 3 and copying the character ROM.  Something goes goofy when it gets to the later 128 characters.  Any programmers out there want to take a shot at this, I'd appreciate it:


And here's the program:

20 fori=1to33:reada:poke49151+i,a:next
30 gosub200
40 poke56576,peek(56576)and252
50 poke53272,44
60 rem
70 poke648,200
80 printchr$(147)
90 fori=53236to53245:reada:pokei,a:next
100 poke53246,peek(792):poke53247,peek(793)
110 poke792,244:poke793,207
120 fori=0to255:poke51400+i,i:poke55496+i,1: next
125 rem
130 forj=lto8:fori=61439+jtoi+2048step8
140 pokei,0:nexti,j
150 fori=61440toi+2048:pokei,peek(i):next
160 gosub200:end
200 poke56334,peek(56334)and254
210 poke1,peek(1)and251
220 sys49152
230 poke1,peek(1)or4
240 poke56334,peek(56334)or1
250 return
300 rem
310 data169,0,133,251,133,253,169,208,133,252,169, 240,133,254,162,16
320 data160,0,177,251,145,253,136,208,249,230,252, 230,254,202,208,240,96
330 rem
340 data72,169,4,141,136,02,104,108,254,207

3 comments:

  1. Do you have a sample that I can type in to test the sounds ?

    ReplyDelete
  2. line 130 forj=lto8
    where is thevalue for l coming from?

    ReplyDelete
  3. Yeah thats an error in the copy /paste. It should be "1 to 8", thanks! For sound testing, I just use some simple programs from bombjack (http://www.bombjack.org/commodore/books.htm)

    ReplyDelete