Questions tagged [65816]

The 65816, aka 65c816, used in many SNES game cartridges

Wikipedia page for 65816 and 65802

Super NES Programming/65c816 reference (wikibooks)

http://wiki.superfamicom.org/snes/show/65816+Reference

7 questions
1
vote
3 answers

Trying to understand some 65c816 assembly code—what is the purpose of this ordering of instructions?

I'm new to assembly and trying to piece together what this piece of code is doing. Here's the Super NES 65c816 reference I'm using. 01: $A4917E AD E5 05 LDA $05E5 [$A4:05E5] 02: $A49181 29 3F 00 AND #$003F 03: $A49184 AA TAX 04:…
Andrew Cheong
  • 29,362
  • 15
  • 90
  • 145
1
vote
1 answer

Split variable in CMAKE_[LANGUAGE]_COMPILE_OBJECT call

I got the following variable set( CMAKE_CA65816_COMPILE_OBJECT " --cpu 65816 -s -o -I ") This results in this command ca65 --cpu 65816 -s -o Game.s.o Game.s -I include_dir1 include_dir2…
Michael Malura
  • 1,131
  • 2
  • 13
  • 30
1
vote
1 answer

How to modify sprite position using 65c816 Assembly for the SNES?

I am trying to modify my sprite's position, but I can't figure out how to I have spent hours searching for answers, but none of which work with the assembler I am using: WLA-DX. I am extremely new to 6502 assembly, so forgive me if my logic is…
Priswall
  • 21
  • 5
1
vote
2 answers

How is the carry flag being set in this assembly code?

Given the following assembly code for a 16-bit PRNG function, $80/8111 E2 20 SEP #$20 ; set 8-bit mode accumulator $80/8113 AD E5 05 LDA $05E5 ; load low byte of last random number $80/8116 8D 02 42 STA $4202 $80/8119 A9 05 LDA…
Andrew Cheong
  • 29,362
  • 15
  • 90
  • 145
0
votes
0 answers

65C816 assembly loading data to table in memory not working as expected

Any ASM experts want to help explain something? I have this (commented out secondary colors): ; ; --- Tables for setting SCB and color tables for color -------- ; ENTRY logocolor logocolor DC.W $00B0 ;$ DC.W $0AD9 DC.W $0FF0 ;$…
cjp
  • 3
  • 3
0
votes
1 answer

How do you relocate the Zero Page on a 65816

Background information As a modern days PHP developer with a passing interest in 8-bit technologies, I'm a little sketchy on real low level stuff. Although I've worked with the Z80 processor, and done some MIPs assembly at University, I'm least well…
Shaun Bebbers
  • 179
  • 2
  • 12
0
votes
0 answers

How can "beq [label]" produce an out of range error?

I am trying to compile this code snippet, and can't for the life of me understand the assembler error: [...] .macro collflag flags RW_forced a8i16 lda EXRAM, x and flags RW_forced a16i16 .endmac [...] col_r: RW_forced a16i16 …
Lake
  • 4,072
  • 26
  • 36