Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. void YM2612_write(const u16 port, const u8 data)
  2. {
  3. vs8 *pb;
  4.  
  5. pb = (u8*) 0xA04000;
  6.  
  7. // wait while YM2612 busy
  8. while (*pb < 0);
  9. // write data
  10. pb[port & 3] = data;
  11. }
  12.  
  13. void YM2612_reset()
  14. {
  15.  
  16. // code removed for brevity //
  17.  
  18. // enable left and right output for all channel
  19. for(i = 0; i < 3; i++)
  20. {
  21. YM2612_write(0, 0xB4 | i);
  22. YM2612_write(1, 0xC0);
  23. YM2612_write(2, 0xB4 | i);
  24. YM2612_write(3, 0xC0);
  25. }
  26.  
  27. // code removed for brevity //
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement