collected "machine code starting/loading address"

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

collected "machine code starting/loading address"

Post 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
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: collected "machine code starting/loading address"

Post 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
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Alastair
Posts: 669
Joined: Fri Jul 18, 2008 11:33 pm

Re: collected "machine code starting/loading address"

Post 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).
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: collected "machine code starting/loading address"

Post 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
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: collected "machine code starting/loading address"

Post 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.
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: collected "machine code starting/loading address"

Post 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.
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
User avatar
JeeK
Posts: 67
Joined: Fri Aug 16, 2013 10:45 am
Location: Vienna, Austria
Contact:

Re: collected "machine code starting/loading address"

Post 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). ;)
The dragon on my side: http://klasek.at/hc/dragon/
Sarah
Posts: 177
Joined: Wed Apr 13, 2011 3:36 pm
Contact:

Re: collected "machine code starting/loading address"

Post 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!
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: collected "machine code starting/loading address"

Post 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!
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Post Reply