6502 Questions

4

Solved

I've been working on an emulator for the MOS 6502, but I just can't seem to get ADC and SBC working right. I'm testing my emulator with the AllSuiteA program loaded at 0x4000 in emulated memory, an...
Xena asked 22/3, 2015 at 10:33

8

Solved

Trying to generate a series of random numbers on my Commodore 64 (C64) using JSR $E09A and retrieving the number from $63 and $64. (which according to all the documentation I've seen is the same ro...
Fate asked 5/7, 2017 at 23:59

3

Solved

I am playing around with 6502 assembler here: http://skilldrick.github.io/easy6502 I have made this that just puts a random color pixel in a random place on the screen: LDY #$00 ; Clear Y loop: ...
Planksheer asked 23/7, 2015 at 19:58

2

Solved

I'm trying to learn how to write disk files using kernal routines following this Codebase64 Tutorial. I have copied my routine, written in Acme Crossassembler, below. It failed to open file and gi...
Cristionna asked 11/4, 2017 at 21:6

2

Solved

Platform 6502 emulator DASM assembler Windows 10 I have numbers beginning from #2 $2F %0000111 I don't understand why # $ % are used in assembly code of 6502? And sometimes ldx #$FF Load the x re...
Emcee asked 22/6, 2021 at 5:0

4

Solved

I want to understand what exactly an interrupt is for my 6502 work-alike processor project in Logisim. I know that an interrupt does the following steps: Stops the current program from processing ...
Doriedorin asked 21/3, 2019 at 11:31

4

Solved

I'm learning assembly for the 6502 micro via a C64 emulator. Currently trying to output strings to the screen. Here is my code: processor 6502 org $1000 ldx #$00 ;using x register as column co...
Aide asked 19/4, 2017 at 14:28

2

Solved

I have written a short program in 6502 assembler for the Commodore 64 using the ca65 assembler and ld65 linker. The program should render a solid square sprite somewhere near the center of the disp...
Aubyn asked 13/2, 2020 at 22:50

4

I'm trying to understand the instruction sets of old microcontrollers, especially the 6502. The documentation of the instruction set that can be found here lists two shift instructions (beside the...

1

Solved

Trying to learn how to use the ca65 assembler, I've been battling with making include guards work. Googling and reading the ca65 Users Guide didn't help. Here's a minimal example that produces the ...
Rf asked 22/10, 2019 at 18:46

3

Solved

Reading this HTML page on Commodore 64 memory allocations because I am interested in old computer hardware, I stumbled across a cell in the table that claims that the memory address is unused. What...
Proprietary asked 12/10, 2018 at 14:22

1

Solved

I recently bought a c64 mini and been trying to code some assembly using Turbo Macro Pro v1.2. While working on the hello world program I found a tutorial where an auto run BASIC header was used. ...
Hostetler asked 24/8, 2019 at 20:26

7

Solved

It's the weekend, so I relax from spending all week programming by writing a hobby project. I wrote the framework of a MOS 6502 CPU emulator yesterday, the registers, stack, memory and all the opc...
Diffractometer asked 21/9, 2008 at 18:50

3

I am trying to find information about how the 6502 proccesor handles interruptions, but I am very confuse. I have seen some examples about it, but It is like a normal subrutine. I have some experi...
Melosa asked 8/5, 2014 at 18:31

3

Solved

I am working on an assembly language program for a 6502 cpu, and am finding that I need a fast-as-possible divide-by-seven routine, in particular one which could take a 16-bit dividend. I am famil...

1

I am using cc65 6502 simulator, which compiles code for 6502. I wish to link the 6502 code and C code and produce a binary file that I can execute. My C code "main.c": #include<stdio.h> ...
Liturgical asked 3/9, 2018 at 1:13

1

I'm building an emulator for the MOS6502 processor, and at the moment I'm trying to simulate the stack in code, but I'm really failing to understand how the stack works in the context of the 6502. ...
Sari asked 2/3, 2018 at 22:5

2

Solved

I'm trying to implement game controls using kernel routines in Commodore 64. Below code works with one exception. Each key stroke counted as single input. e.g.: There is no effect if you keep hold...
Tanner asked 21/12, 2016 at 11:16

11

I'm looking for texts that give detailed treatment of assembly programming principles and don't use x86 as the target architecture. I haven't found any recent books like that, but I would expect th...
Ditch asked 27/11, 2009 at 7:57

1

Solved

Most emulators store the number of cycles a particular instruction takes in a lookup table, and then add any conditional cycles if needed (when crossing page boundaries, for example). I'm wonderin...
Epochmaking asked 21/12, 2016 at 4:47

3

Solved

Below is my self modifying routine for memory copy on Commodore 64. I wrote char codes and number of repeats in a table and filled the screen_ram the with this routine. I'm looking for suggestio...
Larcenous asked 10/2, 2016 at 13:36

1

Solved

I'm planning to use software sprites in multicolor char mode for my new C64 project. My idea is to use superimpose 'bullet' sprite data to tile data. I think I can have tileset data at address 'TI...
Marinelli asked 27/9, 2015 at 9:24

7

If you had read my other question, you'll know I've spent this weekend putting together a 6502 CPU emulator as a programming exercise. The CPU emulator is mostly complete, and seems to be fairly a...
Derwin asked 21/9, 2008 at 22:50

1

Solved

I am building a Commodore PET on an FPGA. I've implemented my own 6502 core in Kansas Lava (code is available at https://github.com/gergoerdi/mos6502-kansas-lava), and by putting enough IO around i...
Krueger asked 4/7, 2015 at 13:3

3

Solved

I want to implement the Forth words VALUE and TO on a RPC/8 (an emulated computer in a Minecraft mod). My best attempts get me a set of words that work fine so long as I don't use them while compil...
Counterpoison asked 16/2, 2013 at 20:39

© 2022 - 2024 — McMap. All rights reserved.