What was your largest self-written 65xx program?

Programming the 6502 microprocessor and its relatives in assembly and other languages.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

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

Post 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.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
deanflyer
Posts: 14
Joined: 18 Nov 2016

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

Post 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 :)
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

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

Post 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
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
deanflyer
Posts: 14
Joined: 18 Nov 2016

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

Post 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.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

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

Post 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:
x86?  We ain't got no x86.  We don't NEED no stinking x86!
dwight
Posts: 213
Joined: 08 Jun 2004

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

Post 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
Rich6502
Posts: 1
Joined: 17 Jan 2017

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

Post 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
dwight
Posts: 213
Joined: 08 Jun 2004

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

Post by dwight »

I think, more interesting would be how much functionality
in a small program space.
Something like most efficient use of space.
Dwight
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

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

Post by Dr Jefyll »

Interesting point, Dwight.

Welcome, Rich6502 !

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
EugeneNine
Posts: 59
Joined: 01 Nov 2016

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

Post 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.
User avatar
nanochess
Posts: 16
Joined: 09 Jan 2017
Location: Mexico, Mexico
Contact:

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

Post by nanochess »

My biggest 6502 project would be my Space Raid game for Atari 2600, circa 2013, it accounts for 5102 lines.
Author, IOCCC+JS1K winner, Princess Quest in Evercade Intellivision, MSX/Atari/CV/Intellivision/SMS game dev, Knight of boot sector games, IntyBASIC/CVBasic creator.
Post Reply