Jump to content

antrykot

New Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by antrykot

  1. I'd expect that returning from main would transfer control back to DOS or some other control program. Also, it looks like anonymous unions are not supported, I use anonymous unions to access hardware registers, it works as expected in cc65. Maybe it should't, who knows? But it does work and is extremely usefull.
  2. This is great news. Is your compiler available at Compiler Explorer (godbolt.org)? CC65 is there, but I can not find vbcc.
  3. Hi, everyone! A couple of examples demonstrating bugs in Altirra's implementation of pokey's linked timers (they are intended for PAL, but probably work in NTSC as well). bass14.com altirra-bug.obx p3-16.com p3-16-vibrato.com
  4. SID does not use 16-bit frequency dividers, it has 24-bit phase accumulators.
  5. 10 POKE 729,0 20 K=PEEK(764):IF K<>255 THEN POKE 764,255:? K 30 GOTO 20
  6. Yes, this is what your program is really doing. The reason is DMA done by Antic, it slows down the CPU. You can press Shift+F8 in Altirra to see the actual pattern of Antic's memory access.
  7. This is not a standard behavior, according to the ISO C standard the value of '\x0A' should be 10, not 155. Report it to the cc65 developers, because it's a bug in their compiler.
  8. Maybe try this as a workaround #include <stdio.h> int main() { *(char*)756 = 204; printf("Sch%ctzenhausweg 11", 10); }
  9. No, it isn't deprecated, and never was. The 'b' flag is ignored on POSIX systems, but it is essential in other implementations.
  10. Unfortunately your code is not correct. . fopen(argv[1],"r") To read binary files use binary mode. You should use binary mode even if you are on a POSIX compatible system as this cost you nothing and gives you portability. . fgetc(fp) | fgetc(fp)<<8 Evaluation order of subexpressions is unspecified, you don't know which of the two fgetc calls will be executed first. . while (!feof(fp)) { This is not the right way to write a loop that reads the entire file. . fseek(fp, end-start+1, SEEK_CUR); This requires binary mode to work, it has undefined behavior otherwise.
  11. #define RTCLOCK (volatile char*)0x12 void wait_for_vblank(void) { char frame = *(RTCLOCK + 2); while (*(RTCLOCK + 2) == frame); }
  12. OS writes to pokey2 during system initialization.
  13. Read chapter 5 of Altirra Hardware Reference Manual and you will know why. Init mode, two-tone mode, asynchronous receive mode, all of those affect sound generation. But if you don't want to use those advanced features, it should be enough to write 2 into the SKCTL once at the start of your program. Chapter 13 might also be of interest to you.
  14. ba -n w 0 L10000 \".printf \"%04x %04x %02x\" pc address value"
  15. But I wasn't talking about divide by two. The pulse is half a cycle wide, 0.5/7 is 1/14.
  16. Wasn't it experimentally established that 1/14 duty cycle works better than 1/16? To get 1/14 duty cycle timer period has to be 7 cycles. The following should get you what you want: mva #3 skctl mva #$7e audctl ldx #2 lda #0 sta audf2 sta audf4 sta audf1 stx audf3 sta stimer sta audf3
  17. The second write to AUDF3 should happen at least 4 cycles later than writing STIMER so you need to add an appropriate number of NOPs (or a delay loop) between sta STIMER and sta AUDF3. I'm not sure what the number of NOPs should be, maybe 21 / 1.79 * 4 / 2 = 23 NOPs, I'm guessing.
  18. I've got four different color arrangements from the same computer and the same tv set. Just different runs of Artifact.xex.
  19. So it looks like on a real hardware to get 1/16 duty cycle we need to do this mvx #12 AUDF1 mva #14 AUDF3 sta STIMER stx AUDF3 In other words, in calibrate.xex program set Pulse Y parameter to 14 and Pulse X to 12
  20. Because it works by multiplying 4-bit PCM by 1/16 PWM, it could be called PCM × PWM 1/16 or PCM × 1/16 or PCM * 1/16.
  21. Its frequency really is 110840 Hz (PAL), there is no divide by two when hi-pass filter is enabled.
  22. Quad Pokey is not pin compatible with ordinary Pokey. It has four separate audio outputs, additional chip select inputs and relies on external logic to generate chip select signals.
  23. Newer versions of RMT support alternative interface for Pokey DLL. If a file named apokeysnd.dll is present it will be loaded and take precedence over sa_pokey.dll.
  24. My apokeysnd.dll with stereo support is now available. apokeysnd-stereo.zip
  25. Hi emkay, Did you get any error message? Could you try this version? apokeysnd2.zip
×
×
  • Create New...