How to use PSGTOSCC with YS?

Страница 1/3
| 2 | 3

By vanfanel

Champion (446)

Аватар пользователя vanfanel

19-03-2011, 02:29

Hello there again!

I just discovered this interesting program: in theory, it makes some PSG games use SCC instead! Wow!
So I'm in for a little SCC Ys or Penguin Adventure: is it really possible?

So far, I wrote my BAS loader like this:

10 BLOAD"PSG2SCC.BIN",R:R=USR(&HF87F)
20 for r=0 to 31: s$=s$+chr$((sin(atn(1)/4*r)*127)and255)

...but I keep getting "type mismatch in 20" errors.

Is there a .com version for msx2+?
Could you at least provide a ready-to-use BAS loader, NYYRIKKI?

I don't want to fight with basic...

thanks!

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By luppie

Paladin (869)

Аватар пользователя luppie

19-03-2011, 03:21

i'm not an expert, but if you use FOR, should'nt you also use NEXT ??

By meits

Scribe (6530)

Аватар пользователя meits

19-03-2011, 03:30

Yes... But not having a NEXT shouldn't cause an error... The program will just stop after the first loop...

By AuroraMSX

Paragon (1902)

Аватар пользователя AuroraMSX

19-03-2011, 09:40

10 BLOAD"PSG2SCC.BIN",R:R=USR(&HF87F)
20 for r=0 to 31: s$=s$+chr$((sin(atn(1)/4*r)*127)and255)

I think you need to convert the value of your expression to an INT before doing the 'AND 255'.

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

(Untested)

By ARTRAG

Enlighted (6923)

Аватар пользователя ARTRAG

19-03-2011, 10:30

tested: it works

By vanfanel

Champion (446)

Аватар пользователя vanfanel

19-03-2011, 12:46

It works here in the sense that no errors are reported with the code provided by AuroraMSX, but the sound is the same: No differences in games sound with this TSR loaded.
Tested with Ys and Penguin Adventure. They sound the same..
Have you tested it with any games?

By ARTRAG

Enlighted (6923)

Аватар пользователя ARTRAG

19-03-2011, 17:18

I do not know the program but it is hard to make it work with new waves without passing the new data you generate ;-)
Seriously, be sure to read carefully the was psg2scc works, the problem is there

By vanfanel

Champion (446)

Аватар пользователя vanfanel

19-03-2011, 18:07

I believe those lines are to generate waves and then pass those waves to it:

30 S=SIN(ATN(1)*R/4)*127
40 S$=S$+CHR$(INT(S)AND255)

So it should work. I've read the docs carefully and it should work like that. But it does not.

By ARTRAG

Enlighted (6923)

Аватар пользователя ARTRAG

19-03-2011, 21:00

read better
you have to do USR(s$) to pass the data

By vanfanel

Champion (446)

Аватар пользователя vanfanel

19-03-2011, 21:27

@ARTAG: So what would the missing line look like exactly? Big smile

By ARTRAG

Enlighted (6923)

Аватар пользователя ARTRAG

19-03-2011, 21:52

from the psg2scc manual

Change all SCC sounds to SIN wave:
for r=0 to 31: s$=s$+chr$((sin(atn(1)/4*r)*127)and255):next r:r=usr(s$)

you miss r=usr(s$)

Страница 1/3
| 2 | 3