Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » Commodore Emulation » [VICE] What medium type did I create there?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
[VICE] What medium type did I create there? [message #318177] Tue, 17 May 2016 15:17 Go to next message
Andreas Kohlbach is currently offline  Andreas Kohlbach
Messages: 1456
Registered: December 2011
Karma: 0
Senior Member
I was trying to code some 6510 assembler using the monitor program of
VICE. Besides I don't get it to work at this point I wonder what medium
type I did create when using the save function of the monitor to write it
to the file system of the host (not to the C64). I gave it a .prg extension.

The program "file" in Linux just says it would be "data". I can use
"smart attach" in VICE to load it into the C64. But I can not attach it
as floppy image, tape image or cartridge. I always get "invalid image".

What kind of file does the monitor program of VICE create?
--
Andreas
You know you're a redneck if
13. The bluebook value of your truck goes up and down, depending on how much
gas is in it.
Re: [VICE] What medium type did I create there? [message #318309 is a reply to message #318177] Sat, 21 May 2016 04:38 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: qsdf88

On Tue, 17 May 2016 15:17:56 -0400, Andreas Kohlbach wrote:

> I was trying to code some 6510 assembler using the monitor program of
> VICE. Besides I don't get it to work at this point I wonder what medium
> type I did create when using the save function of the monitor to write
> it to the file system of the host (not to the C64). I gave it a .prg
> extension.
>
> The program "file" in Linux just says it would be "data". I can use
> "smart attach" in VICE to load it into the C64. But I can not attach it
> as floppy image, tape image or cartridge. I always get "invalid image".
>
> What kind of file does the monitor program of VICE create?

It does not have a file type. Machine code is saved as raw data, it does
not have any header at all. It contains nothing but the code you entered,
and that can be anything.

For example, this small program at $C000:

C000 INC $D020
C003 JMP $C000

can be saved as just six bytes. The created file will only be six bytes
long and contain nothing but the numeric value of the instructions of
your program. In this case, this would be:

EE, 20 DO, 4C, 00, C0.

Later you can load these instructions back into memory using the L
command.


HTH.
Re: [VICE] What medium type did I create there? [message #318327 is a reply to message #318309] Sat, 21 May 2016 17:11 Go to previous messageGo to next message
Andreas Kohlbach is currently offline  Andreas Kohlbach
Messages: 1456
Registered: December 2011
Karma: 0
Senior Member
On Sat, 21 May 2016 08:38:06 +0000 (UTC), qsdf88 wrote:
>
> On Tue, 17 May 2016 15:17:56 -0400, Andreas Kohlbach wrote:
>
>> I was trying to code some 6510 assembler using the monitor program of
>> VICE. Besides I don't get it to work at this point I wonder what medium
>> type I did create when using the save function of the monitor to write
>> it to the file system of the host (not to the C64). I gave it a .prg
>> extension.
>>
>> The program "file" in Linux just says it would be "data". I can use
>> "smart attach" in VICE to load it into the C64. But I can not attach it
>> as floppy image, tape image or cartridge. I always get "invalid image".
>>
>> What kind of file does the monitor program of VICE create?
>
> It does not have a file type. Machine code is saved as raw data, it does
> not have any header at all. It contains nothing but the code you entered,
> and that can be anything.

I saw in the logging messages from VICE now it is a p00 file.

> For example, this small program at $C000:
>
> C000 INC $D020
> C003 JMP $C000
>
> can be saved as just six bytes. The created file will only be six bytes
> long and contain nothing but the numeric value of the instructions of
> your program. In this case, this would be:
>
> EE, 20 DO, 4C, 00, C0.
>
> Later you can load these instructions back into memory using the L
> command.

I seem to also be able to save the program from within VICE to for example
a file on a 1541 floppy drive.

But if it's saved using device "0" to the file system of the host from
inside the monitor program it's a p00 file.
--
Andreas
You know you're a redneck if
30. If you've ever asked the preacher "How's it hangin?"
Re: [VICE] What medium type did I create there? [message #318655 is a reply to message #318327] Fri, 27 May 2016 03:09 Go to previous message
Pekka Takala is currently offline  Pekka Takala
Messages: 73
Registered: March 2012
Karma: 0
Member
On 22.05.2016 00:11, Andreas Kohlbach wrote:
> On Sat, 21 May 2016 08:38:06 +0000 (UTC), qsdf88 wrote:
>>
>> On Tue, 17 May 2016 15:17:56 -0400, Andreas Kohlbach wrote:
>>
>>> I was trying to code some 6510 assembler using the monitor
>>> program of VICE. Besides I don't get it to work at this point I
>>> wonder what medium type I did create when using the save function
>>> of the monitor to write it to the file system of the host (not to
>>> the C64). I gave it a .prg extension.
>>>
>>> The program "file" in Linux just says it would be "data". I can
>>> use "smart attach" in VICE to load it into the C64. But I can not
>>> attach it as floppy image, tape image or cartridge. I always get
>>> "invalid image".
>>>
>>> What kind of file does the monitor program of VICE create?
>>
>> It does not have a file type. Machine code is saved as raw data, it
>> does not have any header at all. It contains nothing but the code
>> you
>> entered,
>> and that can be anything.
>
> I saw in the logging messages from VICE now it is a p00 file.
>
>> For example, this small program at $C000:
>>
>> C000 INC $D020 C003 JMP $C000
>>
>> can be saved as just six bytes. The created file will only be six
>> bytes long and contain nothing but the numeric value of the
>> instructions of your program. In this case, this would be:
>>
>> EE, 20 DO, 4C, 00, C0.
>>
>> Later you can load these instructions back into memory using the L
>> command.
>
> I seem to also be able to save the program from within VICE to for
> example a file on a 1541 floppy drive.
>
> But if it's saved using device "0" to the file system of the host
> from inside the monitor program it's a p00 file.
>

If you create a commodore file, from for example program on top, it
should contain following bytes:

00 C0 EE 20 D0 4C 00 C0

The first two is the loading address. Then comes the actual code in hex
bytes. If the two first bytes are missing, then commodore loads the file
as default to $20EE that is not desired nor working. So the .prg program
format is:

<load addr lo><load addr hi><code>

If you want it to be basic LOADable on a commodore computer, be it a
VIC, C64, Pet, C128 or anything made by commodore, the file format is
always that. Geos file format is different.

If you want to make programs by cross-compiling for c64, get cc65
package or acme 65816 compiler. I have used acme 65816 compiler and have
found it being good for developing for c64. It is able to output
directly loadable program code for VICE or c64.





--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: retroCloud website is apparently dead
Next Topic: [VICE] C128 and countries
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Mar 29 04:52:45 EDT 2024

Total time taken to generate the page: 0.38898 seconds