First Spear Posted May 18, 2019 Share Posted May 18, 2019 Hey all. Is it possible to monitor/log what the AY chip is doing when it is playing audio in jzIntv? Thanks. Quote Link to comment Share on other sites More sharing options...
intvnut Posted May 18, 2019 Share Posted May 18, 2019 What aspect do you wish to monitor? You can put a 'watch' on writes to the PSG registers in the debugger. Quote Link to comment Share on other sites More sharing options...
First Spear Posted May 22, 2019 Author Share Posted May 22, 2019 I think I want to see when a given "note" is being written to the PSG. Here is a song extract from a .asm file, so when a "C3" or "E3" or "S" or "-" is being pushed I want to log that. Thanks for all ideas! DECLE 16128,63 DECLE 0,0 ;[116] Music - , S , S , - , - , C3 , - , - SRCFILE "mymusic.bas",116 DECLE 16128,63 DECLE 36096,0 ;[117] Music - , S , - , - , E3 , S , - , - SRCFILE "mymusic.bas",117 DECLE 16128,0 DECLE 16273,0 ;[118] Music - , S , G3 , - , S , S , - , - SRCFILE "mymusic.bas",118 DECLE 16128,148 DECLE 16191,0 ;[119] Music - , S , S , - , S , S , - , - SRCFILE "mymusic.bas",119 DECLE 16128,63 DECLE 16191,0 ;[120] What aspect do you wish to monitor? You can put a 'watch' on writes to the PSG registers in the debugger. Quote Link to comment Share on other sites More sharing options...
intvnut Posted May 22, 2019 Share Posted May 22, 2019 If you're interested in the actual register writes to the PSG, you can put a "watch" on its registers with the command: . w1F0 1FD . If you need to watch both PSGs, also do: . wF0 FD . Of course, that's very low level, and will show you the raw values programmed into the PSGs. To make sense of them, you'll need to understand the PSG register layout. This ASCII art diagram may be useful. The numbers at the left are offsets relative to the start of the PSG. e.g. R0 is $1F0. . * * 0 Channel A Period (Low 8 bits of 12) * 1 Channel B Period (Low 8 bits of 12) * 2 Channel C Period (Low 8 bits of 12) * 3 Envelope Period (Low 8 bits of 16) * 4 Channel A Period (High 4 bits of 12) * 5 Channel B Period (High 4 bits of 12) * 6 Channel C Period (High 4 bits of 12) * 7 Envelope Period (High 8 bits of 16) * 8 Enable Noise/Tone (bits 3-5 Noise : 0-2 Tone) * 9 Noise Period (5 bits) * 10 Envelope characteristics (4 bits) * 11 Channel A Volume (6 bits) * 12 Channel B Volume (6 bits) * 13 Channel C Volume (6 bits) * 14 Controller input * 15 Controller input * * 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 * +---------------+---------------|-------------------------------+ * R4 | unused | Channel A Period | R0 * +---------------+---------------|-------------------------------+ * R5 | unused | Channel B Period | R1 * +---------------+---------------|-------------------------------+ * R6 | unused | Channel C Period | R2 * +---------------+---------------|-------------------------------+ * R7 | Envelope Period | R3 * +-------------------------------|-------+-----------------------+ * * Single registers: * * 7 6 5 4 3 2 1 0 * +---------------+-----------------------+-----------------------+ * | I/O Port Dir | Noise Enables | Tone Enables | * R8 | 0 | 0 | C | B | A | C | B | A | * +-------+-------+-------+-------+-------+-------+-------+-------+ * R9 | unused | Noise Period | * +-----------------------+-------+-------+-------+-------+-------+ * | | Envelope Characteristics | * R10 | unused | CONT |ATTACK | ALTER | HOLD | * +---------------+---------------+-------+-------+-------+-------+ * R11 | unused | A Envl Select | Channel A Volume Level | * +---------------+---------------+-------------------------------+ * R12 | unused | B Envl Select | Channel B Volume Level | * +---------------+---------------+-------------------------------+ * R13 | unused | C Envl Select | Channel C Volume Level | * +---------------+---------------+-------------------------------+ . I still don't have a sense, however, of the problem you're trying to solve, and whether this low-level detail is useful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.