
antrykot
New Members-
Content Count
39 -
Joined
-
Last visited
Community Reputation
30 ExcellentAbout antrykot
-
Rank
Space Invader
Recent Profile Visitors
1,588 profile views
-
vbcc optimizing C compiler for 6502 now supports Atari
antrykot replied to vbc's topic in Atari 5200 / 8-bit Programming
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. -
vbcc optimizing C compiler for 6502 now supports Atari
antrykot replied to vbc's topic in Atari 5200 / 8-bit Programming
This is great news. Is your compiler available at Compiler Explorer (godbolt.org)? CC65 is there, but I can not find vbcc. -
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
-
SID does not use 16-bit frequency dividers, it has 24-bit phase accumulators.
-
Altirra Audio Monitor - question on volume-only presentation
antrykot replied to tomaswoj's topic in Atari 8-Bit Computers
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. -
cc65 Atari international characters
antrykot replied to atarixle's topic in Atari 5200 / 8-bit Programming
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. -
cc65 Atari international characters
antrykot replied to atarixle's topic in Atari 5200 / 8-bit Programming
Maybe try this as a workaround #include <stdio.h> int main() { *(char*)756 = 204; printf("Sch%ctzenhausweg 11", 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.
-
#define RTCLOCK (volatile char*)0x12 void wait_for_vblank(void) { char frame = *(RTCLOCK + 2); while (*(RTCLOCK + 2) == frame); }
-
OS writes to pokey2 during system initialization.
-
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.
-
ba -n w 0 L10000 \".printf \"%04x %04x %02x\" pc address value"
-
Using Pulse Density Modulation for 8-bit PCM
antrykot replied to kool kitty89's topic in Atari 8-Bit Computers
But I wasn't talking about divide by two. The pulse is half a cycle wide, 0.5/7 is 1/14.