VOGONS


Reply 280 of 468, by keropi

Rank
l33t++
LABS wrote:

[...]

Nevertheless, I just disassembled and decoded to a human-readable form the original firmware of Sound Blaster 2.0 (DSP 2.01). Many unknown things revealed and there is a room for perfection for BB's future firmware releases.

this is truly amazing news, kudos! 😲

🎵Link to buy a PCMIDI mpu
🎧Orpheus soundcard project
💻WTB Amstrad PC7486SLC-33 system

Reply 281 of 468, by canthearu

Rank
Oldbie
LABS wrote:

Noisy playback in Windows (I assume you are running W95/98) does not depend on cpu speed. You don't hear a bit-to-bit accurate playback because Windows apply internal mixing and sample conversion in real time and the result sounds like crap. You should try DirectSound games like Diablo, Starcraft, Hexen II and hear how they sound, outputting directly:)
High CPU speed does not degrade the output under DOS, as ISA bus speed remains the same. Some games just may not have sound at all on faster machines, like early SCUMM-based games, which use finite loops when waiting for DSP response and just give up too early. The same is with OPL2 - the sirens you talked about earlier. Anyway, it is a user's responsibility which software to run on which hardware.

I can see what you are getting at, if we are talking about WDM drivers, as they remix sound up, which is not a particularly bright idea on an 8-bit output. However, VXD drivers shouldn't be doing too much to the output signal, and I think the Sound Blaster compatible driver is actually a VXD driver.

I'll definitely fire up Diablo though at some stage, see how that sounds though. Still many tests to do before I can narrow down what is causing playback to be significantly worse than I expected.

Reply 283 of 468, by MrSmiley381

Rank
Newbie
LABS wrote:

Nevertheless, I just disassembled and decoded to a human-readable form the original firmware of Sound Blaster 2.0 (DSP 2.01). Many unknown things revealed and there is a room for perfection for BB's future firmware releases.

That sounds a little intense. How long did that take? Anything immediately fascinating worth mentioning?

I spend my days fighting with clunky software so I can afford to spend my evenings fighting with clunky hardware.

Reply 284 of 468, by Tiido

Rank
Oldbie

Wow, awesome ! Are you planning to document any of the findings somewhere ?
I do have a question, where did you find information about the ADPCM formats ? I haven't actually found any resource that tells how to decode or encode PCM into the Creative's ADPCM flavor.

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 286 of 468, by root42

Rank
Oldbie
Tiido wrote:

Wow, awesome ! Are you planning to document any of the findings somewhere ?
I do have a question, where did you find information about the ADPCM formats ? I haven't actually found any resource that tells how to decode or encode PCM into the Creative's ADPCM flavor.

Is Creative's ADPCM really different? If not, sox has you probably covered:

https://github.com/chirlu/sox/blob/master/src/adpcms.c

YouTube and Bonus
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & BlasterBoard, PC MIDI Card + SC55 + MT32, XT CF Lite, OSSC

Reply 287 of 468, by LABS

Rank
Member
MrSmiley381 wrote:

Anything immediately fascinating worth mentioning?

First noticeable thing was that its command jump table has no dummy code for unimplemented commands. Every function 00-FF has some code to run. However, the jump addresses are repeated. For example Set Time Constant function (0x40) is valid for commands 0x40 - 0x47. I bet some games have their command numbers written incorrectly and still work on the original thing.

A first half of a jump table looks like this (=== are documented command numbers, Lxxxx - labels not yet decoded):

	; 00 - Resets DSP_BUSY flag
