Jump to content



0

Is the tutorial source code broken?


3 replies to this topic

#1 TerryMasters OFFLINE  

TerryMasters

    Combat Commando

  • 8 posts

Posted Fri Feb 3, 2012 10:10 AM

I've said this once before but I cannot thank Andrew enough, because out of all the guides I've read this is the first one I can actually understand. It feels beyond awesome to say that I'm in the process of programming my first Atari game! :D

Unfortunately I ran into a problem, and have no idea where it lies. I'm currently using Z26 as my emulator. Here's the link to the "Our First Kernel" section, where the source code in question is listed:

http://www.atariage....r-first-kernel/

According to that post, the end result should have been this:
Posted Image

But the one I get - by merely copying and pasting the code - gives me this:

Posted Image


Now the reason I'm bringing this up is because I'm at a point in the guide where I can't move on without fixing it. Trying the same code in StellaX gives me a completely different end result entirely, so I'm not even going to post it. The worst part is that Andrew's own compiled code does the same thing (kernel1.zip attachment), so I know it's not a copy and paste error.

What Z26 looks like it's doing is drawing the last line of the background color (or possibly the second to last one), filling 30 or so lines of overscan, then copying/finishing the last line of color which carries back over the top. So using my newfound knowledge I tried clearing these lines in different sections, but for some reason none of them seem to have any effect. I'm really stuck, and I don't know if it's a problem with the code, or if the emulator got updated since the guide was made that changed the way the chips handle certain things... But unless it's just me, I'd like to fix this not only so I may continue, but so no one else runs into this problem.

Please help, and thanks in advance :)
-TM

#2 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 5,993 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Fri Feb 3, 2012 7:46 PM

I just did a copy/paste and it looks OK here.
session8.png

Possibly the macro.h or vcs.h file you're using is incorrect? Here's my "project" for session 8:
Attached File  session8.zip   58.81K   10 downloads

This is how I compiled it on my Mac. The dasm in the zip is for OS X, so it won't run on your system.
./dasm session8.asm -f3 -ssession8.sym -lsession8.lst -osession8.bin


#3 TerryMasters OFFLINE  

TerryMasters

    Combat Commando

  • 8 posts

Posted Fri Feb 3, 2012 8:51 PM

Thanks man, I appreciate you taking the time to test it for me. It was my mistake for not mentioning what it was compiled on. While this was done with dasm on Windows 7, the problem (for me anyhow) is that the already compiled binary he posted as an attachment in that tutorial suffers the same problem when I run it through Z26. So I know it's not something I did with the code - I just downloaded the rom, started it and it gave me the same problem :(

Edited by TerryMasters, Fri Feb 3, 2012 8:53 PM.


#4 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 5,993 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Feb 4, 2012 10:50 AM

No worries - your screenshot clearly showed you were on a Windows platform (by the window trim and the D:\ )

Forgot I had the Mac version of z26 - looks like it's showing too much of the screen, the thick green section at the top, and the thick black section at the bottom get cropped on a real TV so I don't think you need to worry about it:
session8_z26.png

I dropped it on my Harmony so you could see how it gets cropped, and I do see that there is a different glitch. Session 8 doesn't init anything so sprites, missiles, ball, playfield, etc are randomly turned on.
session8.jpg

Quick change to the source:
...
Reset
		CLEAN_START

StartOfFrame
...
and it now looks like this:
session8_init.jpg

You can find the code for CLEAN_START in macro.h. It's a short routine that sets everything to 0 so all the objects are turned off, colors are all set to black, audio is silenced, etc.

Edited by SpiceWare, Sat Feb 4, 2012 10:52 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users