Questions about comprehension, hobbies, and tenacity.

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Bob_Yoseph
Posts: 14
Joined: Sun Mar 14, 2021 8:30 pm

Questions about comprehension, hobbies, and tenacity.

Post by Bob_Yoseph »

Hello, I have had some troubles with previous hobbies and keeping with them over ~6 months. To start off, I have done these things: play various video games (rarely play them now, but Mother 3 and Doukutsu Monogatari kept my attention), spend hours upon end watching YouTube (LGR, IHE, Luke Smith, Analyze & Optimize, Ahoy, etc. ), learn the guitar first with a teacher but then through Guitarmastery's advice (Claus Levin), learn Japanese through complete Immersion (heh, Mon Da Inashi), programming (Python through Programming the RPi by Simon Monk, C++ through SoloLearn, Code.org, some knowledge about BASIC from A Guide to Programming in Applesoft by Bruce Presley, and now 6502 Assembly), and using Famitracker, FamiStudio, and Audacity.

I have no idea why I am nomadic towards my hobbies. Anyway, I end up reading some way or another, if that's anything constant.

So I have some difficulty understanding the 6502 PDF's that I have downloaded (some mentioned here - http://forums.nesdev.com/viewtopic.php?f=10&t=22335) and using CC65 as a complete beginner. On top of that, I have been thinking about how it would be more effective to modify an already existing game with source code, like Metroid or SMB, porting VVVVVV to the NES as a public project, or rom hacking.

I feel that I keep my own personal axiom too close to heart, "don't follow a train of thought to the last spike", and end up being susceptible to being completely malleable, if that makes sense.

What should I do?
Garth
Posts: 246
Joined: Wed Nov 30, 2016 4:45 pm
Location: Southern California
Contact:

Re: Questions about comprehension, hobbies, and tenacity.

Post by Garth »

If there's a mentality of not wanting to be bothered with details but keep moving, that can be a problem. The idea might be to keep productive by not letting details get you down; but there's some kind of curve where being to the right of the peak is just as unproductive as being to the left. I think the tendency is to go more to the right as we get older, and we have to discipline ourselves to get back to the peak. That seems to be my experience and observation anyway.
http://WilsonMinesCo.com/ lots of 6502 resources
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Questions about comprehension, hobbies, and tenacity.

Post by Controllerhead »

Bob_Yoseph wrote: Fri Mar 19, 2021 7:37 pm I have been thinking about how it would be more effective to modify an already existing game with source code, like Metroid or SMB, porting VVVVVV to the NES.
Those engines are both highly specific to their respective games. This is most certainly not the case.
Bob_Yoseph wrote: Fri Mar 19, 2021 7:37 pm porting VVVVVV
The Mojon Twins engine might not be a bad candidate...
https://github.com/mojontwins/MK1_NES
Image
Bob_Yoseph
Posts: 14
Joined: Sun Mar 14, 2021 8:30 pm

Re: Questions about comprehension, hobbies, and tenacity.

Post by Bob_Yoseph »

Controllerhead wrote: Sat Mar 20, 2021 12:50 am
Bob_Yoseph wrote: Fri Mar 19, 2021 7:37 pm I have been thinking about how it would be more effective to modify an already existing game with source code, like Metroid or SMB, porting VVVVVV to the NES.
Those engines are both highly specific to their respective games. This is most certainly not the case.
Ah.
Bob_Yoseph wrote: Fri Mar 19, 2021 7:37 pm porting VVVVVV
The Mojon Twins engine might not be a bad candidate...
https://github.com/mojontwins/MK1_NES
The problem is that I don't know C and only "learned" C++ basics and I would like to have the advantages of using assembly for code speed and optimization.
If there's a mentality of not wanting to be bothered with details but keep moving, that can be a problem. The idea might be to keep productive by not letting details get you down; but there's some kind of curve where being to the right of the peak is just as unproductive as being to the left. I think the tendency is to go more to the right as we get older, and we have to discipline ourselves to get back to the peak. That seems to be my experience and observation anyway.
Like the peak of mastery? It could be quite possible that my problems are physiological https://youtu.be/T3x7FsIIgvE (which unfortunately I can't control yet due to my age and interpersonal and intrapersonal problems). But to sum up how I've been feeling (for no reason), here's an example link: https://forums.civfanatics.com/threads/ ... ad.641501/
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Questions about comprehension, hobbies, and tenacity.