AJMP CMD_00_03
AJMP CMD_00_03
AJMP CMD_00_03
AJMP CMD_00_03
; 04 - Outputs byte 0x21 to host and starts Timer 0
AJMP CMD_04_07
AJMP CMD_04_07
AJMP CMD_04_07
AJMP CMD_04_07
; 08 - Halts DSP
AJMP CMD_08_0F
AJMP CMD_08_0F
AJMP CMD_08_0F
AJMP CMD_08_0F
AJMP CMD_08_0F
AJMP CMD_08_0F
AJMP CMD_08_0F
AJMP CMD_08_0F
; === 10
AJMP CMD_10_Direct_PCM_Out
AJMP CMD_10_Direct_PCM_Out
AJMP CMD_10_Direct_PCM_Out
AJMP CMD_10_Direct_PCM_Out
; === 14
AJMP CMD_14_PCM_Single_DMA
AJMP CMD_14_PCM_Single_DMA
; === 16
AJMP CMD_16_ADPCM82_Single_DMA
; === 17
AJMP CMD_17_ADPCM82_Single_DMA_REF
; === 18
AJMP CMD_1C_PCM_Auto_DMA
AJMP CMD_1C_PCM_Auto_DMA
; 1A
AJMP L0152
; 1B
AJMP CMD_1F_ADPCM82_Auto_DMA_REF
; === 1C L0143
AJMP CMD_1C_PCM_Auto_DMA
AJMP CMD_1C_PCM_Auto_DMA
; 1E
AJMP L0152
; === 1F L016D - ADPCM 82 Auto REF
AJMP CMD_1F_ADPCM82_Auto_DMA_REF
; === 20 L018B - PCM Direct Input
AJMP CMD_20_PCM_Direct_Input
AJMP CMD_20_PCM_Direct_Input ; 21
AJMP CMD_20_PCM_Direct_Input ; 22
AJMP CMD_20_PCM_Direct_Input ; 23
; === 24 L0192 - PCM Single DMA Input
AJMP CMD_24_PCM_Single_DMA_Input
AJMP CMD_24_PCM_Single_DMA_Input ; 25
AJMP CMD_24_PCM_Single_DMA_Input ; 26
AJMP CMD_24_PCM_Single_DMA_Input ; 27
; 28
AJMP L01C1
AJMP L01C1 ; 29
AJMP L01C1 ; 2A
AJMP L01C1 ; 2B
	AJMP	L01C1 ; 2C
