Resurrecting my old game code

صفحة 1/2
| 2

بواسطة Totta

Expert (88)

صورة Totta

01-03-2023, 16:02

Beyond all logic and probability I have today actually managed to read a tape with 35 years old code made by me and get it to load into OpenMSX. I managed by hooking up a tape recorder to the computer's line in, record it into Audition, filter away all low frequencies, amplify and cut & paste some header beeps that were damaged.

However due to the tape's quality there were still some typos and things in the code I feel I need to correct.

The first file in my project was easy since it was saved with SAVE so I just needed to correct the code, create a new tapefile and save it again.

But file #2 is a binary file loaded with BLOAD. It's a splash screen and it loads correctly and is displayed correctly but since I want to re-save it, I need to get it's start and end addresses. It seems I display it using DEFUSR=&HDD20:A=USR(0)

The same goes with file #3 which also is a binary file with speech samples created by 14yo me (How about that?) I have no idea where I chose this to be loaded into memory so I need to find out that too.

Any ideas?

I've seen some ideas here on the forum about opening the files with LINE INPUT and similar ways but none of the examples seem to work. The file is simply not "found" even though it is when I load it with BLOAD "cas:"

Any ideas?

Login أوregister لوضع تعليقاتك

بواسطة Jipe

Paragon (1625)

صورة Jipe

01-03-2023, 16:22

save this program on a dsk and run Wink

Tongue are : P

Quote:

5 SCREEN 0:WIDTH80
10 REM LECTURE DU HEADER CASSETTE
20 REM (C) DANIEL MARTIN 1985
30 KEYOFF
40 CLEAR 200,&H8FFF
50 CLS
60 PRINT"LECTURE DU HEADER CASSETTE"
70 PRINTTongueRINTTongueRINT
80 FOR I=&H9100 TO &H912B
90 READ A$
100 POKE I,VAL("&H"+A$)
110 NEXT I
120 DEFUSR=&H9100
130 DATA F3,0E,D0,CD,E9,72,06,0A,CD,D4,72,B9,20
140 DATA F5,10,F8,21,00,90,06,06,CD,D4,72,77,23
150 DATA 10,F9,CD,E9,72,06,06,CD,D4,72,77,23,10,F9,CD,E7,00,C9
160 FOR I=&H9000 TO &H9020TongueOKEI,0:NEXT
170 L=USR(0)
180 N$=""
190 FOR I=&H9000 TO &H9005
200 N$=N$+CHR$(PEEK(I))
210 NEXT I
220 PRINT"BSAVE ";N$;" ,";
230 REM
240 I=&H9006
250 AD$=HEX$(PEEK(I)+256*PEEK(I+1))
260 PRINT"&H";AD$;",";
270 REM
280 AF$=HEX$(PEEK(I+2)+256*PEEK(I+3))
290 PRINT"&H";AF$;",";
300 REM
310 PE$=HEX$(PEEK(I+4)+256*PEEK(I+5))
320 PRINT"&H";PE$;" "
330 PRINT
340 GOTO 160

بواسطة aoineko

Paragon (1134)

صورة aoineko

01-03-2023, 20:03

What this program is supposed to do?

If Totta can BLOAD its files, is there any way with openMSX debugger to get modified RAM/VRAM address so he can easly know where those files went?

بواسطة Jipe

Paragon (1625)

صورة Jipe

01-03-2023, 20:20

this program read the header of the K7 bload files and return name, start adress, end adress and run adress
save this Basic program on a dsk and run with open MSX or BlueMSX
after insert a K7 on the emulator and you see your Bload Files parameters

بواسطة aoineko

Paragon (1134)

صورة aoineko

01-03-2023, 21:02

Wow. I may end up liking BASIC after all. Smile

بواسطة Manuel

Ascended (19677)

صورة Manuel

01-03-2023, 21:53

Well, the actual code is in machine language in lines 130-150 Smile

A similar program is TAPDIR...

بواسطة Totta

Expert (88)

صورة Totta

02-03-2023, 09:33

I entered that program code and ran it.
It started the tape file (I could hear it) but after a while I got the error "TAPE ENDED" so I guess it didn't "find" the bload file either.

Strange since it loads fine when I write BLOAD "CAS:"

But it seems TAPDIR does the trick so thank you for that suggestion

بواسطة Totta

Expert (88)

صورة Totta

02-03-2023, 11:55

I have now finally managed to resurrect the game fully. Too bad it's a shit game written in basic (just the average Tennis-clone) but it has some interesting features like a screen 2 loading screen (data loaded using BLOAD) and quite a lot of digitized speech (my 14yo voice, 35 years ago) also loaded using BLOAD.

I remember I once typed in a program from a magazine that sampled sounds from the cassette player so I guess that's how I did it.

One interesting thing I found was that I used a hack to allow the main game file loaded with CLOAD to auto run by writing RUN(Enter) into the keyboard buffer before calling it.

I have now checked where I got this idea from and it's from an old magazine I still found online and the code is submitted by a Daniel Wiik.

It can't be Dvik, right?

Anyway, any ideas where I would put this old game? At the current state it's a tape file in wav and castools doesn't seem to be able to convert it to cas even though everything is re-saved at 1200 baud.

بواسطة Totta

Expert (88)

صورة Totta

02-03-2023, 13:03

And here it is... in all it's (none) glory

https://youtu.be/px2YRXFkou8

بواسطة defdanny

Scribe (391)

صورة defdanny

02-03-2023, 14:26

Voice samples output in a BASIC game proggy? Thats the most remarkable feature! nice resurrection, Totta!

بواسطة skumlerud

Resident (58)

صورة skumlerud

02-03-2023, 15:04

Lucky you. I sold my 728 when I bought an Atari 520 in 1988, when I bought it back a couple of years later all the tapes were missing so all my hard work from 1985 to 1988 is lost forever.

Btw. I'm pretty sure that I used the same sample routines myself Smile Typed in from a listing published in Hemdator Hacking, IIRC there were routines for both sampling (from tape) and playback.

صفحة 1/2
| 2