vgmrips

The forum about vgm files
It is currently 2023-03-27, 10:22:58

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2022-02-16, 4:19:28 
Offline

Joined: 2020-03-05, 9:25:23
Posts: 24
I am not familiar enough with the range of chips supported by VGM to know the answer to this. Is there a use case where creating (PCM or compressed) data blocks are absolutely required? If I understand correctly, ROM/RAM image dumps and RAM writes through the data block command are immediate commands that write their command data to ROM/RAM without having to create a data block. On the other hand, the separate PCM write command requires a pre-existing data block. Is there anything that can be written with the PCM RAM write command that can't be done with the ROM/RAM dump and RAM write data block command without using data blocks?

The DAC stream mechanism also uses a data block, but this mechanism can be baked and converted into writes of the DAC register, so data blocks are not required here.

The reason I ask is that data blocks are not suitable for microcontrollers that control real hardware due to the very limited RAM. So I'm trying to figure out if it's possible to have the host computer pre-process the VGM to convert from data blocks into equivalent commands that don't require creating data blocks before sending it to the microcontroller.


Top
 Profile  
 
 Post subject:
PostPosted: 2022-02-16, 11:28:43 

Staff Staff
Programmers Programmers
Musicians Musicians
Contributors Contributors
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2011-12-01, 20:20:07
Posts: 4429
Location: Germany
PCM data blocks (command 67, IDs 0x00..0x7F) are not required. You can resolve all of them into "usual" commands.
The exact method of resolving those depends on how the data blocks are used:
  • command 68 - resolves into "67 66 ii" commands where "ii" is 0xC0..0xFF
  • commands 80..8F - resolves into "52 2A dd" (dd = data)
  • commands 90..95 - these are the DAC stream commands and they are the most complicated
    command 90 specifies what sound chip + register the data goes to
In general the PCM data blocks are just a way to optimize the VGM file sizes. If you want, you can do everything without them.


Top
 Profile  
 
 Post subject:
PostPosted: 2022-02-16, 11:53:02 
Offline

Joined: 2020-03-05, 9:25:23
Posts: 24
Excellent!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.071s | 15 Queries | GZIP : On ]