# Basic course for newbies

صفحة 9/11
2 | 3 | 4 | 5 | 6 | 7 | 8 | | 10 | 11

here is some basic program I made in 2008 for the MSXDev (listing included). I later made the same game in assembler (also with included listing)

Thanks! I will check it!

Edoz:
`390 TIME=0:FOR I=0 TO 8:I=TIME:NEXT I`
That line makes no sense, please recheck the post I did about TIME. Or explain what you're doing here

I think the time is needed for the delay, so the delay is on every msx machine
the same, so in this case not to fast on a turbo-r, so the response on a normal msx 2 or 7 MHz, or turbo-r, Act the same in speed.

I understand what you're trying to do, but a for next loop is not the best way to do it. It also is not really clear. Besides that, I don't think a delay of 8 milliseconds is going to make a lot of difference. Why not simply try

```390 TIME=0
391 IF TIME<50 THEN 391  ' wait a second, adapt to 60 if on 60 Hz
```

That loop is a very complicated way of doing things...

Why not do it like I wrote it in my post? (Repeated in Poltergeist's post, but there the delay seems very long.)

Manuel wrote:

Edoz:
`390 TIME=0:FOR I=0 TO 8:I=TIME:NEXT I`
That line makes no sense, please recheck the post I did about TIME. Or explain what you're doing here

You can't blame Edoz here... That was my change... Although this is more like habit, there is a reason behind it: Many times I want to know how fast the routine is actually working and I do that by adding "'" as REM in front of the timing line. Then I make changes to speed things up and remove the REM. How ever I also tend to write RENUM very often, so if I use GOTO on timing line while it is commented out I usually have to fix the linenumber as well... So... in the end it is related more to my coding style than functionality.

NYYRIKKI wrote:
Manuel wrote:

Edoz:
`390 TIME=0:FOR I=0 TO 8:I=TIME:NEXT I`
That line makes no sense, please recheck the post I did about TIME. Or explain what you're doing here

You can't blame Edoz here... That was my change... Although this is more like habit, there is a reason behind it: Many times I want to know how fast the routine is actually working and I do that by adding "'" as REM in front of the timing line. Then I make changes to speed things up and remove the REM. How ever I also tend to write RENUM very often, so if I use GOTO on timing line while it is commented out I usually have to fix the linenumber as well... So... in the end it is related more to my coding style than functionality.

At least I was understanding it .. I use renum also very often indeed!

@Edoz: About speeding up the lookup of filenames: Do you need all the files, or just the files with a certain extension? If you (for example) only need files with the extension .ldr, you could replace the three questionmarks at the end with ldr. This way, not all files are indexed, and that should speed up things.

The plan is to make a loader for the playsoniq. So basically, ROM files and SMS files. The current loader for the playsoniq is functional but there Is a need to type in the filename manually and to set the settings for the playsoniq every time you load sega/sms game. So the plan is to have a simple basic tool for that And to learn some basic! I want to save settings for each game, and maybe also the full game name, because the 8 positions make it hard to find out which game it is.

So, if have a lot of SMS files and MSX files. So to speed things up it would be a good idea. Next problem I have to solve is that you can browse to subfolders and change the drive. (when there is dos2) And I have to find something in the situation where there are more files, that fit (displayed) on the screen. Scroll them ? or make pages or something like that. Maybe it's to hard for a first basic program But I have some fun!

صفحة 9/11
2 | 3 | 4 | 5 | 6 | 7 | 8 | | 10 | 11