Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Discussions > 8-bit appreciation lesson
2015-03-01 17:10
Trap

Registered: Jul 2010
Posts: 223
8-bit appreciation lesson

I spent the last 48 hours in the worst possible situation - debugging my own machine code. Got to the point of almost giving up - I even considered asking somebody for help, which in my book is total defeat. Thank god, I finally caught the bug. As always, the machine works as told and yet again my own mindless typing was the cause of the bug. Just cannot blame binary logic for sluggish code :)
Funny how these sessions of hellish debugging just make you love that old breadbox even more when you finally get your code running. I guess it's a complicated love/hate relationship few people would ever understand, but if anybody in the world could appreciate the situation, it is you guys in here :)

/Trap Crap Wrap
 
... 1 post hidden. Click here to view all posts....
 
2015-03-01 21:25
Oswald

Registered: Apr 2002
Posts: 5086
once I wrote lda $40 instead of lda #$40 or smth like that. it all worked fine in turbo ass (was devving on real machine!), but didnt work when linked.

luckily it was in the init part, so soon after I lost all hope and started going trough line by line in monitor somehow found it.

so, yes, we know :)
2015-03-01 21:53
lft

Registered: Jul 2007
Posts: 369
Related: http://linusakesson.net/programming/kernighans-lever/index.php
2015-03-02 07:36
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
that unreleased Bonzai demo i have seen at Jeff place, is good enough to be released! :)
2015-08-18 20:03
Bago Zonde

Registered: Dec 2010
Posts: 29
Yeah, few days ago I had some displaying issue. Rows with graphic were drawn on the screen properly but the last single 8x8 block from the first line wasn't. Why this one?! After 1 hour of debugging it from the very end (I was going backward as I thought the problem is somewhere else) - finally I found I'm so lame. IRQ has started to drawing these lines while start up init was in progress and it was clearing the screen area :D. It would be easier to find it if bigger part of a screen would be cleared for example. Sync everything, that's the key! Such a great reward finding this small bug as I was really confused! Simple code, no rocket science there but punch into your face ;). That was a good lesson for me also!
2015-08-18 20:51
ThunderBlade

Registered: Jan 2002
Posts: 77
Trap, you are probably an at least 10 times better coder than me, but rest assured that I understand. :)
2015-08-19 02:02
The Phantom

Registered: Jan 2004
Posts: 360
I still do that.

I start work on some code and while working on that code, another idea hits, so I work on that and while working on that, another idea hits, repeat until you have 30 or so parts, all 30-50% done.

I went to work on my rasma code, which is about 7 or 8 years old, and I have several versions of it. I couldn't figure anything out and it had me wondering if I even coded it.

I hate when that happens ;)
2015-08-19 14:00
Mixer

Registered: Apr 2008
Posts: 447
Turning kernel on/off also changes which IRQ/NMI/BRK vectors the machine uses. When unmanaged this causes program execution to continue from some some odd place in memory depening on stack and what happens to be in the vector addresses. (also seems to crash VICE in some cases btw.)

One time it happened that the NMI vectors 0318/0319 values and fffa/fffb under the kernel both pointed to different but valid code. So, by changing the $01 value, the program started running an effect from the next demopart while still running rest of the first part with raster IRQ. Very C-64 thing to happen.
2015-08-19 17:46
algorithm

Registered: May 2002
Posts: 705
At one time there was this digitized audio part that kept on crashing. The routine would be transferred to zero page and the nmi would run from there. However the code as it was assembled used self modifying code that would originally change the values where the code was originally located. Sometimes the demo would crash, sometimes it would work fine.

Another occurance, i had forgot to ack dd0d at some stage which would cause some random crashes in the next nmi part
2015-08-19 18:09
Krill

Registered: Apr 2002
Posts: 2968
Your all lame.
2015-08-21 14:45
Trap

Registered: Jul 2010
Posts: 223
Je suis lamer :)
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Hairdog/BOOM!^Dream
Pararaum/T7D
Vent
t0m3000/hf^boom!^ibx
Asthor/Exlusive ON
E$G/HF ⭐ 7
Gregfeel/Lepsi De, S..
AArt1256/MoonShine
rexbeng
der_ton
da Blondie/Resource
Jazzcat/Onslaught
sLASH
Mibri/ATL^MSL^PRX
zscs
Aki
theK/ATL
Sulevi/Virtual Dreams
CA$H/TRiAD
sebalozlepsi
Epyx/TSA
katon/Lepsi De
Guests online: 120
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Christmas Megademo  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Censor Design  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.048 sec.