How to use PSGTOSCC with YS?

Page 2/3
1 | | 3

By vanfanel

Champion (446)

vanfanel's picture

19-03-2011, 22:54

If I do

60 r=usr(s$)

I get a type missmatch error in 60
I'm not a basic programer Sad

By ARTRAG

Enlighted (6923)

ARTRAG's picture

19-03-2011, 23:13

untested
do you do this?

10 BLOAD"PSG2SCC.BIN",R:R=USR(&HF87F)
20 FOR R=0 TO 31
30 S=SIN(ATN(1)*R/4)*127 ' Note: S is a SNG or DBL, not an INT here!
40 S$=S$+CHR$(INT(S)AND255)
50 NEXT
60 r=usr(s$)

?

By vanfanel

Champion (446)

vanfanel's picture

19-03-2011, 23:17

Yes, and I get:

Type missmatch in 60

By ARTRAG

Enlighted (6923)

ARTRAG's picture

19-03-2011, 23:54

change &HF87F to &HF000 or in lower addresses

By ARTRAG

Enlighted (6923)

ARTRAG's picture

20-03-2011, 00:39

you ccould in any case use openmsx and run toggle_psg2scc and toggle_scc_editor from the commandline
Tongue

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

20-03-2011, 11:36

The example is actually tested. I think the "type missmatch" means that you have typed the program in incorrectly.
I suggest that you use copy/paste to move the BASIC program to empty text file and use LOAD-command to load the text file. This should get rid of all possible typing errors. Make also sure that the SCC is attached correctly.

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

20-03-2011, 11:44

@ARTRAG:


30 S=SIN(ATN(1)*R/4)*127 ' Note: S is a SNG or DBL, not an INT here!

MSX-BASIC does needed number type conversions (DBL -> INT in this case) automatically.

change &HF87F to &HF000 or in lower addresses

&HF000 sound like very bad address to use. Usually games don't use the functionkey definitions to anything so the &HF87F should be safe.

By sd_snatcher

Prophet (3642)

sd_snatcher's picture

20-03-2011, 15:46

What's the difference between the PSG emulator for SCC and the PSG2SCC?

By vanfanel

Champion (446)

vanfanel's picture

20-03-2011, 22:05

@NYYRIKKI: as you can see here:

http://www.flickr.com/photos/50145424@N03/5544440128/

your example doesn't work for me... I've taken it directly from the textfile PSGTOSCC.TXT
As you can see, the textfile loads fine under BASIC as you said (after adding the line numbers and deleting the rest of the text file)
but it can't run well because it has errors. So please verify it again...

thanks

By vanfanel

Champion (446)

vanfanel's picture

26-03-2011, 02:42

@NYYRIKKI: could you take a look at my screenshot, please?

Page 2/3
1 | | 3