PM Bios

From SublabWiki
Revision as of 18:16, 2 June 2008 by Asterick (talk | contribs) (The IRQ Vector Table)
Jump to: navigation, search

The BIOS Overview

The internal BIOS consists of a 4kB program image built to initialize the system, bring it out of sleep and various other system specific tasks. Since the Pokemon Mini is never technically off, only suspended, BIOS is used for tasks like enabling power to the system and responding to various at rest IRQs.

The BIOS image begins with a 256 byte IRQ vector table, consisting of 128 16-bit vectors. The system reserves 32 vectors for hardware IRQs, the rest are used for software calls. It is worth noting that all IRQs are latched on the rising edge of an event, so button presses and IR receive is only latched when the IR receiver is active 1 or if a button has been press, but not released.

The IRQ Vector Table

Bios IRQ Vector Table
IRQ Cart IRQ IRQ Group Hardware Strobe Description
$00 0 Reset
$01
$02
$03 1 $20[7..6] $27,7 PRC Frame Divider Overflow
$04 2 $20[7..6] $27,6 PRC Render
$05 3 $20[5..4] $27,5 Timer2 Upper-8 Underflow
$06 4 $20[5..4] $27,4 Timer2 Lower-8 Underflow (8-bit only)
$07 5 $20[3..2] $27,3 Timer1 Upper-8 Underflow
$08 6 $20[3..2] $27,2 Timer1 Lower-8 Underflow (8-bit only)
$09 7 $20[1..0] $27,1 Timer3 Upper-8 Underflow
$0A 8 $20[1..0] $27,0 Timer3 Pivot
$0B 9 $21[7..6] $28,5 32hz
$0C 10 $21[7..6] $28,4 8hz
$0D 11 $21[7..6] $28,3 2hz
$0E 12 $21[7..6] $28,2 1hz
$0F 13 $22[1..0] $2A,7 IR Receiver
$10 14 $22[1..0] $2A,6 Shock Sensor
$11 $2A,5
$12 $2A,4
$13 $21[5..4] $28,1 Cartridge Ejected
$14 26 $21[5..4] $28,0 Cartridge IRQ
$15 15 $21[3..2] $29,7 Power Key
$16 16 $21[3..2] $29,6 Right Key
$17 17 $21[3..2] $29,5 Left Key
$18 18 $21[3..2] $29,4 Down Key
$19 19 $21[3..2] $29,3 Up Key
$1A 20 $21[3..2] $29,2 C Key
$1B 21 $21[3..2] $29,1 B Key
$1C 22 $21[3..2] $29,0 A Key
$1D 23 $2A,2
$1E 24 $2A,1
$1F 25 $2A,0
$20
$21
$22
$23
$24
$25
$26
$27
$28
$29
$2A
$2B
$2C
$2D
$2E
$2F
$30
$31
$32
$33
$34
$35
$36
$37
$38
$39
$3A
$3B
$3C
$3D
$3E
$3F
$40
$41
$42
$43
$44
$45
$46
$47
$48
$49
$4A
$4B
$4C
$4D
$4E
$4F
$50
$51
$52
$53
$54
$55
$56
$57
$58
$59
$5A
$5B
$5C
$5D
$5E
$5F
$60
$61
$62
$63
$64
$65
$66
$67
$68
$69
$6A
$6B
$6C
$6D
$6E
$6F
$70
$71
$72
$73
$74
$75
$76
$77
$78
$79
$7A
$7B
$7C
$7D
$7E
$7F