Wrathchild Posted September 29, 2021 Share Posted September 29, 2021 Looks like the Basic ROM is enabled and as the stack area is in that zone that's not gonna help So that seems the fault of the aux_setbank function which is OR'ing with $91 when it could be $93, i.e. check the details at https://atariwiki.org/wiki/Wiki.jsp?page=PORTB Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 29, 2021 Author Share Posted September 29, 2021 Thank you. Quote Link to comment Share on other sites More sharing options...
VinsCool Posted September 30, 2021 Share Posted September 30, 2021 This thread reminds me when I was trying to use $C000 as memory location and was legitimately confused it would not work. I'm still new to 6502 ASM programming, but I think about this moment again today and remember I'm dumb lol Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 30, 2021 Author Share Posted September 30, 2021 I fixed the issue. Same problem. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted September 30, 2021 Share Posted September 30, 2021 Just a small point @Harry Potter , I notice in your code there are still things like char string[100]={"ABCDEF"}; then later you pass the string in a function like result = myfunc(&string,a,b); there is no need to use the "&", when you define a variable as char string[100] string is a pointer. In your code although it will probably still work, you may be wasting cycles while the code gets the address of 'string'. I only say this as you said you want optimizations and this is one such way 2 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 30, 2021 Author Share Posted September 30, 2021 Thank you. 1 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 30, 2021 Author Share Posted September 30, 2021 How do I disable the BASIC ROM? I am using the Altirra64 emulator. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 30, 2021 Share Posted September 30, 2021 It wouldn't matter is a basic is attached in the emulator, the PortB register controls it in the XL model. Rtfm Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 30, 2021 Author Share Posted September 30, 2021 I got it to work! It only works in 1200XL mode. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 30, 2021 Author Share Posted September 30, 2021 Now, there is something wrong with the loadauxfile() function: it loads only one byte before exiting. The aux memory contains more than one byte. I attached the file containing the function. Also, the extra Low me mory still crashes the system. I attached the config and crt0.s files. readauxfile.c atarixl_memx.cfg crt0.s Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 30, 2021 Author Share Posted September 30, 2021 I got the low memory to work now. But the aux file is not. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 30, 2021 Share Posted September 30, 2021 You'd be better off maintaining this on github so the changes could be better tracked/understood Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted October 1, 2021 Author Share Posted October 1, 2021 I found out the problem with aux memory: the file that is loaded into aux memory is empty. I attached the file containing the strings. teststrings.c Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted October 1, 2021 Share Posted October 1, 2021 ? 8 minutes ago, Harry Potter said: the file that is loaded into aux memory is empty. No file is loaded into aux memory - by putting strings in that C file the resulting executable simply has a section that loads data there. So its like saying the a file is loaded into MAIN memory. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted October 1, 2021 Author Share Posted October 1, 2021 I got it to work: I used #pragma data-name instead of #pragma rodata-name, and now that works. But now, the XBUF memory area doesn't work. I really want to use this buffer for code and data. Maybe I'm doing it wrong. I pasted the header code here. .segment "XBUFH" .word __XBUF__START__ .word __XBUF__START__+__XBUF__SIZE__ Quote Link to comment Share on other sites More sharing options...
sanny Posted October 1, 2021 Share Posted October 1, 2021 you always with just sending snippets, sigh try .word __XBUF__START__+__XBUF__SIZE__-1 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted October 1, 2021 Author Share Posted October 1, 2021 I tried that. The screen turns black for a second then alternates between garbage and ERROR 138. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.