AJMP L01C1 ; 2D
AJMP L01C1 ; 2E
AJMP L01C1 ; 2F
; === 30 L01E4 - Polling MIDI Input
AJMP CMD_30_Polling_MIDI_Input
; === 31 L023E - Int MIDI Input
AJMP CMD_31_Int_MIDI_Input
AJMP L0286 ; 32
AJMP L030B ; 33
; === 34 L0394 - UART_Poll_MIDI_IO
AJMP CMD_34_UART_Poll_MIDI_IO
; === 35 L03E3
AJMP CMD_35_UART_Int_MIDI_IO
; === 36 L0436
AJMP CMD_36_UART_Poll_MIDI_IO_Time
; === 37 lL04C6
AJMP CMD_37_UART_Int_MIDI_IO_Time
; === 38 L01D2
AJMP CMD_38_MIDI_Output
AJMP CMD_38_MIDI_Output ; 39
AJMP CMD_38_MIDI_Output ; 3A
AJMP CMD_38_MIDI_Output ; 3B
AJMP CMD_38_MIDI_Output ; 3C
AJMP CMD_38_MIDI_Output ; 3D
AJMP CMD_38_MIDI_Output ; 3E
AJMP CMD_38_MIDI_Output ; 3F
; === 40 L055A
AJMP CMD_40_Set_Time_Constant
AJMP CMD_40_Set_Time_Constant ; 41
AJMP CMD_40_Set_Time_Constant ; 42
AJMP CMD_40_Set_Time_Constant ; 43
AJMP CMD_40_Set_Time_Constant ; 44
AJMP CMD_40_Set_Time_Constant ; 45
AJMP CMD_40_Set_Time_Constant ; 46
AJMP CMD_40_Set_Time_Constant ; 47
; === 48 L056B
AJMP CMD_48_Set_DMA_Block_Size
AJMP CMD_48_Set_DMA_Block_Size ; 49
AJMP CMD_48_Set_DMA_Block_Size ; 4A
AJMP CMD_48_Set_DMA_Block_Size ; 4B
AJMP CMD_48_Set_DMA_Block_Size ; 4C
AJMP CMD_48_Set_DMA_Block_Size ; 4D
AJMP CMD_48_Set_DMA_Block_Size ; 4E
AJMP CMD_48_Set_DMA_Block_Size ; 4F
AJMP L0582 ; 50
AJMP L058D ; 51
AJMP L0582 ; 52
AJMP L058D ; 53
AJMP L0582 ; 54
AJMP L058D ; 55
AJMP L0582 ; 56
AJMP L058D ; 57
AJMP L0596 ; 58
AJMP L05BE ; 59
AJMP L0596 ; 5A
AJMP L05BE ; 5B
AJMP L0596 ; 5C
AJMP L05BE ; 5D
AJMP L0596 ; 5E
AJMP L05BE ; 5F
AJMP L05E8 ; 60
AJMP L05E8
AJMP L05E8
AJMP L05E8
AJMP L05EC ; 64
AJMP L05EC
AJMP L05EC
AJMP L05EC
AJMP L05FE ; 68
AJMP L05FE
AJMP L05FE
AJMP L05FE
AJMP L05FE
AJMP L05FE
AJMP L05FE
AJMP L05FE
AJMP L0605 ; 70
AJMP CMD_7D_ADPCM84_Auto_DMA_REF ; 71
AJMP L0668 ; 72
AJMP CMD_7F_ADPCM83_Auto_DMA_REF ; 73
; === 74
AJMP CMD_74_ADPCM84_Single_DMA
; === 75
AJMP CMD_75_ADPCM84_Single_DMA_REF
; === 76
AJMP CMD_76_ADPCM83_Single_DMA
; === 77
AJMP CMD_77_ADPCM83_Single_DMA_REF
AJMP L0605 ; 78
AJMP CMD_7D_ADPCM84_Auto_DMA_REF ; 79
AJMP L0668 ; 7A
AJMP CMD_7F_ADPCM83_Auto_DMA_REF ; 7B
AJMP L0605 ; 7C
; === 7D
AJMP CMD_7D_ADPCM84_Auto_DMA_REF
AJMP L0668 ; 7E
; === 7F
AJMP CMD_7F_ADPCM83_Auto_DMA_REF

BLASTERBOARD: a DIY SB2.0-compatible sound card on ATmega328P microcontroller

Reply 288 of 468, by LABS

Rank
Member
ajacocks wrote:

Unfortunately, I don't have the ability to respond to PMs, as I haven't posted enough. Labs, I'm definitely interested, so please put me on the list for the next batch.

Apologies, all, for the silly post.

- Alex

Added you to the list.

BLASTERBOARD: a DIY SB2.0-compatible sound card on ATmega328P microcontroller

Reply 289 of 468, by LABS

Rank
Member
Tiido wrote:

Wow, awesome ! Are you planning to document any of the findings somewhere ?
I do have a question, where did you find information about the ADPCM formats ? I haven't actually found any resource that tells how to decode or encode PCM into the Creative's ADPCM flavor.

Yes, this type of document will be useful. I would gladly share the source code with anyone who is interested as well and wish to collaborate in translating its darkest corners.
I did not get to the details of ADPCM code yet, so can't say anything about it, root42. BlasterBoard uses this one https://wiki.multimedia.cx/index.php/Creative_8_bits_ADPCM, it works great. DosBox uses tables instead, but I traced both methods with one ADPCM83 source and got to the same waveform at the end.

PS: Did anyone try any ADPCM-enabled games on BB?

BLASTERBOARD: a DIY SB2.0-compatible sound card on ATmega328P microcontroller

Reply 290 of 468, by canthearu

Rank
Oldbie

You might be pleased to know that my blasterboard's DAC actually works perfectly fine on the 486 under windows 95. The level of noise and distortion is largely comparable to the level displayed by my Sound Blaster AE-5 when playing the same 8-bit content.

The AE-5 might still have a little bit of an edge over the blasterboard, but it is pretty close.

Reply 291 of 468, by LABS

Rank
Member
canthearu wrote:

