| |
null Account closed
Registered: Jun 2006 Posts: 645 |
crossassembling
Since I have a laptop running Win2k now, I was looking for a crossassembler... but all I can find are tools to convert a .txt file to a c64 understandable format...(atleast, that's what I think they do...o.O)
Isn't there some kind of complete package running under Win2k, like you have Turbo Assambler on the c64?
and if there isn't... START CODING!!! =P
...nah, just kidding... in that case, I'd like to hear an easy solution for coding on a PC.
Cheers,
Knoeki. |
|
| |
Style
Registered: Jun 2004 Posts: 498 |
Kick Assembler 2.12 |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Yeah, I have that one... but I can't figure out how it works...o.o |
| |
QuasaR
Registered: Dec 2001 Posts: 145 |
or this one...
Relaunch64 V2.0 |
| |
Mace
Registered: May 2002 Posts: 1799 |
step 1)
Download and install EditPlus.
step 2)
Download 64TASS. Put the files in a subfolder of the EditPlus directory.
step 3)
Configure EditPlus so that CTRL+1 compiles your code using 64TASS.
step 4)
Code 'macro assembly' in EditPlus and compile with 64TASS. |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: or this one...
Relaunch64 V2.0
ok, that one is understandable... but everytime I assamble & run, I get a VICE error, saying something about a commandline option... I can't read the whole error, as there is too much text in the window >_<;
/knoeki |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Quote: ok, that one is understandable... but everytime I assamble & run, I get a VICE error, saying something about a commandline option... I can't read the whole error, as there is too much text in the window >_<;
/knoeki
Relaunch is an editor and not a cross-compiler.
I guess that explains it.
For starters, look at Mace's reply and leave that Kick Assembler alone for a year or so (ie. it is not recommended for n00bs). |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
I know it's not a cross compiler, that's why I have DASM hooked up to it, so I can compile it... the problem is that VICE gives me this damned error...o.O;
something like this:
"Extra arguments on command-line" followed by the dir where I compile to... |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
rtfm? |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
yeah, I got it to work, thanks to scout pointing out that I should "Read The Fine/Fucking/Fantastic/Fabulous Manual" ^_^
/knoeki |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
\:D/ |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Just one more small question:
what should the start adress of my code be? f.ex:
*=$1000
or something like that...
and which SYS code do I use in VICE to run the actual code?
/knoeki |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
*=$1000 is good for a start
sys4096 is teh secret start line :) |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: *=$1000 is good for a start
sys4096 is teh secret start line :)
Might be me, but it doesn't work...o.O this is what I do:
step 1 (Code):
*=$1000
inc $d020
jmp $1000
step 2:
Press the Assamble and start source button... this opens Vice.
step 3:
SYS4096
when I do that, the screen is just cleared, and I get the well known READY. message...o.o
Am I overlooking something? |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
step 2.5 : does it load your program? |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
good point... doesn't quite look like it...o.O;
/knoeki |
| |
algorithm
Registered: May 2002 Posts: 705 |
or place something such as
*=$0800
!byte $xx,$xx,$xx,$xx,$xx,... etc
where xx is a combination of bytes which create an sys call in basic |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Like algorithm said.. Something like:
* = $0801
basic: ;"SYS2061"
.byte $0c,$08,$64,$0c,$9e,$32,$30
.byte $36,$31,$00,$00,$00
your_code_starts_here:
...OR use pucrunch or something like that to make it an executable (which includes such a SYS-instruction in its output). |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Guys (algorithm+frantic).. his program has to load first.
Besides that, Knoeki is an absolute n00b regarding assembler so leave the pucrunch/exomizer bells 'n' whistles to rest for a while.
|
| |
Devia
Registered: Oct 2004 Posts: 401 |
inc $d020 is n00b'ish? |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: inc $d020 is n00b'ish?
I just used that as an example to test Relaunch + DASM + VICE... but VICE doesn't load my code, and there's the problem... as soon as I have this fixed, I'm gonna check out the Hex files again...=) |
| |
Devia
Registered: Oct 2004 Posts: 401 |
x64.exe -autostart kickassdemo.prg
that will load the kickassdemo.prg and do a RUN, so you'd need that basic header or just ALT+R and then SYS4096 or whatever after loading.
..you "might" need to be in the directory of kickassdemo.prg.. can't remember if Vice handles paths properly or if that was some other emul that fucked that up. |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: x64.exe -autostart kickassdemo.prg
that will load the kickassdemo.prg and do a RUN, so you'd need that basic header or just ALT+R and then SYS4096 or whatever after loading.
..you "might" need to be in the directory of kickassdemo.prg.. can't remember if Vice handles paths properly or if that was some other emul that fucked that up.
well, in relaunch64 I alredy configured VICE to have -autostart (that happens automaticly)... It's just that VICE doesn't load the code...o.O
/knoeki |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
perhaps the cross assembler you use doesn't apply a 2 byte load adress to the start of the file? ...but you said DASM, right? I think that one does..
You may need to switch cartridges off in VICE to get it working automatically. Otherwise you'll have to press F1 or so, if it's action replay.. ...and if you don't do it relatively fast, VICE won't go on with the autoload, eh.
(BTW, if you have RR-Net, I'd suggest using that instead, and transfer the code to the real thing instead of VICE.) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
knoeki: enter monitor in vice and check wether it has loaded your prg (most probably it has not). Anyways you should see the emulated c64 telling you:
load"myprogram.prg",8,1
searching for myprogram.prg
loading
ready
run
if you dont see the above only the basic prompt, then vice havent loaded anything up.
in vice: alt+m, and then d1000 in the monitor prompt. if you dont see inc d020 at the 1000 adress then your prg is not loaded, then doublecheck your commandline settings in relaunch64. |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: perhaps the cross assembler you use doesn't apply a 2 byte load adress to the start of the file? ...but you said DASM, right? I think that one does..
You may need to switch cartridges off in VICE to get it working automatically. Otherwise you'll have to press F1 or so, if it's action replay.. ...and if you don't do it relatively fast, VICE won't go on with the autoload, eh.
(BTW, if you have RR-Net, I'd suggest using that instead, and transfer the code to the real thing instead of VICE.)
I don't have an RR-net... I wish I had one...
also, I dont use any carts in VICE...
...strange...o.O; |
| |
Raf
Registered: Nov 2003 Posts: 343 |
Quote: step 1)
Download and install EditPlus.
step 2)
Download 64TASS. Put the files in a subfolder of the EditPlus directory.
step 3)
Configure EditPlus so that CTRL+1 compiles your code using 64TASS.
step 4)
Code 'macro assembly' in EditPlus and compile with 64TASS.
currently I'm using textpad (http://www.textpad.com) with DASM 2.20 by IaN Coog + I have 6502 syntax highlight too (also at textpad.com)
and... I setup it so ctrl+1 assembles too ;p
www.vulture.c64.org |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: knoeki: enter monitor in vice and check wether it has loaded your prg (most probably it has not). Anyways you should see the emulated c64 telling you:
load"myprogram.prg",8,1
searching for myprogram.prg
loading
ready
run
if you dont see the above only the basic prompt, then vice havent loaded anything up.
in vice: alt+m, and then d1000 in the monitor prompt. if you dont see inc d020 at the 1000 adress then your prg is not loaded, then doublecheck your commandline settings in relaunch64.
well, this all doesn't work...o.O
and also, I was mistaken... I'm not using DASM, but ACME... sorry for the confusion...o.o; |
| |
hollowman
Registered: Dec 2001 Posts: 474 |
If I was to begin learning to code assembler on c64 I would start with turbo assembler on the c64, or run it under vice. Sure its nice to have all the memory available and not have to worry about crashing the c64 and trashing the source code in memory, but for trying out stuff its quicker and easier to use turbo assembler than setting up a crossdevelopment enviroment as the first step. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
why would you worry about loosing source using vice ? loadstate / savestate is ther. (and actually thats how I used to code, since I cannot tear out my tasm roots) |
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
To be honest I wouldn't trust an IDE, just make some one-letter bat files, one for running the editor and other for compiling+launching the emulator. Then hone your Alt+W reflex and I don't think the speed difference to using tasm is that much. Plus that way you can't screw up when you save a state instead of load. |
| |
Mace
Registered: May 2002 Posts: 1799 |
Knoeki, if you want some fast help from your Dutch friends, turn to 64TASS. You know where to find us.
You are being impractical and stubborn now ;-)
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
tastes are different. pressing accidentally save is a stupid argument, you can the same way not save your src when closing the editor or one can come up with 27 similar stupid arguments. there are much better arguments pro real cross asming than pressing accidentally alt-s :) |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
>Yeah, I have that one... but I can't figure out how it works...o.o
Hey Knoeki, I'm a bit curious. What was it you didn't get to work?
|
| |
Marauder/GSS Account closed
Registered: Jul 2006 Posts: 224 |
guess it's not running your file in vice, because your source-code doesn't get compiled...
I have tested it with Relaunch/ACME 0.90 and it works fine after changing commandline parameters for ACME to:
-f CBM -o OUTPUT INPUT
(and for VICE just -autostart)
after compiling the emulator should start and load your output-file like Oswald has posted before... and then you only need to run it by typing SYS 4096 (*=$1000 in your example)
|
| |
Melkor Account closed
Registered: Apr 2006 Posts: 11 |
If your using ACME have you defined your output filename with !TO "filename.prg",cbm ? |
| |
Devia
Registered: Oct 2004 Posts: 401 |
oh for crying out loud... screw that relaunch and fancy editor stuff until you know wtf you're doing. Notepad, write code, save code, start cmd.exe, assemble by hand with the assembler of your choice, THEN start Vice and load the assembled prg MANUALLY. When THAT works, THEN try to cut corners with fancy editors, makefiles and whatnots.
If I was to start all over again, I'd use TMP on the real shit. You won't need the comfy xdev environment until much much later ;-)
|
| |
Marauder/GSS Account closed
Registered: Jul 2006 Posts: 224 |
Quote: If your using ACME have you defined your output filename with !TO "filename.prg",cbm ?
no, on my test I haven't used the !TO "filename.prg",cbm option in the source-code, as Relaunch automaticly uses the name of source-code file + changing extension to .prg then I think...
btw, I'm not using ACME, so I'm not an expert in that... I've just executed acme.exe direcly to find out the parameters (as it didn't work with the default params provided by that Relaunch-thingy) and then just used them in Relaunch-settings for the test...
my current setup for VICE is simple:
- drive#8 for attaching d64-images
- drive#9 for attaching a directory on my hdd
- using my old SpeedDos C64 ROM for having extended functions like f-keys (showing dir, switching drive 8/9, realtime monitor for dumping memory) and hex-number support like "print $1103", @$ for dir, etc.
- TURBO ASSEMBLER (v5.5) - what else? (c;
- (or Turbo Macro Pro maybe, hehe)
|
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Ok, I've tried about everything here, but VICE still doesn't load my program... and I know why...(I think)
Every I press the "Assamble and Run" button in Relaunch64, a command-prompt window pops up for about a second (which is probably ACME running or something), and just now, in a short flash, I saw something like "error" and more blabla...o.o
Also, I already used Turbo Assambler, but crossassambling seems nice... |
| |
Raf
Registered: Nov 2003 Posts: 343 |
then invoke acme from commandline by hand , not from relaunch - to ensure what u'r doing wrong ;p
www.vulture.c64.org |
| |
Marauder/GSS Account closed
Registered: Jul 2006 Posts: 224 |
Quote: Ok, I've tried about everything here, but VICE still doesn't load my program... and I know why...(I think)
Every I press the "Assamble and Run" button in Relaunch64, a command-prompt window pops up for about a second (which is probably ACME running or something), and just now, in a short flash, I saw something like "error" and more blabla...o.o
Also, I already used Turbo Assambler, but crossassambling seems nice...
well Knoeki, like I've already mentioned it a few posts before, I had this also on my test with those programs.
And that's why I've compiled the source with ACME in dos-box first... and then I've used these params and just changed compiler-settings for ACME in Relaunch to: -f CBM -o OUTPUT INPUT
and then it works for me that it loads the compiled program in vice also... |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Well, thanks to Mace everything works now. thanks!
*goes back to coding* |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
...and what was the problem? Got curious.. :) |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Quote: ...and what was the problem? Got curious.. :)
The problem was solved using Editplus + 64Tass.
We have a happy Knoeki now. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
@Knoeki: Always nice to see new people taking up C64 coding. Looking forward to your 1st machine code demo, although it might take a while. It took almost 2 years from I started machine code coding until I released my first demo. So have patience. :) |
| |
Marauder/GSS Account closed
Registered: Jul 2006 Posts: 224 |
Quote: ...and what was the problem? Got curious.. :)
I guess the problem was that ACME didn't compile the source due to wrong commandline-parameters in Relaunch, hence there was no file created and that's why Vice didn't load anything...
I have tested it out and got the same behaviour, but just after changing the parameters in Relaunch all worked fine, like mentioned in my previous posts... ;)
anyway, good luck Knoeki... looking forward to see first demo! (c; |