AHAHAHA COME AT ME AI
AHAHAHA COME AT ME AI
Quick reminder that the #retrogamedev IRC channel in Libera is still on: https://www.usebox.net/retrogamedev/
Come and lurk with us! There's also the occasional chat that you may love too; likely will share some of the development of my new MSX2 project.
Thanks to svolli I now own two fake 65C02 -- which are actually real 6502! Oh how the tables have turned...
#mos6502
@jbqueru @gumnos @mms Well, it has a PC of course, which is technically an "address register" not a general-purpose one though.
Instructions are simple 8bit values (operation and mode combined to one opcode) and regarding which modes are available for which operation, I'd say you get quickly used to it. It's (partially) related to the purposes of the registers. None is really "general purpose", only A comes close, but yep, it can't do one thing X and Y can do: count.
#mos6502 coders use the "#zeropage" in a way you'd otherwise use additional registers, which makes a lot of sense. The clocks for RAM and CPU are the same, RAM accesses need few clock cycles, and for the zeropage even fewer. There you can have your "address registers", 16 bits stored in little-endian.
Just received the "W.O.P.R. 64" cartridge for the #C64 expansion port. It features 32 LEDs to indicating signals on the #MOS6502 address and data busses and for 8 control port indicators:
https://www.tindie.com/products/thedarkforest/wopr64-for-commodore-64/
@cas TBH, this actually makes sense in some #CriticalInfrastructure when someone wants to finally replace some #MOS6502-based system and chug a low-end SBC in...
And given it targets #BusyBox, I'd not be surprised if #NORAD is already looking at the code to see if they can use it...
The first stage of my CPC ZERO build - a hypothetical 6502 based Amstrad CPC taking inspiration from the prototype 6502 board and the final Z80 based CPC464.
I'm using period appropriate hardware, wire wrapping the build, and solving design challenges the way they had to in the eighties.
In this zero-th part I state my design goals, choose a build method and build out the CPU and ROM.
https://bread80.com/2024/11/01/cpc-zero-part-0-intro-cpu-and-rom/
Attempting a rewrite of my 8-bit multi-platform, multi-ISA, assembler's instruction parser. #v80 uses a static tree for mapping instructions into opcodes (2nd image) which is very fast and efficient but hairy to write.
The new approach (1st image), uses an alphabetical list of instructions with a byte to state how many chars of the previous entry are re-used since alphabetically, the left-most chars repeat the most.
There's no guarantee this will even save space (#Z80 ISA is currently 4KB, #MOS6502 is about 1.7KB) and it will likely be slower as more lines will need to be skipped vs. a char-by-char branching approach, but it may help for very large ISAs, the size of which can balloon drastically with lots of shared prefixes, something I'm worried about with adding #eZ80 support. The alternative is adding 'macro' characters for shared-prefixes, but that bloats the native code that needs to be ported between architectures.
In many of the early RPGs like D&D and the computer RPGs that followed in its mould, magic spells had to be prepared before hand because once cast they were immediately forgotten. I feel like this is how the compare instruction works on the 6502 & Z80. Nothing, absolutely nothing, can permanently commit to memory the knowledge of which way the carry-flag goes when you want to do <= / >= / < / >
Is assembling #MOS6502 code on #Z80 considered sacrilege, or does that only apply when it's the other way around? #v80 #programming #retrocomputing
Both 6502 and Z80 are great, but oh boy is the Z80 ever bloated. Now that the original is not actually being manufactured, I kind of wonder if anybody will come up with a simplified Z80, hopefully one with index registers that don't suck
I don't know how many of you out there regularly write both #Z80 and #MOS6502 and have to juggle the two different syntaxes; my multi-platform, multi-ISA assembler #v80 uses a custom syntax designed for parsing speed and simplicity, and in some way unifies instruction syntax between Zilog & MOS ISAs.
v80’s syntax, for example uses "*" for a memory dereference, so that `ld.HL* $nnnn` = Zilog `ld HL, [$nnnn]` (v80 can use optional brackets for clearer intent here) and because instructions can't be split between parameters, `ld*$.HL $nnnn` is used for `ld [$nnnn], HL`.
For 6502 syntax I'm wondering what the best choice is, either `adc*$.x $nnnn` for MOS `adc $nnnn, x` or should I go with `adc.x* $nnnn` for something simpler but not as consistent with Z80 syntax?
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:
https://syncopate.us/articles/2024/b29c
#6502 #mos6502 #6502assembly
Just a sampling of the #hashtags I used and followed during the past year...
** Current Tech
- #SwiftUI
+ #Arduino
** #RetroComputing
- #AppleII
+ #pdp10 #tops20
+ #8bit #z80 #mos6502
** #RetroGaming
- #TextAdventure
- #InteractiveFiction
- #Zork
+ #Inform7
** Miscellany
- #WrexhamAFC
- #GenX
- #GenerationJones
+ #Jewish
+ #Hanukkah
+ #Mazeldon
+ #Secondhand
+ #Thrifting
If you're not following hashtags or including them in your posts, you're really missing out on the best part of Mastodon!
Peoples Computer Company, March 1977, highest quality, minor issues with my light, but flatened with a glass pane. Looks good. Time to digitize 25 mins
https://drive.google.com/file/d/1r6nj_yuzPYqNOio1KKUMbu8vxP6kW2IF/view?usp=sharing
Vid on the #c64 ML monitor I'm writing. :)
I put together a guide for c64 assembly coding to help others know where to start..
Hopefully useful to someone out there..
#c64 #commodore #mos6502 #assembly #retrocomputing
https://github.com/spiroharvey/c64/blob/main/asm/C64%20Assembly%20Coding%20Guide.md