mmitch / gbsplay

gameboy sound player
https://mmitch.github.io/gbsplay/
Other
98 stars 20 forks source link

how to interpret first column of iodumper plugin? #23

Closed cyberic99 closed 5 years ago

cyberic99 commented 5 years ago

Hello

I have a simple .gbs file created with deflemask tracker

It output 3 nites separated by 1 second of silence

When I run the iodumper on it, I obtain:

00000044 ff3f=00
00000044 ff1a=80
00000044 ff1d=00
00000044 ff1a=00
00000044 ff11=3f
00000044 ff12=f3
00000044 ff13=2c
00000044 ff11=3f
00000044 ff14=80
*003ff5ac ff13=16*
00000044 ff11=3f
00000044 ff14=84
*003fff7c ff13=0b*
00000044 ff11=3f
00000044 ff14=86

the lines beginning with a start should be played after a pause of 1 second before them.

I cannot find how to interpret this data in terms of cycles or in terms of time.

Can you help me?

The deflemask song and the gbs export are attached

gb 60bpm.zip

Thanks

Eric

mmitch commented 5 years ago

The first column shows the difference in cycles from the previous IO. It is no absolute value. See the printf() here.

iodumper_io() is called via iocallback using sum_cycles from gbhw.c.

The 00000044 seems to be the minimal cycle step count for doing IO operations, see gbcpu_cycles in gbcpu.c.

cyberic99 commented 5 years ago

You're right, thx

I found it surprising that two sleeps of 1s didn't last exactly the same number of cycles