The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
playing sound samples
#8
i found this version from http://www.msx.org/forumtopic5246p16.html, which the only difference would be the i/o port and the used bit flag for 1bit sound - this version seems to be simpler, and playing the sample in a straight direction, instead of that previous YourSinclair reversed example - i only couldn't understand how the 8 bits of each byte are being readed to be performed as 1bit sound (i think some instructions are missing there, and the 7 bits else from each byte are being wasted?)

Code:
DEFB #FE DEFW BEGIN DEFW END DEFW BEGIN ORG #D000 BEGIN: LD HL,PLAY LD (#F39A),HL RET PLAY: DI LD HL,#C000 LD BC,#1000 PLAYLOOP: LD A,(HL) INC HL ADD A,A LD A,0 ADC A,14 OUT (#AB),A EXX LD B,60 WAIT: DJNZ WAIT EXX DEC BC LD A,B OR C JP NZ,PLAYLOOP RET END:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)