Beginners cc65
Re: Beginners cc65
It looks as if the path's are not being stored in the environment. When you installed cc65, did you uncheck the two recommended options for saving the path and environment variables? They should remain checked. I have run this on two xp boxes and one Win7 box and it works. I may need to give more details on the installation and compiling processes, however.
Daryl
Daryl
Re: Beginners cc65
I didn't uncheck them. If you wish i can let you in my pc via teamviewer.
Edit: I mean if you wish to see the problem yourself...
Edit: I mean if you wish to see the problem yourself...
Re: Beginners cc65
I think I see the problem, and like I thought, my documentation was not very clear.
I see this from your post:
C:\cc65\CC65\SIM Demos\hello1
There should not be a CC65 subdirectory inside the cc65 folder. If you drag the CC65 folder to c:\, it will drop it's contents into the cc65 folder and then all should be good. You may need to run the copysim.bat file that is now in the c:\cc65\sim folder, as opposed to the c:\cc65\CC65\sim folder. I hope that makes sense.
Give it a try and I think all will work.
Daryl
I see this from your post:
C:\cc65\CC65\SIM Demos\hello1
There should not be a CC65 subdirectory inside the cc65 folder. If you drag the CC65 folder to c:\, it will drop it's contents into the cc65 folder and then all should be good. You may need to run the copysim.bat file that is now in the c:\cc65\sim folder, as opposed to the c:\cc65\CC65\sim folder. I hope that makes sense.
Give it a try and I think all will work.
Daryl
Re: Beginners cc65
I tried that, but there are some folders in both C:\cc65 and C:\cc65\CC65 that would get overwritten when i would try to copy its content to C:\cc65. When i tried that, i said to skip instead of overwriting the files, and then i tried to run copysim.bat again, but i still wouldn't work.
Edit: I got it working, i had to overwrite the files...
Edit: I got it working, i had to overwrite the files...
Re: Beginners cc65
Yes, some files will get overwritten but they should be the same versions. Glad hear its working now.
Daryl
Daryl
Re: Beginners cc65
Ok now when i got it working, i loaded the 65.b file in disassembly and it starts from address 0, that is page zero, and the reset vector also points to address 0. When i run it nothing happens. To which address printf writes characters?
Re: Beginners cc65
The load and start address should be $0200. When loading a *.65b file, it should prompt you for a load address. Enter $0200. You can choose the 'Erase all memory" option or not, it does not matter.
Clicking the Run Icon should start up and run the program.
Daryl
Clicking the Run Icon should start up and run the program.
Daryl
Re: Beginners cc65
Another Oops.
First time running the Simulator, you need to set the IO address to $F000. The default is $E000. Also, set the IO window resolution to 80x25.
Set those and try again - it will work!
Sorry to all - I have been trying to get this done quickly but have had 100+ interruptions at home and my documentation made way too many assumptions.
I'll try to get the docs updated to include more details and all of the steps.
Daryl
First time running the Simulator, you need to set the IO address to $F000. The default is $E000. Also, set the IO window resolution to 80x25.
Set those and try again - it will work!
Sorry to all - I have been trying to get this done quickly but have had 100+ interruptions at home and my documentation made way too many assumptions.
I'll try to get the docs updated to include more details and all of the steps.
Daryl
Re: Beginners cc65
Wee, it works!
Now i need to figure out how to change the programs star location to C000, ram top to 8000, and I/O to 8200 with a read/write delay, because every read/write causes an interrupt to the pic mcu to clear the output register or to accept input data. And some way in which i can set for writing characters my crtc routine.
Now i need to figure out how to change the programs star location to C000, ram top to 8000, and I/O to 8200 with a read/write delay, because every read/write causes an interrupt to the pic mcu to clear the output register or to accept input data. And some way in which i can set for writing characters my crtc routine.
Re: Beginners cc65
I see the putc.s and getc.s filse. can i modify them to suit my sbc?
And also if you could comment the sim.cfg file, why does it have a 2k stack and zero page to D0, ect.
And where do i specify the rom?
And also if you could comment the sim.cfg file, why does it have a 2k stack and zero page to D0, ect.
And where do i specify the rom?
Re: Beginners cc65
Dajgoro wrote:
I see the putc.s and getc.s filse. can i modify them to suit my sbc?
And also if you could comment the sim.cfg file, why does it have a 2k stack and zero page to D0, ect.
And where do i specify the rom?
And also if you could comment the sim.cfg file, why does it have a 2k stack and zero page to D0, ect.
And where do i specify the rom?
The best I can suggest is to download all of the cc65 source files. Read them all. Look at the Atari, C-64, Apple2, and other sources, and their cfg files and see how they work. Don't forget my cc65 files for my SBC-3. The sim.inc (or sbc3.inc) contains pointers to all of the built-in ROM routines supported by the Host platforms OS.
I spent months trying to figure out how it all works and only just understand enough to make it work. I'm afraid I wouldn't know how to explain anything clearly and I just don't have the free time to devote to it.
Using the setup I provided will be a great starting point to learn from.
Also, you can try to contact the cc65 author for help. (webmaster at cc65 dot org)
Daryl
Re: Beginners cc65
I changed the .PC02 to .P02 since i have a nmos cpu. Now i get errors in read.s and write.s.
Where can i find the files for the nmos C64 or Apple II?
Where can i find the files for the nmos C64 or Apple II?
Re: Beginners cc65
When i run makesim i get this errors:
But it kinda still works...
I also modified my sim.cfg and now some routines are missing, and jmp in hello1(the first instruction) points to address 0000.
sim.cfg
SBC map:
0-32k ram
32k- 48k i/o stuff
48k-64k ram
Code: Select all
C:\cc65\sim>echo off
SIM
The system cannot find the path specified.
read.s(58): Error: Illegal addressing mode
write.s(64): Error: Illegal addressing mode
common
The system cannot find the path specified.
read.s(58): Error: Illegal addressing mode
write.s(64): Error: Illegal addressing mode
conio
The system cannot find the path specified.
read.s(58): Error: Illegal addressing mode
write.s(64): Error: Illegal addressing mode
dbg
The system cannot find the path specified.
read.s(58): Error: Illegal addressing mode
write.s(64): Error: Illegal addressing mode
runtime
The system cannot find the path specified.
read.s(58): Error: Illegal addressing mode
write.s(64): Error: Illegal addressing mode
Build library
ar65.exe: Warning: Library `sim.lib' not found - will be created
ar65.exe: Error: Could not open `common\*.o': No such file or directory
ar65.exe: Warning: Library `sim.lib' not found - will be created
ar65.exe: Error: Could not open `runtime\*.o': No such file or directory
ar65.exe: Warning: Library `sim.lib' not found - will be created
ar65.exe: Error: Could not open `conio\*.o': No such file or directory
ar65.exe: Warning: Library `sim.lib' not found - will be created
ar65.exe: Error: Could not open `dbg\*.o': No such file or directory
ar65.exe: Warning: Library `sim.lib' not found - will be created
Move library files
Cleanup
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
Press any key to continue . . .
I also modified my sim.cfg and now some routines are missing, and jmp in hello1(the first instruction) points to address 0000.
sim.cfg
Code: Select all
#
# kawalski Simulator
#
MEMORY {
HEADER: start = $C000, size = $0004, file = %O;
ZP: start = $0000, size = $00D0, type = rw, define = yes;
RAM: start = $0200, size = $7E00, file = %O, define = yes;
ROM: start = $C010, size = $3FE0, type = ro, define = yes;
}
SEGMENTS {
EXEHDR: load = HEADER, type = ro;
STARTUP: load = ROM, type = ro;
LOWCODE: load = ROM, type = ro, optional = yes;
INIT: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro;
RODATA: load = ROM, type = ro;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
ZEROPAGE: load = ZP, type = zp;
}
FEATURES {
CONDES: segment = INIT,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
CONDES: type = interruptor,
segment = RODATA,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__ = $800; # 2K stack
}
0-32k ram
32k- 48k i/o stuff
48k-64k ram
Re: Beginners cc65
You need to take some time and read the http://www.cc65.org pages. Everything I learned was from there, except the files I got from Chris Ward ( http://www.chrisward.org.uk/6502/downloads.shtml be sure to read his system description to see how his library works).
cc65:
http://www.cc65.org/index.php
The download link takes you here:
ftp://ftp.musoftware.de/pub/uz/cc65/
You have the cc65-2.13.3-1.exe file from my zip.
If you download the cc65-sources-2.13.3.tar.bz2 file and get it decompressed (I use jzip), you will have ALL of the source files for not only the compiler programs, but the target platforms as well. Those get installed over the existing folders, just like my sim files did. (I used this exact file, but deleted out all the unneccessary stuff that was not needed for the Kawalski Simulator). You will now have all of the files for all of the targets. You can look at the older targets for NMOS compatible code.
Read...read...read
Daryl
cc65:
http://www.cc65.org/index.php
The download link takes you here:
ftp://ftp.musoftware.de/pub/uz/cc65/
You have the cc65-2.13.3-1.exe file from my zip.
If you download the cc65-sources-2.13.3.tar.bz2 file and get it decompressed (I use jzip), you will have ALL of the source files for not only the compiler programs, but the target platforms as well. Those get installed over the existing folders, just like my sim files did. (I used this exact file, but deleted out all the unneccessary stuff that was not needed for the Kawalski Simulator). You will now have all of the files for all of the targets. You can look at the older targets for NMOS compatible code.
Read...read...read
Daryl
Re: Beginners cc65
I modified an existing editor to compile with the cc65 compiler.
I used Pawno, usually it is used to compile gamemodes for sa-mp, a gta San Andreas mod for multiplayer, for which i had a server. Anyway i modified it so that when you open a c file, you can edit it, and when you hit compile it will look for make.bat in the same directory as the c file, and it will run it, and display the result in a separate window(intended for the pawn compiler). The c file must not be located in a directory that contains spaces , ie "SIM Demos" needs to be renamed to "SIM_Demos".
I left the pawncc.c file that imitates the original compiler, so you can modify it...
I used Pawno, usually it is used to compile gamemodes for sa-mp, a gta San Andreas mod for multiplayer, for which i had a server. Anyway i modified it so that when you open a c file, you can edit it, and when you hit compile it will look for make.bat in the same directory as the c file, and it will run it, and display the result in a separate window(intended for the pawn compiler). The c file must not be located in a directory that contains spaces , ie "SIM Demos" needs to be renamed to "SIM_Demos".
I left the pawncc.c file that imitates the original compiler, so you can modify it...
- Attachments
-
- cc65 pawno.rar
- (297.69 KiB) Downloaded 81 times