DATA maker

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
Mike
Herr VC
Posts: 4831
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

DATA maker

Post by Mike »

Boray had published a similar program quite a time ago, but this one fits in 4 lines!

Code: Select all

63996 INPUT"START";T:INPUT"END";E:INPUT"LINE NUMBER";L:L$=MID$(STR$(L),2)+" FORT="+MID$(STR$(T),2)+"TO"+MID$(STR$(E),2)+":READA:POKET,A:NEXT":GOTO63998
63997 L$=MID$(STR$(L),2)+" DATA ":FORT=STOE:N$=C$+MID$(STR$(PEEK(T)),2):C$=",":IFLEN(L$+N$)<88THENL$=L$+N$:NEXT
63998 PRINT"{CLR}"L$:POKE631,19:POKE632,13:POKE633,13:POKE198,3:IFT<=ETHENPRINT"L="L+1"{LEFT}:S="T"{LEFT}:E="E"{LEFT}:GOTO63997":END
63999 FORT=1TO4:PRINT63995+T:POKE633+T,13:NEXT:PRINT"LIST":POKE198,7
(download)

You simply specify the start and end of the memory range to be converted into a DATA loader, and the first line number to be used. At the end, DATA MAKER deletes itself, and lists the generated program.

Greetings,

Michael
Last edited by Mike on Thu Feb 20, 2014 4:41 pm, edited 3 times in total.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Did you come up with the idea yourself or did you know about my program first?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Maybe you should have choosen a different name to not mix it up with my program. How would you feel if someone made a program called "MAXIGRAFIK" that had exactly the same functionality as your maxigrafik? Maxigrafik is however a much more complicated program and maybe my data maker wasn't the first in the world either... I don't know... But as a principle, I think you should have choosen a different name if you knew about my program.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Mike
Herr VC
Posts: 4831
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Boray wrote:Did you come up with the idea yourself or did you know about my program first?
This idea didn't occur first neither to you or to me. I can easily find programs doing exactly the same task in type-in magazines of the 80ies.
[...]as a principle, I think you should have choosen a different name if you knew about my program.
Oh, bother. I think the name is generic enough so you shouldn't have any problems with that.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Mike wrote:
Boray wrote:Did you come up with the idea yourself or did you know about my program first?
This idea didn't occur first neither to you or to me. I can easily find programs doing exactly the same task in type-in magazines of the 80ies.
[...]as a principle, I think you should have choosen a different name if you knew about my program.
Oh, bother. I think the name is generic enough so you shouldn't have any problems with that.
So why did you make another one then?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Boray wrote:So why did you make another one then?
Shouldn't he? Why?

Don't get me wrong, but trying to improve something as simple as a data maker may be fun, doesn't need much time and shouldn't hurt anybody.
Mike also was so kind to reference your program explicitly although it is far from being the first of its kind.
Buy the new Bug-Wizard, the first 100 bugs are free!
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Ok, I think it's most fun to implement original ideas, but I guess my ideas aren't always that original...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Funny! At some point last year, I needed to "rip" my user graphics from a program as DATA statements, and I also reinvented the wheel with this program. It's simple and served the purpose. My memory is awful, and it didn't occur to me to search for a pre-existing solution.

I like the idea of revisiting utility programs. They just get more and more efficient. There's a certain creative aspect in every program, but unlike a game, I don't feel like one is "trespassing" on another person's idea when attempting to reinterpret a utility. Think of how many character editors there have been! :)
High Scores, Links, and Jeff's Basic Games page.
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Post by e5frog »

I don't quite understand what it does, does it take binary data and make it into rows of DATA in a BASIC program or the other way? What's the exact purpose?

EDIT
OK... I ready the good description of Boray's program, unfortunately there's no download link of Boray's program and the listing isn't copy and paste friendly with WinVICE, this is a little better:

Code: Select all

1 rem datamaker v1.0    for vic-20 and c64  by anders persson 2004http://listen.to/boray
3 on-(c=-1)goto34:ifc<>0then20
5 print"{down}{rvs on}    datamaker v1.0    ":input"start address";a:input"end address";b
20 s=a+c*18:c=c+1:e=a+18*c-1:a$=str$(60+c):ife>=bthene=b:c=-1
23 print"{clr}1 a=";a;":b=";b;":c=";c:printright$(a$,len(a$)-1);"data";
25 fort=stoe:a$=str$(peek(t)):printright$(a$,len(a$)-1);:ift<>ethenprint",";
28 next:print:print"run":poke631,19:fort=632to636:poket,13:next:poke198,6:end
34 print"{clr} 3":print5:print20:print23:print25:print28:print34:print36:print"list"
36 fort=632to640:poket,13:next:poke631,19:poke198,10:end
55 fort=atob:readc:poket,c:next 


It results in a few Syntax Errors though so you'd still have to type some in manually. I guess Boray's original listing can be run through some converter utility and then you'll get it working right away.

Isn't it faster to load the data directly from tape or disk, perhaps if you want all of it in a single file this is an option though.


So, if Mike's shorter, which one is faster?
My other interest: http://channelf.se
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

e5frog wrote: unfortunately there's no download link of Boray's program
Yes there is:

http://user.tninet.se/~pug510w/datormus ... amaker.zip

(from http://user.tninet.se/~pug510w/datormus ... maker.html )
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Post by e5frog »

There is NOW yes... ;-)

The zipped file is 509 bytes, the prg file is originally 505 byte - so what's with the zip:ing?
My other interest: http://channelf.se
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

Some hosts (and download providers) don't like certain suffixes... ZIP does rather take that issue away.
Lie with passion and be forever damned...
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

It has been there all along, but I moved my site a couple of years ago so the link in my original post didn't work until I edited it yesterday.

Someone here (I think it was Vic User) requested many years ago that downloads should be zip files, or he couldn't download them.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Post Reply