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
2015-03-01 19:55
Acidchild

Registered: Jan 2002
Posts: 474
Nice...but where's the new bonzai-demo???
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.
 
... 1 post hidden. Click here to view all posts....
 
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
Conjuror
Nordischsound/Hokuto..
Paulko64
katon/Lepsi De
El Jefe/Slackers^sidD
Haplo
Steffan/BOOM!
MWR/Visdom
Fungus/Nostalgia
Perff/No Name
Dan
kbs/Pht/Lxt
wacek/arise
rambo/Therapy/ Resou..
Epyx/TSA
t0m3000/hf^boom!^ibx
mutetus/Ald ^ Ons
bexxx
Mojzesh/TGR🇬🇧
serato/Finnish Gold
Elder0010/G★P
Electric/Extend
WVL/Xenon
Barfly/Extend
Malmix/Fatzone
psych
DKT/Samar/sidDivers
Strepto/Lethargy
MAT64
Brittle/Dentifrice^(?)
wil
Worrior1/W1 Producti..
TheRealWanderer
The Syndrom/TIA/Pret..
CreaMD/React
Exile/Anubis
Grue/Extend
Peacemaker/CENSOR/Hi..
Jazzcat/Onslaught
Guests online: 129
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 Fishbomb  (9.6)
7 Halloweed 4 - Blow Y..  (9.6)
8 Uncensored  (9.6)
9 Wonderland XIV  (9.6)
10 Comaland 100%  (9.6)
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 Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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