The Nintendo Entertainment System, released in Japan as the "Famicom" in 1983, and later in America in 1985. Arguably one of the most famous and influential 8-bit computers of all time, it runs on a custom 6502 based CPU.
Questions tagged [nes]
20 questions
3
votes
1 answer
Why this NES 6502 assembly code doesn´t work when moved to a scoped proc?
I have a snippet that clears memory before initializing a game in NES 6502 assembly. When I leave the code inside the reset proc like so, it works:
.proc reset
SEI
CLD
LDX #0
ClearRAM:
STA $000,x
STA $100,x
STA $200,x
STA…

Chololoco
- 3,140
- 1
- 21
- 24
3
votes
1 answer
Is there a bug in the nestest rom?
I am currently making an emulator for the NES (like many others) , and while testing my emulation against the nestest rom by Kevtris (found here : https://wiki.nesdev.com/w/index.php/Emulator_tests),
there is a weird bug I've encountered , at the…

Amine Bensalem
- 362
- 3
- 15
3
votes
1 answer
Loading #$FF into A, and storing at address $0000 not working
I'm learning assembly for the NES, and I have wrote this program:
.org $8000 ; set code to start of rom
Start: ; make a label called start
lda #$ff ; set acc to 0xff
sta $0000 ; store address 0x0000 to acc which is 0xff
…

TheRealSuicune
- 369
- 3
- 10
2
votes
6 answers
Is there a way to create an array of combined functions compile-time in c++?
I'm working on an NES emulator in c++ and figured that the most efficient way to run opcodes would be to call a function pointer in an array of functions that do exactly what the opcode does.
The problem is that each opcode has a specific operation…

MrFlapjack
- 33
- 3
2
votes
1 answer
What's an elegant way to read controller input for NES (6502) assembly on ca65?
I'm starting to learn 6502 assembly for a potential NES game project on my off time, and I'm having some trouble setting up the reading of controller input. My background is in C, so I'm familiar with memory and how it works, but the flow control in…

ep84
- 315
- 2
- 17
2
votes
3 answers
NES(6502 assembly) Sprites movement
I am currently working on a NES(6502) assembly game but I don't understand how to make a sprite move. Here's how I think its supposed to works:
(loop)
LDA $200 ;will load into the A register the content of address $200,wich contain the Y position of…

J.Wilson
- 51
- 7
1
vote
1 answer
How should we use mirrored memory on a NES 6502?
I am not sure to understand a concept of the NES 6502. It is stated that PPU's memory range $2000-$2FFF is mirrored to $3000-$3FFF which is great, but I am not sure to understand how I could benefit from that while programming?
Could someone explain…

Chololoco
- 3,140
- 1
- 21
- 24
1
vote
1 answer
How to save Gamestate Objects in python?
We are making a reinforcement learning algorithm for our class. And in this progress we want to make a savestate for a nes-game which is made using the gym-retro package. We have tried using pickle to save the game environment but it does not pickle…

Tijmbee
- 11
- 1
1
vote
1 answer
Error: Range error (130 not in [-128..127]) message when I try to assemble my nes game
I get this error at line 248 that doesn't make any sense:
Error: Range error (130 not in [-128..127])
I have no idea why this is happening because all there is at that line is just a jump command to a label, which is not even that far away from…

i28v
- 33
- 3
1
vote
1 answer
How to use a predefined constant as a memory address?
I have a NES game in the making. I am defining several constants to help me with managing sprites. I have
spriteyposition = $0200
spritetile = $0201
spriteattribute = $0202
spritexposition = $0203
sprite1 = $00
sprite2 = $04
sprite3 = $08
sprite4 =…

frogstair
- 444
- 5
- 20
0
votes
0 answers
How to convert a .yyp file to .s in ASM 6502
I want to convert a .yyp file to .s file
This files are ASM 6502 for Nintendo Entertainment System. I made a game with Game Maker IDE and now want to convert it to Assembly. Can I have some help ?
I were expecting that we could find a converter on…

EvrestRGB
- 1
- 3
0
votes
1 answer
Swift SpriteKit/Quartz/Metal: How to draw low-level pixel data at 60FPS?
I am working on a NES Emulator project for macOS written in Swift.
However, I'm having a hard time finding a solution to render the internal VRAM into some sort of view in an efficient way.
Simplifying the problem, let's assume I have an array of…

Davide Caroselli
- 33
- 1
- 5
0
votes
1 answer
Smooth sprite movement
I am a beginner at nes development and i have created a simple sprite movement code.
It's working fine, but not smooth: It just teleports between pixels.
I heard something about subpixels, can I make a smoother code?
Here it is:
ldy…
0
votes
1 answer
What can I do when ld65 prompts a memory and configuration error? It just closes
I'm using cc65 for developing my first NES game, among other tools. I created a raw code for a quick test for it in Assembly. managed to make an object of it but using ld65 as a linker, a message saying "memory and configuration error" and it just…

Berserkerfox
- 1
- 2
0
votes
1 answer
CA65 NES issue with INY STY
I am new to CA65 and am trying to transfer a NESASM project over to it. I translated everything and it builds. When I run I get nothing. Just a black screen. Diving deeper I have an infinite loop. It seems to be having an issue with increasing…

theBrilliance
- 61
- 1
- 7