Jump to content

SteveC1331

New Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SteveC1331

  • Rank
    Space Invader

Contact / Social Media

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. No problem - thanks for trying them! I thought I was doing something wrong.
  2. I am making .mic or .gr7 files in Atari Graphics Studio and trying to open them in .gr7 mode in Mad Studio Graphics editor. (So I can export code for them) However most of them just don't load properly - nothing is on the canvas. Only one seems to load OK, but that .mic has the wrong dimentions for gr7. splash.mic works ok - unexpectedly both splash6.mic and splash6.gr7 seem to not load - nothing changes on the canvas when these files are opened. Any ideas? splash.mic splash6.mic splash6.gr7
  3. thanks much! I found some things strange in how to get characters to show up in the footer 4 lines vs. how much memory should have been used for graphics mode 12. calling _graphics(12) implemented by the CC65 atari lib. e.g. if I offset characters by only 20 lines, they do not draw in the footer area as I would have expected, if offset by 24 lines the characters show up in the footer graphics area. There should only be 24 rows of characters total memory in graphics mode 12 I thought. I know some will probably point towards making a custom display list, which maybe I'll resort to, but I think I should be able to get things to work using _graphics(12) I can write a test app to verify some of this behavior to try to figure out what is going on. ------- Update: Even more simple - I'm making the call to that function putString(), that is supposed to work only in _graphics(12), before initing to _graphics(12). thanks much again!
  4. cc65 --version V2.18 - Git cab4910 I've attached the cfgame.xex and .lbl and .dbg files. With an H device mounted in Altirra, To repro, select 1. Map Editor, then X for save, H for drive, a number, then type a short file name like t.map I'm a little concerned its a stack overflow problem, but I'm not sure. cfgame.zip
  5. I made a test app to verify behavior using opendir(), fopen(), fwrite(), fputs() etc. which seems to work fine. When I use the same concepts in my game xex, I get a crash after fopen() of the file I am going to write. I'm not sure how to proceed to debug/fix my problem. I turned on tracecio and this is the output for the game.xex CIO: IOCB=1, CMD=$03 (open), AUX1=$04, filename="H2:CFGAME.XEX" CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$1df4, length=$0002 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$15a0, length=$0004 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$2e00, length=$0213 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$15a0, length=$0004 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$02e2, length=$0002 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$15a0, length=$0004 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$4108, length=$025b CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$15a0, length=$0004 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$02e2, length=$0002 CIO: IOCB=2, CMD=$03 (open), AUX1=$0c, filename="S:" CIO: IOCB=2 (S:), CMD=$0C (close) CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$15a0, length=$0004 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$4108, length=$72e6 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$15a0, length=$0004 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$02e0, length=$0002 CIO: IOCB=1 (H:), CMD=$07 (get characters), buffer=$15a0, length=$0004 CIO: IOCB=1 (H:), CMD=$0C (close) CIO: IOCB=2 (-), CMD=$0C (close) CIO: IOCB=0 (E:), CMD=$07 (put characters): buf=$9177, len=$000A CIO: IOCB=1, CMD=$03 (open), AUX1=$0c, filename="S:" CIO: IOCB=2, CMD=$03 (open), AUX1=$1c, filename="S:" CIO: IOCB=0 (E:), CMD=$07 (put characters): buf=$9141, len=$0016 CIO: IOCB=3, CMD=$03 (open), AUX1=$1c, filename="S:" CIO: IOCB=4, CMD=$03 (open), AUX1=$08, filename="H4:T.CFM" CPU: Illegal instruction hit: 423A (245415: 15, 23) A=08 X=40 Y=00 S=ED P=33 ( ZC) 4239: 32 KIL I load the xex from the H: device and it successfully loads and runs. I am not explicitly interacting with any device S: My test xex, which is just text mode, does not cause any actions on an S: device. I thought maybe I hit a problem with the interaction between opendir() and opening files, but I commented that part out. Any ideas would be appreciated. thanks!
  6. Ok, I re-downloaded the Altirra software and tried again. Same result. I started to think maybe I was on to something because I had 'stop on BRK' set on in the Altirra options, I turned that off but then I remembered that it is crashing on illegal instruction, so I tried flipping that setting, to no avail. I tried disabling BASIC at launch, same result. I finally figured out my essential problem - I have been using the default AltirraOS 3.17 for XL/XE/XEGS internal ROM and associated BASIC. I switched to the Atari XL/XE OS Ver.2 (and it's BASIC) and now the attached prog.xex runs without crashing and so do my test apps I am creating. I know I don't need the BASIC enabled, but I was just trying to be consistent initially. So it did turn out to be my emulator config, I guess I should be more skeptical of using emulator ROMs. Thanks much @dmsc and everyone else - much appreciated!
  7. No worries - thanks for the help! I just tried the prog.xex and I crash in the same way, so most likely Altirra is misconfigured somehow? I'm going to re-download Altirra and try to reset it...
  8. Thanks for the hints, but I've already read over that stuff. And as my previous post states, I changed the start address with the linker flag and can see it change the start address of the program. I just took your sources and tried building and running them in my setup and I get the same crash. here is the build command line stuff: C:\cc65\bin\cc65.exe --verbose --debug-info --target atarixl src\main.c -o build\main.s C:\cc65\bin\ca65.exe --verbose --debug-info --target atarixl build\main.s -o build\main.o C:\cc65\bin\ld65.exe -C C:\cc65\cfg\atarixl-xex.cfg -Ln build\cc65TextExperiments.lbl --dbgfile build\cc65TextExperiments.dbg --start-addr 0x4000 -o build\cc65TextExperiments.xex build\main.o C:\cc65\lib\atarixl.lib I picked the --start-addr from another post I read, hoping that would be a good example value as it was suggested in relation to the atarixl-xex.cfg The thing is, it crashes even with _graphics(1) - anything other than zero. That was true even before I changed the start address. I just noticed the linker is giving me this warning: ld65.exe: Warning: atari/crt0.s(207): 'lowcode area' reaches into $4000..$7FFF bank memory window Maybe I'm setting the start address too high? Maybe that is just my problem... I just building/running the example code you posted without the --start-address being set and I still crash, but I don't get that warning from the linker. I also tried using the atarixl.cfg, instead of atarixl-xex.cfg, and crashed in the same way. Maybe I have something misconfigured in the Altirra emulator? I think I have something more fundamental messed up...
  9. I'm using the atarixl-xex.cfg that comes with CC65. The address that is crashing is referenced in the .cfg in the HIDDEN_RAM section. I guess I am surprised as to why it would be trying to reopen the E device. I'm guessing E device is an emulated drive? As for what the code is doing, its all from the CC65 library. I did think it was strange it was writing zeros to a bunch of stuff. So this probably has nothing to do with the start address? At least not directly? I would have expected that if there were problems with that either the screen memory would become corrupt or the program would crash before exiting. My code is little more than this: void main(void) { _graphics(1); } With needed headers and config'd for the atarixl target and the start address value to the linker. Not sure if that helps...
  10. I've hit what I think might be a related problem with using the atarixl config If I try using a call to _graphics() with a non-zero value, the program crashes on exit of main(). My test program only just calls graphics modes and does a printf. I have other test code that puts stuff on the screen. So I can enter the graphics mode safely, but then the app crashes when it exits main. I set the --start-addr 0x4000 in the linker options and I can see that the start address of the program has changed. But I still crash when the program is exiting. It seems to be crashing in relation to code to cleanup during program termination. It looks to be initiating some call dispatching into memory that according to the atarixl-xex.cfg file is labeled as HIDDEN_RAM. Not really sure how it got there. I started to think maybe it was related to some hints of the documentation about needing to recompile the C standard libs, but that seems to be with the himem.cfg files and not these. Here's the console out of Altirra when it traps me at the illegal instruction. (Which I am guessing the linker is using as a poison pill? Or maybe the OS is doing that, not sure.) Looks like this is trying to do some serial IO after central IO? Not sure why it would be triggering these actions on exit of main and/or cleanup code. Additionally, my motivation for using the atarixl config is because I want to use graphics mode 12. If I run the atari-xex.cfg the program does not crash on exist, but I cannot enter graphics mode 12. Any insights, ideas, or help would be much appreciated. (45358: 1, 18) A=00 X=00 Y=00 S=F9 P=B0 (N ) 4137: AE D8 55 _exit LDX SP_save [$55D8] = $F9 (45358: 1, 22) A=00 X=F9 Y=00 S=F9 P=B0 (N ) 413A: 9A TXS (45358: 1, 24) A=00 X=F9 Y=00 S=F9 P=B0 (N ) 413B: 20 AD 4B excexit JSR donelib [$4BAD] = $A0 (45358: 1, 47) A=00 X=F9 Y=00 S=F9 P=32 ( Z ) 413E: AD DA 55 LDA $55DA [$55DA] = $02 (45358: 1, 52) A=02 X=F9 Y=00 S=F9 P=30 ( ) 4141: 85 52 STA LMARGN [$52] (45358: 1, 56) A=02 X=F9 Y=00 S=F9 P=30 ( ) 4143: AD D9 55 LDA $55D9 [$55D9] = $40 (45358: 1, 61) A=40 X=F9 Y=00 S=F9 P=30 ( ) 4146: 8D BE 02 STA SHFLOK [$02BE] (45358: 1, 65) A=40 X=F9 Y=00 S=F9 P=30 ( ) 4149: AD 04 40 LDA APPMHI_save [$4004] = $00 (45358: 1, 69) A=00 X=F9 Y=00 S=F9 P=32 ( Z ) 414C: AE 05 40 LDX $4005 [$4005] = $00 (45358: 1, 73) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 414F: 85 0E STA APPMHI [$0E] (45358: 1, 76) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 4151: 86 0F STX APPMHI+1 [$0F] (45358: 1, 79) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 4153: AD 07 40 LDA PORTB_save [$4007] = $00 (45358: 1, 83) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 4156: 8D 01 D3 STA PORTB [$D301] (45358: 1, 87) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 4159: AD 06 40 LDA RAMTOP_save [$4006] = $00 (45358: 1, 91) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 415C: 85 6A STA RAMTOP [$6A] (45358: 1, 94) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 415E: AD 02 40 LDA MEMTOP_save [$4002] = $00 (45358: 1, 98) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 4161: AE 03 40 LDX $4003 [$4003] = $00 (45358: 1,102) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 4164: 8D E5 02 STA MEMTOP [$02E5] (45358: 1,106) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 4167: 8E E6 02 STX MEMTOP+1 [$02E6] (45358: 1,110) A=00 X=00 Y=00 S=F9 P=32 ( Z ) 416A: 20 89 4D JSR findfreeiocb [$4D89] = $A2 (45358: 2, 93) A=FF X=30 Y=FF S=F9 P=33 ( ZC) 416D: A9 03 LDA #$03 (45358: 2, 95) A=03 X=30 Y=FF S=F9 P=31 ( C) 416F: 9D 42 03 STA ICCMD,X [$0372] (45358: 2,100) A=03 X=30 Y=FF S=F9 P=31 ( C) 4172: A9 0C LDA #$0C (45358: 2,102) A=0C X=30 Y=FF S=F9 P=31 ( C) 4174: 9D 4A 03 STA ICAX1,X [$037A] (45358: 2,107) A=0C X=30 Y=FF S=F9 P=31 ( C) 4177: A9 00 LDA #$00 (45358: 2,109) A=00 X=30 Y=FF S=F9 P=33 ( ZC) 4179: 9D 4B 03 STA ICAX2,X [$037B] (45358: 3, 0) A=00 X=30 Y=FF S=F9 P=33 ( ZC) 417C: A9 0B LDA #$0B (45358: 3, 2) A=0B X=30 Y=FF S=F9 P=31 ( C) 417E: 9D 44 03 STA ICBAL,X [$0374] (45358: 3, 7) A=0B X=30 Y=FF S=F9 P=31 ( C) 4181: A9 55 LDA #$55 (45358: 3, 9) A=55 X=30 Y=FF S=F9 P=31 ( C) 4183: 9D 45 03 STA ICBAH,X [$0375] (45358: 3, 14) A=55 X=30 Y=FF S=F9 P=31 ( C) 4186: A9 03 LDA #$03 (45358: 3, 16) A=03 X=30 Y=FF S=F9 P=31 ( C) 4188: 9D 48 03 STA ICBLL,X [$0378] (45358: 3, 21) A=03 X=30 Y=FF S=F9 P=31 ( C) 418B: A9 00 L418B LDA #$00 (45358: 3, 23) A=00 X=30 Y=FF S=F9 P=33 ( ZC) 418D: 9D 49 03 STA ICBLH,X [$0379] (45358: 3, 30) A=00 X=30 Y=FF S=F9 P=33 ( ZC) 4190: 20 56 E4 JSR CIOV [$E456] = $FF CPU: Illegal instruction hit: E45A (45358: 3, 48) A=00 X=30 Y=FF S=F7 P=33 ( ZC) E459: 00 SIOV BRK
×
×
  • Create New...