Page 4 of 4

Re: What was your largest self-written 65xx program?

Posted: Sun Oct 16, 2016 8:11 pm
by GARTHWILSON
BigDumbDinosaur wrote:
However, a year or two later when you revisit the function, such as to add features, you'll be glad you committed your thoughts at the time to "paper."

<snip>

and when the occasion arose in which I would have to maintain a program I had written long ago I didn't have to rely on memory to figure out why I wrote things the way I did.
Yep. "Self-documenting code" does not mean you don't have to comment. It just helps. Even if the code is very clear about what it's doing, it does not tell why you chose to do it that way. The comments are not optional. There have been times that I looked at something and thought, "Wow, there's a better way to do that!" and then after wasting a lot of time on it, came full circle because I re-discovered why it had to be done the way it was and not the way I thought was better. Comments would have saved the time.

Re: What was your largest self-written 65xx program?

Posted: Fri Nov 18, 2016 6:47 pm
by deanflyer
Interesting reading.

My longest ever 6502 program was just over 5,000 lines. It was a game written originally in ODS (Ocean Development System) a cross assembler that used a C128 in 80 column mode to target a C64 using the user port to transfer the code. I had some friends in the industry way back when I got this from, and after using Turbo Assembler on the C64 this made things a lot easier/faster. I think this was maybe a precursor to PDS but im not 100% sure.

I recently wrote a small python script to convert the tokenised source code from ODS to plain text. If anyone is interested pm and ill send it to you.

There was a cartridge in the back of the C64 that held the program that managed the file transfer from ODS on the C128. This is lost now, and if I can ever be bothered I might write some code to try and get it working again.

I found my original source code and I had converted it across to Laser Genius assembler so I could link the multiple source files to generate the final program.

Comments are a thing I thought were unnecessary :) Looking at some of my old source code I havent a clue what is going on, wish I had commented it. Let me know if you want to see what 5000+ lines of uncommented code looks like :)

Re: What was your largest self-written 65xx program?

Posted: Fri Nov 18, 2016 8:20 pm
by Dr Jefyll
deanflyer wrote:
There was a cartridge in the back of the C64 that held the program that managed the file transfer from ODS on the C128. This is lost now, and if I can ever be bothered I might write some code to try and get it working again.
Welcome, deanflyer. :) Is this this cartridge a proprietary product? I don't recall hearing about such a thing, although I may easily have missed it.
deanflyer wrote:
Let me know if you want to see what 5000+ lines of uncommented code looks like :)
Um, well, it's very generous of you to offer, I'm sure! Um... :roll:

J. :D

Re: What was your largest self-written 65xx program?

Posted: Fri Nov 18, 2016 8:35 pm
by deanflyer
It was proprietary, part of the ODS system, although the cartridge I had was just a hacked CBM cartridge with a dump of the EPROM.

Re: What was your largest self-written 65xx program?

Posted: Sat Nov 19, 2016 6:01 am
by BigDumbDinosaur
deanflyer wrote:
Let me know if you want to see what 5000+ lines of uncommented code looks like :)
Uh...been there, don't want to go back. :cry:

Re: What was your largest self-written 65xx program?

Posted: Mon Jan 16, 2017 5:48 am
by dwight
I'd never done much 6502. Over the years, I'd just never
got around to the 6502.
Just recently, I wanted to get my KIM-1 working and that started
me on my KIM debug kit. It required writing code snippits to test
different functions on the KIM's circuits.
While looking through things, I came across someone that said that
QuickSort was known as the fastest sort. I knew that was wrong so
I sat down to write a distribution sort for 1K 16bit integers. It had a lot
of bugs. But luckily, another friend was able to find them and clean
my code up.
It is still a large program for me to write in an assembly language that
I'd never had much experience in.
You can critique it in the sort thread recently posted.
Use the last code posted as that is believed to be bug free.
The fellow that debugged it didn't really understand what the
program does.
Dwight

Re: What was your largest self-written 65xx program?

Posted: Tue Jan 17, 2017 10:44 pm
by Rich6502
Mine was an extention to Microsoft Basic 1.0 on the UK101 which required 2 8K roms when assembled. It was written on a PDP/11 using the Kim1 Assembler program and added over 70 different commands to the on board basic.

Regards

Rich

Re: What was your largest self-written 65xx program?

Posted: Wed Jan 18, 2017 2:47 am
by dwight
I think, more interesting would be how much functionality
in a small program space.
Something like most efficient use of space.
Dwight

Re: What was your largest self-written 65xx program?

Posted: Wed Jan 18, 2017 3:39 am
by Dr Jefyll
Interesting point, Dwight.

Welcome, Rich6502 !

-- Jeff

Re: What was your largest self-written 65xx program?

Posted: Wed Jan 18, 2017 2:27 pm
by EugeneNine
BigDumbDinosaur wrote:
deanflyer wrote:
Let me know if you want to see what 5000+ lines of uncommented code looks like :)
Uh...been there, don't want to go back. :cry:
I printed the disassembly of the C64 rom and started to read through it to reverse engineer it myself. Would have been in the last 80's because we could just get on the internet and download it. Basically reading through half a box of printer paper of uncommented code and referencing what snippets were documented in the programmers reference guide and trying to document it myself.

I don't think I ever finished writing more than a few pages of code myself, project ADD I guess.

Re: What was your largest self-written 65xx program?

Posted: Thu Jan 19, 2017 12:14 am
by nanochess
My biggest 6502 project would be my Space Raid game for Atari 2600, circa 2013, it accounts for 5102 lines.