| |
User rating: | awaiting 8 votes (8 left) |
Credits :
Download :
Look for downloads on external sites:
Pokefinder.org
User Comment Submitted by Bytebreaker on 9 June 2019
@ krill
I already did in a separate release to comply with CSDB rules.
You find it here:
Dataliner - Native Python 2.7 Script
The release is not (yet?) visible in the "latest releases" section on csdb main page. | User Comment Submitted by Krill on 9 June 2019 User Comment Submitted by Bytebreaker on 9 June 2019
Tested on Windows 10 32/64Bit. Should work on Windows 7,8 also.
What does dataliner do?
-----------------------
If you write C64 V2 BASIC code you sometimes use machine language routines that you have copied previously into memory. with the "SYS" command you let then BASIC jump to the machine language routine in memory and then return back to BASIC again. As a BASIC coder, you do this for time-critical operations for which BASIC code interpretation would take too long. This way, you keep the ease of use that BASIC gives you without losing speed (i.e. plotting dots in a sinus curve is a good example to get the idea behind it). The usual way to copy a machine language program into memory with BASIC is using a FOR...NEXT loop that copies decimal values from DATA line statements into the C64 memory.
Now Dataliner has been written as a tool that converts a binary machine language program into a C64 V2 BASIC DATA listing that is stored in an ASCII text file on your Windows PC. There are plenty of ways to generate these data lines on a C64, i.e. with a monitor program. But I don't code directly on the C64, I like using a modern Windows PC as a cross development environment, which is mainly PSPad editor and ACME assembler. Since ACME, Exomizer and other important C64 cross development tools are Windows Command Line Console based, I decided to write a Dataliner as a standalone Windows Command Line application. I achieved this by writing the tool in Python first and then made it a standalone 32Bit-Command Line Executable with py2exe.
Installation for Windows 32/64 Bit:
-----------------------------------
1.) Unzip the folder to c:\dataliner
2.) Add this folder to your Windows PATH variable in order to access the dataliner command from anywhere your DOS prompt might point at
3.) Please make sure that the files Python27.dll and library.zip are always in the same folder as the dataliner.exe
Usage in Windows 32/64 Bit Command Line Window:
-----------------------------------------------
Command Pattern: dataliner <filename> <name_of_output_textfile> <starting_line_number>
Example: dataliner file.prg data.txt 100
Here, the file 'file.prg' will be converted into a list of BASIC DATA statements with decimal numbers, which are stored in a new ASCII text file called 'data.txt'.
You can use this with the sample 'file.prg' which is included in the program folder for you to try out and test.
How do I use the DATAs in my BASIC code?
----------------------------------------
Write a FOR..NEXT loop in BASIC with the information that the dataliner program gives you after generating the textfile with the DATA statements and let the C64 program pointer jump to the address where the data has been copied:
Example output of dataliner.exe:
No. of bytes in DATA stream, omiting the first 2 address-bytes: 1632
File is loading iin C64 memory at $c000
Read into C64 memory from 49152 to 49152 + 1631
Location of text file with C64 Basic DATAs: data.txt
All you need to do now is to include these DATAs in you BASIC listing and use it for your own purpose, for example like this:
10 FOR I=49152 TO 49152 + 1631
20 READ P:POKE I,P
30 NEXT
40 SYS 49152
I hope some of you can use this and have fun with both BASIC and machine language on your Windows cross development environment. For Linux and Mac users who want to use the original Python script, please send me PM.
Signing off..
Bytebreaker of Hokuto Force in June 2019. |
|
|
|
| Search CSDb |
| Navigate | |
|
| Detailed Info | |
|
| Fun Stuff | |
· Goofs · Hidden Parts · Trivia
|
|
| Forum | |
|
| Support CSDb | |
|
| |
|