Page 32 of 42
Re: QL Tinkering
Posted: Fri Aug 09, 2024 6:17 pm
by qbits
Hi all,
The QBITS PIXEL Art project: Two steps back one step forward. The progress on Action with the final step to produce a Playable Retro Game is going to take a little longer. What I have put in place are some further extensions to the SPRITE and SCREEN background designs.
SPRITE Bitmap files are Loaded or Merged with a previously loaded _bmp file. Bitmaps of the Merged file are appended to any spare Frame slots. In this way SPRITE’s can be swapped between files. SCREEN background Tiles can now be set to 8x8 12x12 16x16 20x20 or 24x24 Tile sizes.
Mark Thanks for the details on the Notes [dur del BMP] I will see how they match my own attempts and get back to you [time being available].
Steve had a quick look at your Prog haven’t had time to review it properly. Did you use Marq’s BEEP Pitch Frequencies or your own.
QBITS
Re: QL Tinkering
Posted: Fri Aug 09, 2024 8:17 pm
by Mark Swift
Hi Qbits,
...impressive as ever.
qbits wrote: Fri Aug 09, 2024 6:17 pm
Mark Thanks for the details... [time being available]
One more bug in QBITS_QLSoundSE...
Line 1664 of KLoad, fails to read in mn% from saved Score files due to an end of file error.
The issue leaves eck% holding a value of 1 which causes the next Load Score to fail signalling "File Not Found".
The issue can be confirmed by modifying line 1664 as follows:
Code: Select all
1664 INPUT#99,bn%\mn%:CLOSE#99:mn%=(mn% DIV 10)*10:IF eck%=1 THEN CURSOR 12,36:PRINT 'File Error...':eck%=0
The end of file bug is due to line 1685 of KSave which outputs beat and tempo values to file using a comma separator.
This causes the beat and tempo to be wriiten to file like this:
instead of like this
Change line 1685 as follows to fix the KSave bug.
Code: Select all
1685 PRINT#99,bn%:PRINT#99,mn%:CLOSE#99
Finally, here's a fixed version of QBS_ScoreDemo.
The original version contains half and quarter note durations that are rounded to the nearest integer due to the earlier nv% bug. Beat and tempo were also written to file incorrectly.
Thanks
Re: QL Tinkering
Posted: Fri Aug 09, 2024 8:28 pm
by stevepoole
Hi Qbits,
To establish the keyboard pitches, back in the late eighties, I tuned my keyboard by ear, against a school recorder in 'C'. Lower octaves could then be determined by ear in relation to the higher tones. But you will note that one pitch is missing in the highest octave : The QL has no such Beep frquency, so the note is 'rest'ed.
The tempos were taken from a standard website. The time signatures allow for '1/4' but I have yet to get certain rare ones figured out.
My scoresheet is probably too generous, as the lower notes are almost indistinguishable. Yours is probably quite adequate.
A two-note keyboard was developed to allow 'duo' scores to be played, (trilling, not two-pitch timbres). Indeed you can Trill timbres too !
Frustrated by not being able to play demisemiquavers and rests, I abandoned 'BEEP duration, pitch' for 'Beep 0,pitch: wait(delay)', which is far more accurate, and machine compatible... (See the music demo accessed by pressing TAB).
Now I am on vacation, I will have time to study your code in detail and will report back. Regards, Steve.
Re: QL Tinkering
Posted: Sat Aug 10, 2024 2:21 am
by bwinkel67
qbits wrote: Fri Aug 09, 2024 6:17 pm
Hi all,
The QBITS PIXEL Art project: Two steps back one step forward. The progress on Action with the final step to produce a Playable Retro Game is going to take a little longer. What I have put in place are some further extensions to the SPRITE and SCREEN background designs.
Tried to run it on QLay with 8MB of RAM and get an error message on line 1011 saying "out of memory" after taking a long time to read the config file. Also, this is the config file I found, since it wasn't included in this zip file:
Code: Select all
0
0
dos1_QBITSProgs_bas
dos1_
8
15
win1_
win2_
win3_
win4_
win5_
win6_
flp1_
flp2_
dos1_
dos2_
dos3_
dos4_
dos5_
dos6_
dos7_
dos8_
Not sure why the program needs all of that. I'm running it form mdv2_ and win1_ and don't have flp or dos defined. I also don't have QBITSProg_bas.
What are the resource requirements for this program and why is the config file needed? I've had success running one of your other programs only from mdv on a BBQL and was wondering if this one could be run in a similar form.
Re: QL Tinkering
Posted: Sat Aug 10, 2024 4:30 pm
by qbits
hi,
Mark
Thanks again for your code checks – KLoad line 1664 ‘ \ ‘ KSave line 1685 ‘ , ‘ .at some point got swapped.
Mark and Steve
QLSounds Research Notes: They say Timing is everything,
A normal resting heart rate should be between 60 to 100 beats per minute, and can vary from minute to minute dependant on age and general health. Music has a recurring pulse, or beat and usually in the range of 60–100 beats per minute BPM. 1 beat = 1 quarter note. 1 quarter note = 1 metronome beat at 90 BPM (so 1/90*60 = 670 ms/beat. QL SuperBASIC keyword PAUSE 33.[ 33*20=660ms ].
QBITS QLSounds decision was built around a quarter beat being in the order of 180ms including dur & del.
Bwinkel67
QBITS_PIXArt_ can run stand alone with dev$ on line 1002 set to defaut drive ie mdv2_
If you run QBITSBoot the Config details need to be changed to reflect you local requirements.
QBITS
Re: QL Tinkering
Posted: Sat Aug 10, 2024 10:39 pm
by bwinkel67
qbits wrote: Sat Aug 10, 2024 4:30 pm
Bwinkel67
QBITS_PIXArt_ can run stand alone with dev$ on line 1002 set to defaut drive ie mdv2_
If you run QBITSBoot the Config details need to be changed to reflect you local requirements.
There's little information that I've found on the Config file. Could you help create one for a BBQL using microdrives? From that kind of baseline I'll be able to understand the config file better and then customizes to anything.
Re: QL Tinkering
Posted: Sun Aug 11, 2024 4:25 am
by bwinkel67
I was debugging the QBITS_PIXArt program a bit more to figure out why it was running out of memory. So the first line with DIM statements already causes the problem:
Code: Select all
1011 DIM FG(32,64,64),TG(64,64),File$(50,20),CP(15),BEEP$(4,34)
This gave an "out of memory" error with the following emulators/configuration:
- QLAY, JS ROM, TK2, 8MB RAM
- QLAY, JS ROM, TK2, 640K RAM
- Q-Emulator, JS ROM, TK2, 368K RAM
So then I just tried the first DIM statement:
This, again, gave "out of memory" error on all the same emulators/configuration:
- QLAY, JS ROM, TK2, 8MB RAM
- QLAY, JS ROM, TK2, 640K RAM
- Q-Emulator, JS ROM, TK2, 368K RAM
Looking at how much memory the first DIM statement requires, it ends up using 131,072 number entries. How many bytes per number does the QL set aside? Is it 6 bytes (i.e. 48 bits)? if so, then that's 786,432 bytes so it would need at least 1MB to run. So it failing in 640K and 368K makes sense, though I'm not sure why 8MB wouldn't be enough. Can someone explain to me here what's going on?
Plus, there are two more lines of DIM statements which seem pretty big as well:
Code: Select all
1012 DIM Tile(60,24,24),TAss(120),TScn(9,40,24),WScn(20,12),TMap(9,4),SK(9,20)
1013 DIM TAS$(9,6),RGN$(13),fnt$(9,8),CP(15):FOR i=0 TO 7:CP(i)=i
So, how much total memory does this program require to run?
Re: QL Tinkering
Posted: Sun Aug 11, 2024 10:25 am
by qbits
bwinkel67
QBITS PIXArt is memory hungry because of the present format of the bitmaps. The development has been with QPC2 Emulator and SMSQ/e. I have it working with a min 3MB with QPC2. Future compatibility with other QL Platforms is on my to do list.
I might be wrong but recall JS ROMs have a max of access to 896KB memory.
QBITS
Re: QL Tinkering
Posted: Sun Aug 11, 2024 11:06 am
by bwinkel67
qbits wrote: Sun Aug 11, 2024 10:25 am
bwinkel67
QBITS PIXArt is memory hungry because of the present format of the bitmaps. The development has been with QPC2 Emulator and SMSQ/e. I have it working with a min 3MB with QPC2. Future compatibility with other QL Platforms is on my to do list.
Ok.
qbits wrote: Sun Aug 11, 2024 10:25 am
I might be wrong but recall JS ROMs have a max of access to 896KB memory.
Hmm, also tried it on Minerva (198) with same result on QLAY. Maybe it's an emulator issue.
Re: QL Tinkering
Posted: Sun Aug 11, 2024 12:53 pm
by Andrew
Hi Qbits
I played a bit with your program and it is really nice and packed with features. It took me some time to draw a sprite, as the interface is cluttered and for a while I was lost, but I got the hang of it.
It seems that it needs a minimum resolution of 512x384 pixels to start. Looking at the picture from page 59 it might need more than that (your doc starts with page 58, so 59 is the second page)
What's the best resolution to run the program?
ALT commands do not work on my Windows PC. (ALT and arrows rotate the Windows display

)
The BMP file saved is not really a bmp format file, so the extension is misleading.
Next I will try to create a Tile map.
Maybe you can upload some sprites and tile maps for us to play with.