Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user tubesockor ! (Registered 2024-05-12) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Looking for a PC App for C64 aid
2007-02-25 17:34
Trooper

Registered: Sep 2002
Posts: 39
Looking for a PC App for C64 aid

Dear All,

b4 I knock up some quick job in VB to convert .prg files into .byte statements, I was wondering if there is anything already out there.

basically so I can import a .prg and end up with something like

org $c000
.byte $00,$02,$0a,$05
.byte $0a,$01,$09,$05

etc
etc

Regards
Paul.
2007-02-25 19:41
Slammer

Registered: Feb 2004
Posts: 416
Hi,

Are you sure you don’t just want to import the file directly instead of first converting it to bytecode (I guess most assemblers are able to do this). In Kick Assembler you would do this like:

.import binary “music.bin”

If you want to edit some of the bytes, or throw some of them away before storing the in memory you can load it into an array first. Here is an example where you load it into an array, throw away the two adressing bytes and use the $1000 first bytes of the file.

.var myfile = LoadBinary("myfile.prg", BF_C64FILE)
myData: .fill $1000, myfile.get(i)

This will give the same result as storing the first $1000 bytes with .byte $23,$52,$c2,...... (Guess this is strictly Kick Assembler functionality)
2007-02-25 19:47
iAN CooG

Registered: May 2002
Posts: 3136
Quote: Dear All,

b4 I knock up some quick job in VB to convert .prg files into .byte statements, I was wondering if there is anything already out there.

basically so I can import a .prg and end up with something like

org $c000
.byte $00,$02,$0a,$05
.byte $0a,$01,$09,$05

etc
etc

Regards
Paul.


iancoog.altervista.org/C/dasm2.20.07k.rar (copy/paste in browser)

Inside you will find a cx.exe (C source included) to generate byte listings from any binary. Anyway in my dasm mod I have implemented a more useful INCPRG directive to allow loading your binaries at any address.

-=[]=-- iAN CooG/HF --=[]=-
2007-02-26 03:10
Trooper

Registered: Sep 2002
Posts: 39
Cheers Ian, that serves me well...
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mr. SID
Genius/Xenon
Flexman
Angel of Death/Wiseg..
Jammer
grass/LETHARGY
redcrab/G★P
spider-j
Tim/Silicon Limited
Magic/Nah-Kolor
Archmage/SHAPE
Nith/TRIɅD
Visage/Lethargy
Youth
tubesockor
Martinland
www.gb64.com
Nordischsound/Hokuto..
Guests online: 140
Top Demos
1 13:37  (9.8)
2 Next Level  (9.8)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Layers  (9.6)
5 Copper Booze  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Original Suppliers
1 Black Beard  (9.7)
2 Derbyshire Ram  (9.5)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Jazzcat  (8.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.032 sec.