You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
else:
if verbose:
print(" tone data on latched channel " + str(latched_channel))
registers[latched_channel*2+1] = d # we no longer do any masking here # d & 63 # tone data only contains 6 bits of info anyway, so no need for mask
if latched_channel == 3:
print("ERROR CHANNEL")
This code does not handle when :
data byte is written after a latch volume (all channels)
data byte is written after a latch noise on channel 3
Volume registers
(DDDDDD)dddd = (--vvvv)vvvv
dddd gives the 4-bit volume value. If a data byte is written, the low 4 bits of DDDDDD update the 4-bit volume value. However, this is unnecessary.
Noise register
(DDDDDD)dddd = (---trr)-trr
The low 2 bits of dddd select the shift rate and the next highest bit (bit 2) selects the mode (white (1) or "periodic" (0)). If a data byte is written, its low 3 bits update the shift rate and mode in the same way.
The data byte is NOT ignored. If it is, some games (e.g. Micro Machines) produce the wrong sound on their noise channel.
I suggest to use this code instead (verbose should be updated) :
latched_type = 0
...
if packet_size == 255:
Packet = False
else:
for x in range(packet_size):
d = rawData[n+x]
if verbose:
print " frame byte number=" +str(x)
print " frame byte=" +str(d)
if d & 128:
# latch
c = (d>>5)&3
latched_channel = c
if d & 16:
# volume
if verbose:
print(" volume on channel " + str(c))
registers[c+7] = d & register_mask
latched_type = 1
else:
# tone
if verbose:
print(" tone on channel " + str(c))
registers[c*2+0] = d & register_mask
latched_type = 0
else:
if verbose:
print(" tone data on latched channel " + str(latched_channel))
if latched_type == 0:
if latched_channel < 3:
# tone upper bits
registers[latched_channel*2+1] = d
else:
# update noise
registers[latched_channel*2] = d & 7
else:
# update volume
registers[latched_channel+7] = d & 15
The text was updated successfully, but these errors were encountered:
in vgmpacker.py (def split_raw) :
This code does not handle when :
When reading this :
https://www.smspower.org/Development/SN76489
It appears that data byte should not be ignored.
Volume registers
(DDDDDD)dddd = (--vvvv)vvvv
dddd gives the 4-bit volume value.
If a data byte is written, the low 4 bits of DDDDDD update the 4-bit volume value. However, this is unnecessary.
Noise register
(DDDDDD)dddd = (---trr)-trr
The low 2 bits of dddd select the shift rate and the next highest bit (bit 2) selects the mode (white (1) or "periodic" (0)).
If a data byte is written, its low 3 bits update the shift rate and mode in the same way.
The data byte is NOT ignored. If it is, some games (e.g. Micro Machines) produce the wrong sound on their noise channel.
I suggest to use this code instead (verbose should be updated) :
The text was updated successfully, but these errors were encountered: