Page 1 of 1

collected "machine code starting/loading address"

Posted: Fri Sep 06, 2013 9:54 pm
by jedie
here i will collect some machine code starting/loading address of wave files from the archive.

First: I would like to collect only from BASIC codes. So a questions: Exist here anywhere a list with the information witch files from http://archive.worldofdragon.org/archiv ... ragon/wav/ are BASIC programms?

Dragon Data Ltd - Examples from the Manual - 39~58 [run].wav

Code: Select all

file type: BASIC programm (0x00)
Raw ASCII flag is: 0
ASCII flag: tokenized BASIC (0x00)
gap flag is 0x0 (0x00=no gaps, 0xff=gaps)
machine code starting address: 0x4558
machine code loading address: 0x3339
1_super_d.WAV from Dragon Software Issue 22 (1986)(GTS)(ES)[a][WAV]

Code: Select all

Filename: 'SUPER-D'
file type: BASIC programm (0x00)
Raw ASCII flag is: 0
ASCII flag: tokenized BASIC (0x00)
gap flag is 0x0 (0x00=no gaps, 0xff=gaps)
machine code starting address: 0x5355
machine code loading address: 0x5045
4_super.WAV from Dragon Software Issue 22 (1986)(GTS)(ES)[a][WAV]

Code: Select all

Filename: 'SUPER'
file type: BASIC programm (0x00)
Raw ASCII flag is: 0
ASCII flag: tokenized BASIC (0x00)
gap flag is 0x0 (0x00=no gaps, 0xff=gaps)
machine code starting address: 0x5355
machine code loading address: 0x5045

Re: collected "machine code starting/loading address"

Posted: Fri Sep 06, 2013 10:09 pm
by jedie
dragon user magazine - millipede.cas

Code: Select all

Filename: 'MILIPEED'
file type: BASIC programm (0x00)
Raw ASCII flag is: 0
ASCII flag: tokenized BASIC (0x00)
gap flag is 0x0 (0x00=no gaps, 0xff=gaps)
machine code starting address: 0x4d49
machine code loading address: 0x4c49

Re: collected "machine code starting/loading address"

Posted: Fri Sep 06, 2013 11:07 pm
by Alastair
jedie wrote:Exist here anywhere a list with the information which files [...] are BASIC programs?
I don't know if anyone has made a list, but some information for Microdeal's programs can be gleaned from the cassette inlay. If it is a BASIC program the name Microdeal will be spread out (for an example see Alcatraz II), for m/c programs the name will have normal kerning (e.g., Cashman).

Re: collected "machine code starting/loading address"

Posted: Sat Sep 07, 2013 9:01 am
by jedie
On the ML at http://five.pairlist.net/pipermail/coco ... 71210.html has Johann the answer:

The "machine code start/load address" is simply the first characters of the used filename :shock:

e.g.:

"Examples from the Manual - 39~58 [run].wav" - filename is "EX39"
machine code starting address: 0x4558
machine code loading address: 0x3339

0x45 -> E
0x58 -> X
0x33 -> 3
0x39 -> 9


So the naming "machine code start/load address" must be wrong, isn't it?

But why? Theses information is redundant. What's the deeper meaning behind it?

Anyone a idea?

EDIT: implement this with commit: https://github.com/jedie/PyDragon32/com ... d7be0bd7ad

Re: collected "machine code starting/loading address"

Posted: Sat Sep 07, 2013 8:20 pm
by robcfg
Don't get me wrong, but that's total bullshit.

If you take a look at the description of the CAS file format in the Tape/Disk Preservation section, you'll see that the load and execution addresses are stores in the name block.

See points 5.5 and 5.6 below:
5.1 An 8 byte program name
5.2 A file ID byte where:
00=BASIC program
01=Data file
02=Binary file
5.3 An ASCII flag where:
00=Binary file
FF=ASCII file
5.4 A gap flag to indicate whether the
data stream is continuous (00) as
in binary or BASIC files, or in blocks
where the tape keeps stopping (FF) as
in data files.
5.5 Two bytes for the default EXEC address
of a binary file.
5.6 Two bytes for the default load address
of a binary file.

Re: collected "machine code starting/loading address"

Posted: Sat Sep 07, 2013 8:33 pm
by jedie
Yes, i grab it from the name block if the source is wave or a cas file.

But if PyDC should convert a bas to wav/cas then i must "create" a "machine code starting/loading address"...

But it seems that the values are only used in machine code and only exist in BASIC code, because it the same format.

Re: collected "machine code starting/loading address"

Posted: Sat Sep 07, 2013 11:05 pm
by JeeK
jedie wrote:Yes, i grab it from the name block if the source is wave or a cas file.

But if PyDC should convert a bas to wav/cas then i must "create" a "machine code starting/loading address"...

But it seems that the values are only used in machine code and only exist in BASIC code, because it the same format.
That's what I tried to say already on the mailing list. In case of file ID other than 2 (MC) it seems irrelevant what the addr fields contain. The filename is just a method to ensure that just in case a load the address does not harm the system (too much). ;)

Re: collected "machine code starting/loading address"

Posted: Mon Sep 09, 2013 12:30 am
by Sarah
The load and exec addresses aren't used for BASIC files. If you're seeing ASCII characters repeated from the filename in there, it's probably just a result of memory or registers being reused. Those two fields can be ignored - actually I suspect you could just use an 11 byte header block for BASIC if you like; the header length doesn't have to be 15 bytes; it can be > 15 up to 255 bytes so I expect that it could be < 15 too!

Re: collected "machine code starting/loading address"

Posted: Mon Sep 09, 2013 8:29 am
by jedie
Seems you have right! With https://github.com/jedie/PyDragon32/com ... 0cc0daac47 i didn't add a machine code starting/loading address in BASIC files. And it works.

Thank you very much!