Post by Controllerhead »

Bob_Yoseph wrote: Sat Mar 20, 2021 6:09 am I don't know C ... and I would like to have the advantages of using assembly for code speed and optimization.
Ok. The CA/CC65 toolchain is built around using C and with it extra complication and baggage to make that happen. Personally, i am happy with the ASM6F / Mesen debugger route of development. It's a much simpler setup.
Bob_Yoseph wrote: Sat Mar 20, 2021 6:09 am Existential crisis
Do you overanalyze and fret over one foot moving in front of the other or do you just walk? Just walk.
Attachments
asm6f-latest.zip
(70.72 KiB) Downloaded 89 times
Image
Bob_Yoseph
Posts: 14
Joined: Sun Mar 14, 2021 8:30 pm

Re: Questions about comprehension, hobbies, and tenacity.

Post by Bob_Yoseph »

Just downloaded Mesen and your attached file, thanks!
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Questions about comprehension, hobbies, and tenacity.

Post by Controllerhead »

Bob_Yoseph wrote: Sun Mar 21, 2021 8:29 am Just downloaded Mesen and your attached file, thanks!
Ok, great! The real secret sauce of this setup is compiling with -M and getting labels in the step through debugger.

Image

I think it's good to experiment with different tools and setups to find a workflow that suits you, but, i have no problem evangelizing this one =)
Image
Bob_Yoseph
Posts: 14
Joined: Sun Mar 14, 2021 8:30 pm

Re: Questions about comprehension, hobbies, and tenacity.

Post by Bob_Yoseph »

So how do I start? Whenever I try to open asm6f.exe through my personal Windows machine, the command line opens and instantly closes. I think it works when I open it from the command line.

Also, how do I get started with Assembly programming through these programs? I feel like I have some knowledge about the 6502, now I want to get my hands dirty with the real deal BUT I have no idea on how to use an assembler like asm6f in conjunction with the debugger program.

If I knew how, I would follow Nerdy Nights by "translating" whatever's special about NESASM into ASM6F. But I don't. :/
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Questions about comprehension, hobbies, and tenacity.

Post by Controllerhead »

Bob_Yoseph wrote: Sun Mar 21, 2021 2:39 pm Whenever I try to open asm6f.exe through my personal Windows machine, the command line opens and instantly closes. I think it works when I open it from the command line.
It is a command line tool. There is no GUI. You have to open a command window and type something like:
"ASM6F -L -M C:\path\myGame.asm C:\path\myGame.nes" and it will magically appear if your code is valid.

What you can do instead is make a .bat file to do this for you, double click on that, and you're good to go.

Personally, i have a keyboard shortcut in Notepad++ that activates this .bat file, and if the code is valid, it will start Mesen with the .nes file running. The .bat file looks something like this:

Code: Select all

C:\path\ASM6F -L -M C:\path\myGame.asm C:\path\myGame.nes
IF %errorlevel%==0 (start "" C:\path\Mesen.exe C:\path\myGame.nes) ELSE PAUSE
EXIT /B
Bob_Yoseph wrote: Sun Mar 21, 2021 2:39 pm If I knew how, I would follow Nerdy Nights by "translating" whatever's special about NESASM into ASM6F. But I don't. :/
The differences are minor and have to do with syntax and some directives that NESASM handles natively. If my memory serves me correctly, someone translated Nerdy Nights into ASM6 some time ago, but, i can't seem to find the thread. I'm looking...

EDIT: I can't seem to find it, but, here is Tokumaru's explanation of the differences along with his templates:
viewtopic.php?t=12219&start=0#p138851
Image
Bob_Yoseph
Posts: 14
Joined: Sun Mar 14, 2021 8:30 pm

Re: Questions about comprehension, hobbies, and tenacity.

Post by Bob_Yoseph »

Well, I'll try it out later. I'm currently installing dual-booting Manjaro onto my offline Windows machine. Thanks for the help!
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Questions about comprehension, hobbies, and tenacity.

Post by Controllerhead »

Bob_Yoseph wrote: Sun Mar 21, 2021 5:36 pm Thanks for the help!
I do what i can man. Honestly, you may just want to go through the Nerdy Nights tutorials as is, and worry about all of this complication later. Get yourself the basics down. I feel like i dumped alot on you here, so, i hope you're not overwhelmed. Come back with questions and don't be a stranger huh?
Image
Bob_Yoseph
Posts: 14
Joined: Sun Mar 14, 2021 8:30 pm

