Transfer File Example - Nintendo GAME BOY Programming Manual

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

5.2 Transfer File Example

With sampling data consisting of a single sound with a sound number of 002h, the Directory data
would be the 4 bytes beginning at 4B08h, and the sod data would occupy the 6 bytes beginning at
4C3Ch. In this case, ensure that the score data begin at 2B00h. Starting these data at any location
other than 2B00h would cause a loss of program control. The sampling data (audio data) should be
transferred to the area between 2B00h and 3AFFh.
dw
$0004
dw
$4B08
db
$00,$30,$3F,$30
;
dw
$0006
dw
$4C3C
db
$02,$FF,$E0,$B8,$02,$B0
;
dw
$0020
dw
$2B00
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
;
dw
$0040
dw
$3000
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
db
$00,$01,$02,$03,$04,$05,&06,$07
;
dw
$0000
dw
$0400
When using multiple sampling data items, also transfer the Directory and sod data specified for each
item in Step 2.
Note:
Be careful not to rewrite the Directory and sod data used by the system.
Chapter 7: Super Game Boy Sound
; No. of data items to transfer for Directory
; Directory transfer destination address
; Directory data (4 bytes)
; No. of data items to transfer for sod
; Sod transfer destination address
; Sod data (6 bytes)
; No. of score data items to transfer
; Score data transfer destination address
; Score data
; Score data
; Score data
; Score data
; No. of sampling data items to transfer
; Sampling data transfer destination address
; Sampling data
; Sampling data
; Sampling data
; Sampling data
; Sampling data
; Sampling data
; Sampling data
; Sampling data
; Transfer end code
; Program start address
213

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents