• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] How is a ROM built?

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
  • I have been looking for an explanation or TUT or a how-to for how a ROM is built. How they work. In depth explanations of the workings of one. Does anyone know where I can find anything similar to this?
     

    Xenesis

    Syogun Changer
    55
    Posts
    18
    Years
  • You'd have to be more specific for starters.

    How something is built for the NES has absolutely no bearing on how it would be built for the NDS for example.

    But the summary is simply that it is a binary dump of the physical media (in whatever form) in a way that preserves the memory map or I/O setup of the original console.
     

    Drithlan

    Self Proclaimed Cartographer
    47
    Posts
    13
    Years
  • I was thinking more along the lines of how a Pokemon ROM is built explaining step by step what each section of the code stores/is for. A More detailed list of Scripts and their offsets and any other technical details that would be useful or interesting to learn.
     

    Teh Baro

    In my times...!
    521
    Posts
    18
    Years
  • I was thinking more along the lines of how a Pokemon ROM is built explaining step by step what each section of the code stores/is for. A More detailed list of Scripts and their offsets and any other technical details that would be useful or interesting to learn.
    I think it doesn't work that way.
    As much, you can find a small header with info about the rom (such as the name and code of the game) and a pointer to the main() function, as well as (probably) pointers to things related to the filesystem. A "ROM" is just an executable. asking for the structure of a rom is like asking for the structure of an exe. You aren't going to find a "detailed list of Scripts and their offsets".
     

    Bolens

    Soul Hacker
    359
    Posts
    14
    Years
    • Age 30
    • PA
    • Seen Aug 22, 2016
    Well, [FONT=Arial, Arial, Helvetica]GBA ROMs are special chips that contain a standard ROM, address latches, and address counters all on one chip. Cart accesses can be either sequential or non-sequential. The first access to a random cart ROM location must be non-sequential. This type of access is done by putting the lower 16 bits of the ROM address on cart lines AD0-AD15 and setting /CS low to latch address lines A0-A15. Then /RD is strobed low to read 16 bits of data from that ROM location. (Data is valid on the rising edge of /RD.) The following sequential ROM location(s) can be read by again strobing /RD low. Sequential ROM access does not require doing another /CS high-to-low transitions because there are count up registers in the cart ROM chip that keep track of the next ROM location to read. Address increment occurs on the low-to-high edge of all /RD. In theory, you can read an entire GBA ROM with just one non-sequential read (address 0) and all of the other reads as sequential so address counters must be used on most address lines to exactly emulate a GBA ROM. However, you only need to use address latch / counters on A0-A15 in order to satisfy the GBA since A16-A23 are always accurate.

    Now, with backup up there are three different types:
    [/FONT][FONT=Arial, Arial, Helvetica]SRAM (256KBit or 512Kbit) - Battery backed up static RAM. It can be up to 64K bytes but it's usually 32K bytes in size. It is located in the memory map from 0xe000000 to 0xe00ffff. (Examples of games that use 32K RAM backup: FZero, etc.). Newer games are using 64K bytes.

    Flash ROM (512KBit or 1Mbit) - This is memory which can be 64K bytes or 128K bytes with bank switching. It is located in the memory map from 0xe000000 to 0xe00ffff. Reading Flash ROM is the same as reading SRAM; however, writing to Flash ROM is a different process due to the fact that Flash chips often have different modes of operation. Consult Sanyo & Atmel flash data sheets for more info. [/FONT] [FONT=Arial, Arial, Helvetica]This type of backup is emulated in nearly all available cartridges. Cart designers only have to implement the identify, the erase (in case of Sanyo based design) and the write command. Not a big problem inside an EPLD design :-) and it's enough to implement only one chip :-).[/FONT] [FONT=Arial, Arial, Helvetica] [/FONT]Some of the manufacturers guarantee a minimum of 10,000 rewrites per 1 sector so these devices have a limited life compared to SRAM. (Examples of games that use 64K Flash ROM backup: GT:Grand Touring Car Championship, Chu Chu Rocket, etc.) The Pokemon Ruby cartridge will use a 1Mbit flash chip.

    [FONT=Arial, Arial, Helvetica]
    EEPROM (4KBit or 64KBit) - This uses the /CS, A23, and D0 of the cart bus and is a serial connection. It usually is found in 4kbit or 64kbit size, but because of it's serial configuration, it could theoretically be any size. The maximum useable ROM size is 128MBits when using this device. Some of the manufacturers guarantee a minimum of 100,000 rewrites per address so these devices have a limited life compared to SRAM. (Examples of games that use EEPROM backup: Mario Advance, Final Fight, Hot Potato).

    SOURCE: https://www.ziegler.desaign.de/GBA/gba.htm
    [/FONT]

    [FONT=Arial, Arial, Helvetica] Hope this clears up any questions.
    [/FONT]
     
    Last edited by a moderator:

    mustafa505

    Aeon Developer
    306
    Posts
    14
    Years
  • To learn to make a rom needs ASM knowledge. well its a empty rom with blank sprites and blank scripts etc... they form them and make movesets and mapp tiles and all.
    Moveset are diffrent in diffrent games comparing to shinchan in cinemaland and pokemon..!
     
    Back
    Top