NES dev on retro pc

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

AkhiMertail
Posts: 1
Joined: Fri May 28, 2021 5:31 am

NES dev on retro pc

Post by AkhiMertail »

Would it be possible to program an NES game on a retro pc such as an IBM 5150. I assume it should be because that was the technology at the time, but maybe they used more advanced computers idk. If not would another 6502 machine such as the apple II work. What tools are available and is there any tutorials on programming games with these old PCs (could be for Atari etc). I know it will prove harder but is there any benefit to working on these old machines? Any information would be greatly appreciated.
User avatar
Dwedit
Posts: 4922
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: NES dev on retro pc

Post by Dwedit »

ASM6 has source code available, you may be able to build it with a C compiler that targets such a system, but I haven't tested it on the 286 with 640K of RAM.

And no, there is no benefit to using an old PC, unless you need to connect peripherals to obsolete buses (Parallel, Serial, ISA slot, etc...)
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: NES dev on retro pc

Post by Controllerhead »

AkhiMertail wrote: Fri May 28, 2021 12:31 pm Would it be possible to program an NES game on a retro pc such as an IBM 5150?
Sure, why wouldn't it be? Modern tools such as emulators with step through debuggers are immeasurably helpful though. Transferring your game to a flash cart for hardware testing would be more difficult, but possible i suppose. There are EEPROM burners and chips that might work with those retro machines, and i assume did and were used.

You could try X816 for DOS out of curiosity:
https://www.romhacking.net/utilities/956/
Image
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: NES dev on retro pc

Post by lidnariq »

There was a recent article on hackaday about doing nesdev on the Apple ][e: https://hackaday.com/2021/05/20/what-ne ... -apple-ii/
I mean, really, TylerBarnes posted a video, but the article is better :)
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: NES dev on retro pc

Post by Oziphantom »

5150 is a little to low spec, you need an AT class and then you get PDS which is what people actually used back then. 64tass will run on a DOS machine, it has a DOS build. You won't be able to get a "machine to NES" download and test kit so you will have to probably make your own. the PDS system has been reversed so you can get schematics for the PC side of it, but not the NES card which will need to be made custom for your needs.

Gabelli Nasier wrote FFI II and III on an Apple II, some people used Commodore 128s so yes.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: NES dev on retro pc

Post by tepples »

This appears to be a crosspost from a thread on Reddit. You might find more answers there. Are you SaltInvestigator54?

Practically, a Commodore 128 or a 128K Apple IIe or IIc is probably the smallest 6502-family machine for which I'd consider building a full-capability assembler as a proof of concept. You need enough RAM for several things: the assembler itself, the means of disk access (such as ProDOS), at least two disk sectors' worth of the program's source code, at least two disk sectors' worth of assembled output, the symbol table, all macro definitions, and a list of relocations to apply once their values are known.
puppydrum64
Posts: 160
Joined: Sat Apr 24, 2021 7:25 am

Re: NES dev on retro pc

Post by puppydrum64 »

lidnariq wrote: Fri May 28, 2021 12:50 pm There was a recent article on hackaday about doing nesdev on the Apple ][e: https://hackaday.com/2021/05/20/what-ne ... -apple-ii/
I mean, really, TylerBarnes posted a video, but the article is better :)
That's hilarious considering I was just trying out the Apple IIe (it's a 6502 based system like the NES, I got frustrated with trying to get color graphics to work, they were different every time even though I hadn't changed the code at all).