You might be pleased to know that my blasterboard's DAC actually works perfectly fine on the 486 under windows 95. The level of noise and distortion is largely comparable to the level displayed by my Sound Blaster AE-5 when playing the same 8-bit content.

The AE-5 might still have a little bit of an edge over the blasterboard, but it is pretty close.

Oh, that's a bold comparison, thank you.
Is it W98 or W95 on your P3 installed where the sound is poor?

EDIT:
Can you check "Hardware version:" string under "Sound Blaster or compatible" Properties in Device Manager on both 486 and P3?

BLASTERBOARD: a DIY SB2.0-compatible sound card on ATmega328P microcontroller

Reply 293 of 468, by canthearu

Rank
Oldbie
LABS wrote:

Can you check "Hardware version:" string under "Sound Blaster or compatible" Properties in Device Manager on both 486 and P3?

I can't seem to find that particular detail on either computer.

In further testing, the P3 isn't as bad as I thought. If I play the sound clip in media player, it is quite badly distorted, while if I play the same clip in sound recorder, it is mostly OK. So it looks like windows media player, assuming that you would have a 16bit sound card, was munting the sound output, probably due to rounding errors.

I still get a lot of clicking on the P3 when playing though sound recorder though, I wonder if your newer firmware has already fixed that.

Reply 294 of 468, by LABS

Rank
Member
canthearu wrote:
System specs: […]
Show full quote

System specs:

Intel Pentium 3 600mhz Katmai (100fsb) Asus P2B v1.1 512meg RAM Voodoo 3-3000 GPU Intel 100mbit PCI ethernet. NEC USB 2.0 card Windows 98 SE

I have poor performance on W98 too. Sounds like W98 driver is downsampling the stream to like 4 or 8kHz.
Is it "Hardware version: Not available" on both machines?

BLASTERBOARD: a DIY SB2.0-compatible sound card on ATmega328P microcontroller

Reply 295 of 468, by canthearu

Rank
Oldbie
LABS wrote:

I have poor performance on W98 too. Sounds like W98 driver is downsampling the stream to like 4 or 8kHz.
Is it "Hardware version: Not available" on both machines?

I get that hardware version: not avaliable.

However, have you tried playing the wave file through sound recorder rather than media player (the default player)?

Reply 296 of 468, by LABS

Rank
Member
canthearu wrote:

However, have you tried playing the wave file through sound recorder rather than media player (the default player)?

Yes, it is ok. Still need to get deeper into that later anyway. I have a P3-1GHz with ISA as well, but it is not at my place at the moment.

2 days of thorough SB2.0 firmware decoding answered a lot of questions concerning internal processes that affect the behavior of the card in different register programming situations and combinations. But still there is some code (about 5-6%) left with unknown yet functionality. Still needs some work.
I think I should document my findings later somehow - can be useful for emulator developers for example. At least I did not find any doc like that on the net.

Based on the acquired superpowers there will be a hardcore firmware upgrade for BB for sure.

BLASTERBOARD: a DIY SB2.0-compatible sound card on ATmega328P microcontroller

Reply 297 of 468, by Eleanor1967

Rank
Member

I‘ve finally finished my card, too. Took me a while just soldering parts here and there when there was time on hand. It might not be the cleanest looking Blasterboard around, far from it, but it worked first try so thats good with me (well technically second try but I think jumpering it wrong doesn’t count here 😉 ). Soldering the card was pretty smooth sailing, spacing on the resistors was a a bit tight for my clumsy hands but all went well. Overall pretty impressed with the kit and the card, especially the noise level is quite impressive! Thanks again.

Attachments

  • 20190730_114133.jpg
    Filename
    20190730_114133.jpg
    File size
    1.09 MiB
    Views
    360 views
    File license
    Fair use/fair dealing exception
  • 20190730_114121.jpg
    Filename
    20190730_114121.jpg
    File size
    1.27 MiB
    Views
    360 views
    File license
    Fair use/fair dealing exception

Quick Reply


Who’s online?

Users browsing this forum: TheGreatCodeholio and 6 guests