Decent 6502 emulator?

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
Post Reply
User avatar
PrimordialHelios
Posts: 4
Joined: Fri Jul 29, 2016 9:11 pm

Decent 6502 emulator?

Post by PrimordialHelios »

Does anybody know of a decent emulator for the 6502? I really want to get into it, but the only one I've found that actually works is 6502js. I've tried Apple ][ and C64 emulators, but I couldn't get either of them to run an assembler.

Does anyone have any emulators, or good walkthroughs for setting up an APPLe ][/C64 emu?
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Decent 6502 emulator?

Post by dougeff »

Apple II...you can type assembly directly in assembly mode. This video shows how to get into assembly mode...and type in instructions.

https://www.youtube.com/watch?v=laxVu4t3Ndw
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Decent 6502 emulator?

Post by dougeff »

It took me a minute to remember how this works...

(press 'RESET' button to get ] prompt)
CALL-151
!
300:LDA #$00

Worked in the Apple IIe js emulator.
Attachments
Apple2.png
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Decent 6502 emulator?

Post by koitsu »

I'm quite familiar with the old Apple II Monitor and mini-assembler (it's also available on the IIGS; same methodology; ROM03 models support a native CDA that lets you drop to the monitor easily, saving having to Ctrl-Reset at the right time and use CALL -151. KEGS, ActiveGS, etc. all work fine. However several Monitor features were removed on the IIGS, such as Step/Trace).

If all you're looking to do is bang out code, yup, it's sufficient. I suggest writing out your code on paper or notepad first, however, because typos/mistakes will often require you to re-enter long sections of the program over again (e.g. if something is off by one byte). If you're looking for doing a full project in assembly on a 6502 system, consider the Merlin 8 assembler.

If you need documentation for the Monitor (this is what you enter using CALL -151) or the mini-assembler (what you get when doing "!" in the Monitor), just dig around using the previous terms. This stuff is "old" but documented.
User avatar
TOUKO
Posts: 306
Joined: Mon Mar 30, 2015 10:14 am
Location: FRANCE

Re: Decent 6502 emulator?

Post by TOUKO »

you have the skilldrick's one(it's a web 6502 emulator) :
https://skilldrick.github.io/easy6502/

I don't know if you want just a 6502 emulator or a whole machine .
Last edited by TOUKO on Mon Aug 08, 2016 1:20 pm, edited 1 time in total.
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Decent 6502 emulator?

Post by dougeff »

Another good thing about the Appe iie or iigs...

You can 'call' Assembly subroutines from the BASIC interpreter. As in...you can mix the 2 programming languages.

Now, programming a game on the Apple II...not easy unless you're interested in making a text adventure (Zork). Which by the way is available on the same Apple II js emulator... including my favorite game 'Suspended'. I actually had some of these games as a kid.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Decent 6502 emulator?

Post by dougeff »

Interesting side note...the IIGS (often mentioned here), has a 65816 processor. When you boot it up, it takes you to a screen that was similar to early Windows / McIntosh GUI . But, some button* put it in emulation mode, and it was very good at emulating its 6502 younger brothers.

I used to use my IIGS as a word processor. I wrote my homework on it. Really.

* I can't remember how to get the IIGS into the ] prompt. Maybe you had to boot with a different disk. I read the entire 200+ page manual just now, and didn't see any mention of it. :(

EDIT: I think I found it...it may have been 'OPEN APPLE+CTRL+ESC' button combination, to get to the old IIe screen with a ] prompt.
Last edited by dougeff on Sun Aug 07, 2016 9:27 am, edited 2 times in total.
nesdoug.com -- blog/tutorial on programming for the NES
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Decent 6502 emulator?

Post by tepples »

The HGR mode on the Apple II Plus/IIe makes it practical to use square tiles. If you draw your tiles as 14 half-pixels (2 bytes) wide and 12 pixels high, they'll show up on a standard TV as perfect squares. (That's because the HGR half-pixels have a 6:7 pixel aspect ratio.) This implies a playfield of 20x16 cells on the 280x192 half-pixel screen, which is great for something like Dr. Mario or Columns or Puyo or Zoop. Interestingly enough, the four colors in Zoop (magenta, green, blue, and orange) are the same four colors in Apple II HGR, and the 20x14-cell playfield in PC Zoop is about the right size, which leads me to thinking that Hookstone originally prototyped it on an Apple II before having it ported it to every fourth- and fifth-generation console it could get its hands on.

The IIGS-exclusive super hires mode is a little harder to use without the Mac-like GS/OS running, but it has a 3:4* pixel aspect ratio identical to that of the Commodore 64 and close to that of the Capcom CPS. This means 8x6 or 16x12 will appear square.

Is there still a community of developers of new Apple IIe and IIGS games?


* The official spec for super hires states a slightly wider 5:6 PAR. I'm going by how its pixel clock relates to the Rec. 601 frame size, which is what you'll end up seeing if you record the IIGS's composite output or if you record its RGB output through a SuperGun-type adapter.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Decent 6502 emulator?

Post by tokumaru »

If your goal is to learn 6502 assembly before coding for machines that use that CPU, I suggest you do it in an isolated environment where you don't have to deal with any platform's specific details. Here's what I used when learning, and still use sometimes to test small snippets of code: http://www.exifpro.com/utils.html

You just need to start a program with .org $8000 (or almost any other address - this is so the assembler can tell where to place your program in memory) and then you can start typing 6502 code. Then there's a button to assemble the code, and another to debug the result. When debugging you can run the code all at once, step through it, etc., while optionally watching registers, flags, memory, and so on.
Post Reply