Guidance for creating a pong game (New here)

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

User avatar
test_matsu
Posts: 23
Joined: Tue Feb 19, 2019 11:54 pm
Location: Planet Earth, Milky Way

Re: Guidance for creating a pong game (New here)

Post by test_matsu » Mon Feb 25, 2019 11:52 am

Pokun wrote:Yes now it looks like a header for NROM.

This wiki page explains the basics about programming NROM. The eighth byte in the header example is 8 instead of 0 like yours, but that only means it is using a NES 2.0 header instead of an iNES header like you use. Either is fine in most cases.
How would I create a Init code To reset the NROM for the vbanks? Would I write to a memory address with a specific value? than use JMP?

Edit: Would I add a new segment to call the NMI?

Edit_2: Oh I am learning so much faster thanks for the links everyone for sending me them also I now know what is kinda going on

Code: Select all


Blah: ;I am a label, I can be used to JMP to

;This code allows the label MainLoop to be repeated with JMP

MainLoop:
    JMP MainLoop



Pokun
Posts: 1324
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Guidance for creating a pong game (New here)

Post by Pokun » Tue Feb 26, 2019 5:18 am

I'm not sure what you mean by vbanks. NROM don't use banks and has nothing to reset. It's just a cartridge board with program and character ROM chips.
The NES hardware however must be initialized before you do anything else though. If the tutorial didn't teach you that you can use the init code in the wiki as is. No need to set up any mappers since you don't use any.

Check out Rainwarrior's ca65 example to see how things are organized. It's a bit complicated for a first program but you can check how he did things and compare with yours.

User avatar
test_matsu
Posts: 23
Joined: Tue Feb 19, 2019 11:54 pm
Location: Planet Earth, Milky Way

Re: Guidance for creating a pong game (New here)

Post by test_matsu » Tue Feb 26, 2019 8:43 am

Pokun wrote:I'm not sure what you mean by vbanks. NROM don't use banks and has nothing to reset. It's just a cartridge board with program and character ROM chips.
The NES hardware however must be initialized before you do anything else though. If the tutorial didn't teach you that you can use the init code in the wiki as is. No need to set up any mappers since you don't use any.

Check out Rainwarrior's ca65 example to see how things are organized. It's a bit complicated for a first program but you can check how he did things and compare with yours.
Ah thank you for that info

unregistered
Posts: 1066
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Guidance for creating a pong game (New here)

Post by unregistered » Wed Feb 27, 2019 1:58 pm

hi, I understand you seem to be using the ld65 assembler... but, if you decide to go to asm6 and you end up wanting smaller listing files you could try asm6_. That just adds listing file creation options. Your .nes file will work the same as if created with asm6. :)

User avatar
koitsu
Posts: 4216
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Guidance for creating a pong game (New here)

Post by koitsu » Wed Feb 27, 2019 2:23 pm

unregistered wrote:hi, I understand you seem to be using the ld65 assembler... but, if you decide to go to asm6 and you end up wanting smaller listing files you could try asm6_. That just adds listing file creation options. Your .nes file will work the same as if created with asm6. :)
OT: could these changes please be reviewed and merged into a project like asm6f, which doesn't use something like an underscore as part of the binary filename (this is very weird and is often a tactic malware/spyware authors use. Not saying you are one, just saying that's really a bad thing to name something). Having too many forks of a single piece of software makes it a nightmare for programmers. If so, awesome! Just submit the changes as pull requests.

unregistered
Posts: 1066
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Guidance for creating a pong game (New here)

Post by unregistered » Wed Feb 27, 2019 4:20 pm

OT REPLY TO KOITSU: no, I'm still editing the asm6_ fork. The _ at the end is to make it different from asm6, but is not a 'u' bc I don't care for the attention. If needed I could change it to 'asm6i' because I often add roman numerals at end of updated assembly functions. I have never thought about the bad part of '_'. What do you think? :)

edit: Sent you a PM Koitsu; I'm trying to submit a pull request. :)

Pokun
Posts: 1324
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Guidance for creating a pong game (New here)

Post by Pokun » Thu Feb 28, 2019 4:07 pm

I agree that releasing something with only an underscore character as the only change in filename is not a very good idea and can be easily overlooked. But as you didn't really intend to release it just yet it's understandable as a temporary filename. However on the other hand you did kind of release it just now by posting that link.

unregistered
Posts: 1066
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Guidance for creating a pong game (New here)

Post by unregistered » Thu Feb 28, 2019 4:33 pm

Pokun wrote:I agree that releasing something with only an underscore character as the only change in filename is not a very good idea and can be easily overlooked. But as you didn't really intend to release it just yet it's understandable as a temporary filename. However on the other hand you did kind of release it just now by posting that link.
OT REPLY TO Pokun: Thank you for sharing. :) Maybe I'll change it to asm6i after finishing what is being worked on. Thanks to Koitsu's guidance and helpful pm reply asm6_'s -u and -U flags have been added to asm6f.c and those changes have been submitted to freem... and if he approves you'll be able to benefit from -u or -U when using asm6f.exe, which doesn't have a _ :)

p.s. asm6_ was already released on the end of my lengthy thread. :)

(Sorry OP for diverting your thread. Please take it back.)

Post Reply