[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/vr/ - Retro Games

Search:


View post   

>> No.10874339 [View]
File: 338 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
10874339

>>10873912
> learning 6502
https://skilldrick.github.io/easy6502/
Truly love this little demo, it kickstarted me into my journey. 6502 is a great jumping off point into learning ASM, it's simple enough to grasp the entire set without having to worry about the more advanced features of later processors. minus some very strange quirks of 6502 but you don't have to worry much about those imo
https://www.masswerk.at/6502/6502_instruction_set.html
handy instruction set page, has bailed me out more times than i can count.
> I eventually settled on 68k Genesis development but I credit this book with helping the core concepts of assembly language programming to finally click with me.
I've had a similar experience learning 6502 first and branching elsewhere, pun intended. Once you can read one instruction set / assembler syntax, it opens up a world where you can vaguely read them all and sort of hop into whatever architecture you like. Love my new super powers.

>> No.9877829 [View]
File: 338 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
9877829

>>9877817
> Is there something wrong with WLA DX
the .8BIT and .16BIT directives don't seem to work right on SNES, so i end up just throwing whatever REP #$xx and SEP #$xx i want the code to behave like, and the X register referring to .DB data values in memory refuses to build sometimes? otherwise it's fine i guess
has anyone else here had this problem or any solutions? of course not lol

>> No.9786590 [View]
File: 338 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
9786590

>>9786520
> ST_ store into _ register
ST_ store _ register into memory
i'm glad you're taking personal notes, it can certainly help, but much better alternatives exist with opcode listings, cycle counts, byte counts, flags affected, etc.
this is the one i use:
https://www.masswerk.at/6502/6502_instruction_set.html#details

>> No.9734723 [View]
File: 338 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
9734723

>>9734518
if it hasn't been done already it is either impossible or insanely difficult

>> No.9414261 [View]
File: 338 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
9414261

>>9413270
hmmm, maybe it's a header issue? maybe the code needs an .ORG $xxxx at the beginning?
i would run a DIF on those files and see what's up

>> No.7980243 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7980243

>>7980175
> LDA N2ATBL+0 ;
> LDY #2
> JMP EMF000
Loads A with whatever is at N2ATBL and Y with 2 and jumps to label EMF000. We don't know what is at EMF000.
> EQU *
This kind of doesn't make sense. EQU is a string replacement assembler command and * refers to the current memory address. I'm not sure exactly... Probably a command unique to this particular assembler.
> LDA #2
> JSR FALL
Load A register with 2 and jump to subroutine FALL. We don't know what's there.
A JSR will return to the location after the subroutine has ended with an RTS (return to subroutine) command, unlike JMP which does not store a return address on the stack.
> LDA WRKST+6,X ;FAL
> BPL TES250
Load the byte at WRKST plus 6 plus the value of X register, if it is positive (0-127), goto TES240. We don't know what's there.
> LDA WRKST+6,X ;WAL
> BPL TES240
> RTS
Similar to above, if the branch isn't taken, return (from) subroutine to wherever you called JSR from.
> EQU *
> LDA N2ATBL+0 ;MOV
> LDY #2 ;BOX NO.
> JMP EMF000
Similar to the top instructions.
> EQU *
> LDA WRKST+6,X
> BPL TES300
Similar to the others.
> AND #$7F
Take the current value in A and turn bit 7 to 0.
> STA WRKST+8,X
Store it at WRKST plus 8 plus the value of X register.
So yeah, it's valid code, doing ....something. We just cant tell what without more information. I hope that answers your question.

>> No.7947479 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7947479

>>7947065
> reverse order
lil' endian pointers, also, you can do ASM quicker when things are in reverse.
nice detective work man

>> No.7780417 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7780417

>>7780353
for memory you could:
TAX
LDA variable
STX variable
for registers you could:
STA temporary
TXA
LDX temporary
Either X or Y would work. If you don't have a register open, or want to switch between X and Y, you'd have to:
STX temporary0
STY temporary1
LDX temporary1
LDY temporary0
It's smart to reserve some temporary variables in zero page for general usage. I use var0-var7 mapped to $00-$07 personally.

>> No.7729224 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7729224

>>7729161
>The Z80 has a lot of wonky stuff that's confusing me
Depends what's confusing you. The 6502 may not be any better, it comes with its own set of unintuitive jank, but, once you understand what the designers had in mind i find it nice to use.
It's also a matter of finding a good assembler and how to use that properly.

>> No.7686040 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7686040

>>7686023
> finish learning C and an assembler
you never finish. always room to improve.
starting would be a good step though

>> No.7424369 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7424369

>>7423957
_86 is and always has been a dumpster fire. z80 is versatile and useful but kind of slow. 6502 is elegant but has weird quirks. 65c02 is like a mutant 6502 with like big beefy trogdor arms sticking out where they don't belong.
i've never used 68k but i hear nice things....

>> No.7361826 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7361826

>>7361395
> It's not a meme.
Ok. This was the case many years ago, and with some knockoff / shit hardware, but not anymore.
Most modern electronics, memory, etc use 3.3v and older hardware uses 5v. Some of the early powerpak's / everdrives / chinese knockoff bullshit just shoved 3.3v shit in there because they didn't know better or didn't give a shit. Any Everdrive made in the last 6/7 years is absolutely fine. Beware shitty repros and chinese bullshit. That is all.

>> No.7342838 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7342838

>>7342698
> Most games used Mode 1
> 4BPP (16 colors per tile) for 2 BG layers, 2BPP for a 3rd
> Eat a dick
https://www.youtube.com/watch?v=5SBEAZIfDAg

>> No.7316603 [View]
File: 339 KB, 527x484, chuck.png [View same] [iqdb] [saucenao] [google]
7316603

>>7315719
>>7316194
> There are 8 of them
There are 8 branching instructions that detect 4 usable flags, N, Z, C, and V, which are Negative, Zero, Carry, and Overflow You don't need a compare instruction (CMP, CPX, or CPY) specifically to set Zero and Negative; most instructions do besides the ones that write to memory.
Carry and Overflow only work with Add and Subtract (ADC and SBC). besides BIT which sets the Overflow flag to the value of bit 6, which is unintuitive but a helpful optimization in some cases.
Processor status flags are all kept in one internal Byte, and you can manipulate the stack to store and set processor status flags directly (PHP and PLP). This is helpful when dealing with interrupts that break whatever you are currently executing to do something else.

Navigation
View posts[+24][+48][+96]