注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

疾风之狼博客

 
 
 

日志

 
 

GB MBC资料(个人渣翻译,翻译太烂就无视吧...= =)  

2013-09-18 17:25:06|  分类: GB\GBC资料 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

本资料针对原文的Memory Bank Controllers部分资料进行翻译

无MBC:

ROM最大32KByte,无切换BANK机制,ROM直接映射到$0000-$7FFF,可选8KB的RAM连接在$A000-$BFFF

MBC1:

MBC1 ROM最大可达2MByte,RAM最大可达32KByte

$0000-$3FFF(读):是ROM BANK 00,是ROM驻留体,不可切BANK

$4000-$7FFF(读):是ROM BANK,编号01h-7Fh,可切BANK

$A000-$BFFF(读/写):是外部RAM BANK,编号00h-03h,可切BANK

$0000-$1FFF(写):是RAM开关端口,写00h到$0000-$1FFF禁用RAM,写0Ah到$0000-$1FFF开启RAM。

$2000-$3FFF(写):是ROM SWITCH BANK端口,写任意1字节到$2000-$3FFF,把ROM BANK XX映射到$4000-$7FFF

$4000-$5FFF(写):是RAM SWITCH BANK端口,写00h-03h任意1数字或指定大于0Fh的ROM编号到$4000-$5FFF,把RAM/ROM BANK XX映射到$A000-$BFFF

$6000-$7FFF(写):是ROM/RAM MODE SELECT端口,写00h到$6000-$7FFF是ROM BANKING MODE(8KB RAM/2MByte ROM)[默认],写01h到$6000-$7FFF是RAM BANKING MODE(32KB RAM/512KB ROM)

MBC2:

MBC2 ROM最大可达256KByte,RAM最大可达512x4 bit,MBC2是不支持外部RAM

$0000-$3FFF(读):同MBC1

$4000-$7FFF(读):同MBC1

$A000-$A1FF(读/写):512x4 bits RAM,内置于MBC2芯片
这MBC2不支持外部RAM,包括512x4 bits的内置RAM(在MBC2芯片本身),他仍然需要一个外部电池来断电保存数据。

$0000-$1FFF(写):RAM开关,以下地址可以用作开启或禁用RAM:0000-00FF, 0200-02FF, 0400-04FF, ..., 1E00-1EFF,建议作为MBC2 RAM启用/禁用的地址范围是0000-00FF

$2000-$3FFF(写):ROM SWITCH BANK端口,写任意1字节到$2000-$3FFF,把ROM BANK XX映射到$4000-$7FFF,以下地址可以用作ROM SWITCH BANK端口:2100-21FF, 2300-23FF, 2500-25FF, ..., 3F00-3FFF,建议作为MBC2 ROM SWITCH BANK端口地址范围是2100-21FF

MBC3:

MBC3 ROM最大可达2Mbyte,RAM最大可达32Kbyte,支持RTC(实时时钟)

$0000-$3FFF(读):同MBC1

$4000-$7FFF(读):同MBC1

$A000-$BFFF(读/写):RAM BANK,编号00h-03h
$A000-$BFFF(读/写):RTC Register 编号08h-0Ch
根据目前BANK或RTC寄存器选择,这空间用来访问8KByte的外部RAM或单一RTC寄存器

$0000-$1FFF(写):与MBC1大多相同,写0Ah到$0000-$1FFF开启读写外部RAM和RTC寄存器,写00h到$0000-$1FFF而为禁用。

$2000-$3FFF(写):同MBC1,写00h值到$2000-$3FFF而为选择BANK 01,所有其他值01h-7Fh选择对应BANK

$4000-$5FFF(写):写00h-03h到$4000-$5FFF,把对应外部RAM BANK(如有的话)映射到$A000-$BFFF;写08h-0Ch值到$4000-$5FFF将相应RTC寄存器映射到$A000-$BFFF。

$6000-$7FFF(写):Latch Clock Data (Write Only) [注:这端口不好翻译,好像是与时钟数据有关]
When writing 00h, and then 01h to this register, the current time becomes latched into the RTC registers. The latched data will not change until it becomes latched again, by repeating the write 00h->01h procedure.
This is supposed for <reading> from the RTC registers. It is proof to read the latched (frozen) time from the RTC registers, while the clock itself continues to tick in background.

The Clock Counter Registers
  08h  RTC S   Seconds   0-59 (0-3Bh)
  09h  RTC M   Minutes   0-59 (0-3Bh)
  0Ah  RTC H   Hours     0-23 (0-17h)
  0Bh  RTC DL  Lower 8 bits of Day Counter (0-FFh)
  0Ch  RTC DH  Upper 1 bit of Day Counter, Carry Bit, Halt Flag
        Bit 0  Most significant bit of Day Counter (Bit 8)
        Bit 6  Halt (0=Active, 1=Stop Timer)
        Bit 7  Day Counter Carry Bit (1=Counter Overflow)
The Halt Flag is supposed to be set before <writing> to the RTC Registers.

The Day Counter
The total 9 bits of the Day Counter allow to count days in range from 0-511 (0-1FFh). The Day Counter Carry Bit becomes set when this value overflows. In that case the Carry Bit remains set until the program does reset it.
Note that you can store an offset to the Day Counter in battery RAM. For example, every time you read a non-zero Day Counter, add this Counter to the offset in RAM, and reset the Counter to zero. This method allows to count any number of days, making your program Year-10000-Proof, provided that the cartridge gets used at least every 511 days.

Delays
When accessing the RTC Registers it is recommended to execute a 4ms delay (4 Cycles in Normal Speed Mode) between the separate accesses.

HuC1(红外LED控制器)
该芯片(Hudson soft制作的)与MBC1非常相似,区别是支持红外LED输入/输出
  评论这张
 
阅读(199)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017