Jump to content

antrykot

New Members
  • Content Count

    39
  • Joined

  • Last visited

Community Reputation

30 Excellent

1 Follower

About antrykot

  • Rank
    Space Invader

Recent Profile Visitors

1,588 profile views
  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.
×
×
  • Create New...