Re: Questions about comprehension, hobbies, and tenacity.

Post by Bob_Yoseph »

Is there any pre-compiled versions of NESASM online that I can just download? Sometimes I don't have admin rights on some of the computers that I use.

EDIT: I found one and week one of Nerdy Nights worked.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Questions about comprehension, hobbies, and tenacity.

Post by Pokun »

Probably almost any version of Nesasm works with Nerdy Nights. This is the latest version/fork I can find.

Asm6 versions of Nerdy Nights lessons are found here. The advanced tutorials and the sound tutorials are not included, but I think there is enough information for you to make those in Asm6 yourself when you are ready to do them. That's what I did, and I didn't have the Asm6-converted lessons back then.


Here is a few corrections, that I wrote long ago, to the "bad" things that the Nerdy Night tutorials teaches you:

Code: Select all

1) The Famicom/NES resolution is always 256x240 pixels for both NTSC and
PAL, never 256x224. Anything cropped off depends on the TV (or emulator) and
varies.
This is an old misconception that still lingers in some tutorials.

2) $2003 doesn't set low byte of the RAM address used as OAM buffer. It
sets the full OAM address used for all OAM writes including OAM-DMA start
address (OAM is only 256 byte large so one byte is enough for the full
address). $4014 do sets the high byte of the RAM address used as OAM buffer
though (low byte is implied to be 00). This is another old
misconception and comes from the old GBAGuy tutorial I believe.

3) Although Nerdy Nights teaches you how to read controllers it
begrudgingly never teaches you to read both bit 0 and bit 1 of $4016 and
$4017 and merge them. Which means that homebrew seldom supports expansion
port controllers for us Famicom owners. This is an old problem even with
many commercial games, especially those made by non-Japanese developers,
but also with some Japanese-made games. The Nesdev wiki has examples that
reads expansion controllers though.
Don't worry too much over these as you follow the tutorial (especially not the last one), but you should know about them when you are done with Pong.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Questions about comprehension, hobbies, and tenacity.

Post by tokumaru »

Pokun wrote: Mon Mar 22, 2021 11:16 amHere is a few corrections, that I wrote long ago, to the "bad" things that the Nerdy Night tutorials teaches you:

Code: Select all

1) The Famicom/NES resolution is always 256x240 pixels for both NTSC and
PAL, never 256x224. Anything cropped off depends on the TV (or emulator) and
varies.
This is an old misconception that still lingers in some tutorials.

2) $2003 doesn't set low byte of the RAM address used as OAM buffer. It
sets the full OAM address used for all OAM writes including OAM-DMA start
address (OAM is only 256 byte large so one byte is enough for the full
address). $4014 do sets the high byte of the RAM address used as OAM buffer
though (low byte is implied to be 00). This is another old
misconception and comes from the old GBAGuy tutorial I believe.

3) Although Nerdy Nights teaches you how to read controllers it
begrudgingly never teaches you to read both bit 0 and bit 1 of $4016 and
$4017 and merge them. Which means that homebrew seldom supports expansion
port controllers for us Famicom owners. This is an old problem even with
many commercial games, especially those made by non-Japanese developers,
but also with some Japanese-made games. The Nesdev wiki has examples that
reads expansion controllers though.
Don't forget the worst offender of all, the way they have the entire program in the NMI handler, game logic first, video updates second, effectively leaving you with only about 8% of the CPU power the system has to offer.
Bob_Yoseph
Posts: 14
Joined: Sun Mar 14, 2021 8:30 pm

Re: Questions about comprehension, hobbies, and tenacity.

Post by Bob_Yoseph »

Don't forget the worst offender of all, the way they have the entire program in the NMI handler, game logic first, video updates second, effectively leaving you with only about 8% of the CPU power the system has to offer.
Well, if I find the personal time to dink around to figure this stuff out. I want to finish a book that I'm reading on top of other personal work I have to do.

Whenever I read the more technical posts on this site, I am reminded of my time with other languages, science, or other concepts. Hopefully, I can figure this stuff out- it doesn't seem that hard. At times I could be trying to apply Minecraft physics to this endeavour.
Post Reply