#6502assembly

2025-02-11

Current mood:

Resisting to rewrite @chriscovell's TapeDump into ca65, just because I don't want to run Dosbox to build it or modify it.

#TapeDump #NES #6502assembly

2024-11-15

I'm making an interactive tutorial for building an NES sound driver.
This is the first exercise, which simply plays a square wave on the first pulse channel.
It includes a live text editor which assembles your code into an NSF and plays it in an emulator.
Live app: bobbicodes.codeberg.page/nerdy
Source: codeberg.org/bobbicodes/nerdy6

#chiptune #NESDev #JavaScript #6502assembly #programming

Nerdy6502
An interactive NES audio tutorial

Code editor with 6502 assembly code which plays a square wave on the NES.
2024-06-02

STA really ought to live among the read-modify-store group of instructions, as the special case that only stores, because like with all instructions in that group, store immediate makes no sense. #6502assembly

Someone reverse-engineered Apple ][ Choplifter, an amazing game from my youth. Awesome write-up of the process and link to the assembly code.

blondihacks.com/reversing-chop

#reverseengineering #6502assembly #programming #apple2 #retrogaming #retrocomputing

hugovangalen 🤖 🕹️ 😼hvangalen@mastodon.nl
2024-05-05

I saw this earlier today.

#Hacking #Tetris from within the game itself, through the highscore list.

Worth a watch if you dig #6502assembly and old video games. 🤓🕹️

youtu.be/QOES2XTqT74

2024-04-25
A weird thing about being 50 is that there are programming languages that I've used regularly for longer than some of the software developers I work with have been alive. I first wrote BASIC code in the 1980s. The first time I wrote an expression evaluator--a fairly standard programming puzzle or homework--was in 1990. I wrote it in Pascal for an undergraduate homework assignment. I first wrote perl in the early 1990s, when it was still perl 4.036 (5.38.2 now). I first wrote java in 1995-ish, when it was still java 1.0 (1.21 now). I first wrote scala, which I still use for most things today, in 2013-ish, when it was still scala 2.8 (3.4.0 now). At various times I've been "fluent" in 8086 assembly, BASIC, C, Pascal, perl, python, java, scala; and passable in LISP/Scheme, Prolog, old school Mathematica, (early days) Objective C, matlab/octave, and R. I've written a few lines of Fortran and more than a few lines of COBOL that I ran in a production system once. I could probably write a bit of Haskell if pressed but for some reason I really dislike its syntax so I've never been enthusiastic about learning it well. I've experimented with Clean, Flix, Curry, Unison, Factor, and Joy and learned bits and pieces of each of those. I'm trying to decide whether I should try learning Idris, Agda, and/or Lean. I'm pretty sure I'm forgetting a few languages. Bit of 6502 assembly long ago. Bit of Unix/Linux shell scripting languages (old enough to have lived and breathed tcsh before switching to bash; I use fish now mostly).

When I say passable: in graduate school I wrote a Prolog interpreter in java (including parsing source code or REPL input), within which I could run the classic examples like append or (very simple) symbolic differentiation/integration. As an undergraduate I wrote a Mathematica program to solve the word recognition problem for context-free formal languages. But I'd need some study time to be able to write these languages again.

I don't know what the hell prompted me to reminisce about programming languages. I hope it doesn't come off as a humblebrag but rather like old guy spinning yarns. I think I've been through so many because I'm never quite happy with any one of them and because I've had a varied career that started when I was pretty young.

I guess I'm also half hoping to find people on here who have similar interests so I'm going to riddle this post with hashtags:

#Coding #SoftwareDevelopment #ProgrammingLanguages #8086Assembly #BASIC #C #Pascal #perl #java #scala #LISP #Scheme #Prolog #Mathematica #ObjectiveC #matlab #octave #R #Python #Fortran #COBOL #Haskell #Clean #Flix #Curry #Factor #Unison #Joy #Idris #Agda #Lean #6502Assembly
John Carlsen 🇺🇸🇳🇱🇪🇺johnlogic@sfba.social
2024-02-29

Is anyone here interested in the 6502 microprocessor?

I got a little frustrated with the poor quality of online resources, so I put this together:

syncopate.us/articles/2024/b29

#6502 #mos6502 #6502assembly

mmphosismmphosis
2024-02-28
Anton (PD5ANT)pd5ant@mastodon.radio
2024-02-27

Finished the 3D printed enclosure for the KIM uno, first attempt #kimuno #6502assembly

KIM uno 3D printed enclosureKIM uno 3D printed enclosure
2024-02-03

I have now moved the "Tetris on 6502 Assembly" blog serie to my new home:
fightingcomputers.nl/Projects/

Take a look if you fancy some 6502 coding on the #c64
#commodore #tetris #6502assembly #retrocomputing

2024-01-31
2023-03-16

Inspired by the classic one liner:
10 PRINT CHR$(205.5+RND(1));: GOTO 10
for the #Commodore #C64

* = $c000
lda #$00
sta $d020
sta $d021
lda #$01
sta $0286
lda #147
jsr $ffd2
clc
lda $d012
and #$01
adc #$cd
jsr $ffd2
bne $c012

Execute with SYS 49152
#6502Assembly

10 PRINT CHR$(205.5+RND(1));: GO TO 10 - but in 6502 assembly, running on the Commodore C64
2023-03-16

I wonder if you can make something useful in assembly in the limits of one Mastodon post - or 500 characters? Either as Assembly source, or as just hex bytes, which is about 160 hex bytes including spaces and a start address.
#AskingForAFriend
#6502Assembly
#MachineCode
#Z80

2023-03-16

Here is the fixed code:

C000: A2 0A LDX #$0A
C002: BD 0C C0 LDA $C00C,X
C005: 20 D2 FF JSR $FFD2
C008: CA DEX
C009: 10 F7 BPL $C002
C00B: 60 RTS
C00C: 44 4C 52 4F 57 20 4F 4C
C014: 4C 45 48

This fixed version checks if X is now positive (reading it as a signed Integer from -127 to +128 I think). Zero is of course a positive number. The previous version worked by luck, as C64 emulators tend to initialise RAM to zero, which might not be reliable on real hardware.

#6502Assembly

2023-03-16

@cyberspice So JSR OSWRCH is equivalent to the Commodore Kernal CHROUT ($ffd2)
Good work.
#6502Assembly

2023-03-15

After some thinking, this is the shortest way to make a Hello World in #6502Assembly on the #Commodore #C64 (portable to other C= machines)
Source:

* = $c000
ldx #$0a
lda $c00c,x
dex
jsr $ffd2
bne $c002
rts

!byte $44, $4c, $52, $4f, $57, $20, $4f, $4c, $4c ,$45, $48

Screen shot from BASIC also attached.

6502 Disassembly of a Hello World exampleCommodore C64 BASIC listing of a Hello World, in Assembly, with a MC Loader
2023-03-15

One mistake I used to make in 6502 was this:

lda #$00
ldx #$00
ldy #$00

I now realise this will save me two whole bytes:

lda #$00
tax
tay

#6502Assembly

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst