Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 855383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:03:59+00:00 2026-05-15T08:03:59+00:00

I’m currently writing in C# what could basically be called my own interpretation of

  • 0

I’m currently writing in C# what could basically be called my own interpretation of the NES hardware for an old-school looking game that I’m developing. I’ve fired up FCE and have been observing how the NES displayed and rendered graphics.

In a nutshell, the NES could hold two bitmaps worth of graphical information, each with the dimensions of 128×128. These are called the PPU tables. One was for BG tiles and the other was for sprites. The data had to be in this memory for it to be drawn on-screen. Now, if a game had more graphical data then these two banks, it could write portions of this new information to these banks -overwriting what was there – at the end of each frame, and use it from the next frame onward.

So, in old games how did the programmers ‘bank switch’? I mean, within the level design, how did they know which graphic set to load? I’ve noticed that Mega Man 2 bankswitches when the screen programatically scrolls from one portion of the stage to the next. But how did they store this information in the level – what sprites to copy over into the PPU tables, and where to write them at?

Another example would be hitting pause in MM2. BG tiles get over-written during pause, and then get restored when the player unpauses. How did they remember which tiles they replaced and how to restore them?

If I was lazy, I could just make one huge static bitmap and just grab values that way. But I’m forcing myself to limit these values to create a more authentic experience. I’ve read the amazing guide on how M.C. Kids was made, and I’m trying to be barebones about how I program this game. It still just boggles my mind how these programmers accomplisehd what they did with what they had.

EDIT: The only solution I can think of would be to hold separate tables that state what tiles should be in the PPU at what time, but I think that would be a huge memory resource that the NES wouldn’t be able to handle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:04:00+00:00Added an answer on May 15, 2026 at 8:04 am

    wSo after a night of thinking and re-reading documents, I think I came up with a perfect solution. A matrix!

    Given the following data:

     3, -1, -1, -1, -1
    -1,  0,  1,  2, -1
    -1, -1, -1,  3, -1
    -1, -1,  5,  4, -1
    -1, -1, -1, -1, -1
    

    I can use this information to access information within lookup tables to determine what information I need. The first entry (0,0) defines the whole map, where as the other values define what is needed in that particular screen.

    MAP ARRAY    PALETTE   MUSIC   TILESET  STARTINGSCR
       0            0        0        1           4
       1            4        3        2           2
       2                         etc.
       3
    

    So when loading the map, I look at item (0,0). It will say I need to load X tiles into the PPU, use Y color pallete, Z tileset, and A music. It will also say that screen 0 is the starting screen and that the level starts there – position the character accordingly.

       SCREEN     PALETTE    TILESET   MUSIC   TILEDATA  SCROLLL SCROLLR SCROLLU SCROLLD  
          0           0          1       2         4       true     true    true    true
          1                   etc
          2           2          1       2         3       false   false     false  true
    

    Now lets say I need to transition screens. I can look at the current screen vs the target screen. If the new screen needs information not in the PPU, I can initiate a transition that will load the data during it. I can also see if I can scroll into that direction; e.g., if the target screen is -1, I cannot scroll that direction. I can also store a flag somewhere to determine that if scrolled onto that screen, I cannot scroll back. E.g, I can go right into screen #2 but cannot scroll left into screen 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a JSP page retrieving data and when single or double quotes are
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.