Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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: 3197
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
rexbeng
Da Snake
/Panor..
BYB/Hokuto Force
DivertigO
JCH/Vibrants
astaroth/TRSI
Guests online: 132
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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