I had an idea for NES which was already implemented in SNES

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
8bitMicroGuy
Posts: 314
Joined: Sun Mar 08, 2015 12:23 pm
Location: Croatia

I had an idea for NES which was already implemented in SNES

Post by 8bitMicroGuy »

I had an idea of what if a cartridge mapper for my NES game which I'd make on an FPGA chip could generate H-blank interrupts and directly shoot CPU instructions for pallete changes, scroll changes and etc. according to a certain so-called (as I called it) Scanline Context Table.

ONLY TO REALIZE IN THIS VIDEO THAT THIS FEATURE ALREADY EXISTS IN THE SNES AND IT'S CALLED HDMA!!!

What was I thinking!?

Seriously! As a kid, I've always judged some computer stuff by their weird name. "What's this system services svchost.exe? That's stupid. It's taking a lot of CPU usage and RAM.". Has anyone ever had such an approach towards things only to find out that those things are actually what you were searching for?
User avatar
dougeff
Posts: 2876
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: I had an idea for NES which was already implemented in S

Post by dougeff »

THIS FEATURE ALREADY EXISTS IN THE SNES
And gameboy color.
nesdoug.com -- blog/tutorial on programming for the NES
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: I had an idea for NES which was already implemented in S

Post by tepples »

Except HDMA in Super NES and GBC are used for almost opposite purposes. HDMA in GBC can write only to VRAM, not CGRAM or the scroll position. It does this during VRAM time slots unused by the interleaved background/sprite pattern fetch. HDMA in Super NES, by contrast, can write to almost any PPU register except the VRAM data register because sprite pattern fetch takes all the VRAM time slots that background rendering doesn't take. A mapper-driven implementation of HDMA on NES would more closely resemble the Super NES version, as it has the same VRAM access time constraint.
Oziphantom
Posts: 1163
Joined: Tue Feb 07, 2017 2:03 am

Re: I had an idea for NES which was already implemented in S

Post by Oziphantom »

yes HDMA is the Ambrosia, and I would love to have it on my C64/128 as well (kinda working on it ), its no COPPER mind ;)

Slight issue on the NES though, you don't have the 6510's AEC pin, the 6502 doesn't tri-state the bus, so you can't take over the BUS on a NES... Unless you are willing to RESET the CPU each line.. not very practical..
plainsteve
Posts: 27
Joined: Tue Jan 23, 2018 11:19 pm

Re: I had an idea for NES which was already implemented in S

Post by plainsteve »

Oziphantom said:
Slight issue on the NES though, you don't have the 6510's AEC pin, the 6502 doesn't tri-state the bus, so you can't take over the BUS on a NES... Unless you are willing to RESET the CPU each line.. not very practical..
One can hold the CPU in reset?
(And it's bus is high-Z in reset?)
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: I had an idea for NES which was already implemented in S

Post by lidnariq »

Not really.

If you have a front-loader, and the CIC stops working, the CIC will hold the NES's CPU in reset for 1/2 second and then let it run for 1/2 second, repeating.

While the NES's CPU is reset, all of its outputs are hi-Z.
Oziphantom
Posts: 1163
Joined: Tue Feb 07, 2017 2:03 am

Re: I had an idea for NES which was already implemented in S

Post by Oziphantom »

well yes you can hold in reset but that is not practical.

in that you want to hit reset at a specific clock on each line. So now your entire code base becomes a FSM and you have to write every "state" to be what ~100 clocks? You can't preserve a,x,y,status between them, and if you take to long you just get nuked by the reset. So you have to put all of your code into these perfect timed chunks, almost like making an Atari 2600 game ;)
Possible, yes, Practical no. Well would be fine for a demo.

Or hold it in Reset for the entire frame, only dropping out of reset during VBlank, which is probably more practical, but as you will probably need to spend most of your VBlank time making your VRAM updates, you won't have much time left update your game logic. PAL wouldn't probably be that bad..
Post Reply