I have trouble imagining how that would work. Can you store your RAM in the "free space" from $0C00-$1FFF? (I'm referencing the chart listed here)https://www.chibiakumas.com/6502/appleii.php
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: NES dev on retro pc

Post by Oziphantom »

The Apple II's graphics are very weird. If the colours switched from green + purple to blue and orange then the 7th bit of each byte is not being set properly.

you only need to worry about free mem if you want your code to work with basic etc. But to start its a good spot.
puppydrum64
Posts: 160
Joined: Sat Apr 24, 2021 7:25 am

Re: NES dev on retro pc

Post by puppydrum64 »

I guess a better question would be this: If I wanted to port a NES game I'm making to the Apple II, would I have more internal RAM to work with besides the zero page?
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: NES dev on retro pc

Post by Oziphantom »

which apple II ?

the Apple II 4K no. because you have to hold your code in RAM as well and you are way under.
16K still no.
48K how much ROM code do you have, 32K then you have 16K of RAM left.
128K lots more RAM.
On the NES you have more than the Zero Page you have 2K of RAM.

However porting a NES game to the Apple // is not advised, the apple // has no sprites, no chars and no scrolling. So making an Apple // port of a NES game is going to be very hard.
puppydrum64
Posts: 160
Joined: Sat Apr 24, 2021 7:25 am

Re: NES dev on retro pc

Post by puppydrum64 »

Oziphantom wrote: Mon May 31, 2021 11:23 pm which apple II ?

the Apple II 4K no. because you have to hold your code in RAM as well and you are way under.
16K still no.
48K how much ROM code do you have, 32K then you have 16K of RAM left.
128K lots more RAM.
On the NES you have more than the Zero Page you have 2K of RAM.

However porting a NES game to the Apple // is not advised, the apple // has no sprites, no chars and no scrolling. So making an Apple // port of a NES game is going to be very hard.
I was thinking of the Apple //e. Either way it's funny how you're able to program a game that's for a much more powerful system than the one you're writing the code on. That kind of blows my mind
User avatar
Dwedit
Posts: 4922
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: NES dev on retro pc

Post by Dwedit »

A two-pass assembler doesn't need to keep everything in RAM.
It can stream the input source files and output binary file.
Symbol Table could either be in RAM, or if RAM is really tight, even be on the disk.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: NES dev on retro pc

Post by rainwarrior »

puppydrum64 wrote: Tue Jun 01, 2021 6:32 pmI was thinking of the Apple //e. Either way it's funny how you're able to program a game that's for a much more powerful system than the one you're writing the code on. That kind of blows my mind
I'd consider the Apple IIe as more powerful than the NES where it counts? 128k RAM, swappable storage media with 100+kb of space per unit, standard keyboard.

IIe was more than capable of being a text editor and assembler, which are the real workhorse programs involved here. Less good at being an art editor, but still capable there. NES had a little bit faster CPU, and a much more powerful graphics unit, but neither of those is very helpful for those main development tasks.

Apple II also had a very open and well documented design, which from its inception had been aimed at hobbyists and allowing them to build and attach their own devices to an Apple II, which might be important for e.g. building an eprom burner, or other related devlopment tools.
puppydrum64 wrote: Sat May 29, 2021 6:44 pmI have trouble imagining how that would work. Can you store your RAM in the "free space" from $0C00-$1FFF? (I'm referencing the chart listed here)https://www.chibiakumas.com/6502/appleii.php
Yes, with the possible exception of 1 byte on ZP used by the built-in monitor to dispatch IRQs, if you can forego the operating system the memory map completely frees up. Any of the video-mapped memory regions can also be used as regular memory if you don't need them for graphics.

Incidentally I'm currently working on a cc65/ca65 framework library that gives you more direct access to this un-encumbered space. Still a work in progress: https://github.com/bbbradsmith/apple2flat


In an interview a few years ago Masahiro Sakurai talked about using an FDS with a trackball accessory as his main development computer for Kirby (GB). No keyboard, even, but managed to code with a point-and-click interface.

http://sourcegaming.info/2017/04/19/kir ... t-secrets/

My main though about this was that a FDS unit was probably a lot cheaper than most other computers. In a time when the computers themselves were pretty dear to acquire, this might get you a more active workforce of developers. 4 people up and running on limited FDS systems might be more productive than 1 person working on a fancier PC.


Also this caused me to remember a recent thread asking a very similar question: Experiencing a real development of a Nes cart with 80’s computers
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: NES dev on retro pc

Post by Oziphantom »

An Apple // while being a corner cutting overpriced machine, is much better than a NES for doing anything other than playing games. But even then only most games. Playing ultima, wizardry et al on a NES not great. Having a keyboard really helps.
When you are a programmer you don't care about fancy graphics, you want a 286 10mhz with an MDA card and BRIEF. Again in a game the NES will decimate it, the Apple //e would probably give it a good run. As a raw assembly powerhouse the AT will slaughter. You could get fancy and get a CGA card, but the lower res is not so great. An EGA to get 8x8 chars and get 80x43 is nice option, but the clear crisp display of a monochrome monitor is just easier on the eyes. But even or the era the Apple // was a bad choice, you could get a lot better for a lot less.

However with consoles this is the norm, the idea is the console is a power house that beats what you could get. The SNES's graphics blew every home computer(-sharp x68000) out of the water. The Saturn and PS1and N64 also out did a PC of the time. While the N64 used SGI Indy machines they are actually not that powerful, for Saturn and PS1 you are using a PI 90 maybe if you are lucky. PS2 well PIII existed but not going to hold a candle to a PS2/game cube. The Xbox you would actually just use the XBOX as a pc to develop for the XBOX as it was cheaper than a PC with its parts would cost ;) PS3 was Dual P4HT and we had graphics cards to match so by the PS3 era we mostly hit parity.

few points about the apple //
the //e is only 64K
the e//e is also 64K
the platinum //e is 128K
You can tell the platinum from the case colour and the fact it has a numeric keyboard. Although can can upgrade (e)//e to 128K.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: NES dev on retro pc

Post by calima »

I'm annoyed by the constant italics theatrics. Would it annoy Oziphantom back if I wrote Apple \\e?
Post Reply