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: 449
Hi,
Are you sure you dont 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: 3238
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...
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
Andy/AEG
Pac
Endurion
Chesser/Blazon
Didi/Laxity
JEZ
wil/VCC^CTG
Guests online: 230
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Codeboys & Endians
(9.7)
4
Mojo
(9.6)
5
Coma Light 13
(9.6)
6
Edge of Disgrace
(9.6)
7
Signal Carnival
(9.6)
8
Wonderland XIV
(9.5)
9
Uncensored
(9.5)
10
Comaland 100%
(9.5)
Top onefile Demos
1
Nine
(9.7)
2
Layers
(9.6)
3
Cubic Dream
(9.6)
4
Party Elk 2
(9.6)
5
Copper Booze
(9.5)
6
Scan and Spin
(9.5)
7
Onscreen 5k
(9.5)
8
Grey
(9.5)
9
Dawnfall V1.1
(9.5)
10
Rainbow Connection
(9.5)
Top Groups
1
Artline Designs
(9.3)
2
Booze Design
(9.3)
3
Oxyron
(9.3)
4
Performers
(9.3)
5
Censor Design
(9.3)
Top NTSC-Fixers
1
Pudwerx
(10)
2
Stormbringer
(9.7)
3
Fungus
(9.6)
4
Booze
(9.5)
5
Grim Reaper
(9.3)
Home
-
Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.036 sec.