Login
Back to forumReply to this topicGo to last reply

Posted By

Csabo
on 2010-01-05
08:17:53
 First Release Of 2010!

HN2010YCLitwr is here to surprise all of you with a little demonstration of the graphics capabilities of the Plus/4:
Happy New Year!

I have to humbly present my first and probably the last demo: HN2010YC. The presented dot drawing subroutine is about 5-6 times faster than BASIC PAINT and maybe several hundreds times faster than BASIC DRAW for single dots. Excuse me absence of sound and other effects. This demo is still raw but if I begin to polish it then it would be probably never released.


Posted By

Litwr
on 2010-01-05
03:41:21
 The fast drawing methods

Happy New Year! happy happy
I have to humbly present my first and probably the last demo. It is at the bottom of
http://litwr.narod.ru/plus4.html
The presented dot drawing subroutine is about 5-6 times faster than BASIC PAINT and maybe several hundreds times faster than BASIC DRAW for single dots.
Excuse me absence of sound and other effects. This demo is still raw but if I begin to polish it then it would be probably never released. ;-(
I don't know how to upload it to our emucamp. However if it is worth it then I will be ready to perform appropriate procedures. wink

I have to express many thanks to the author of plus4emu --- I worked under Linux and it was the only choice. I also find the 'compress' utility very useful. However I've found some problems of 'plus4emu' 1.2.9.2:

1) wrong noise generator
2) F8 (load programs) and other dialogs didn't set proper focus position for ENTER --- so I had to use mouse (or several TAB keystrokes) every time. IMHO ENTER should always close dialog with selected program. Someone may use SPACE for the selection itself.
3) the debugger shows only whole status word but it would be more convinient to show also every single flag status
4) debugger blanks plus4 screen
5) the feature "mouse sets cursor position" is interesting but a bit annoying. IMHO it should be a way to disable it.
6) the name 'compress' conflicts with name of old Unix utility --- maybe 'p4compress' or something like this would be better?
7) no PETSCII (or even ASCII) in the debugger dump. Maybe the dump buttons should be at the bottom of memory dump area?

Posted By

IstvanV
on 2010-01-05
11:28:46
 Re: First Release Of 2010!

Unfortunately, I do not currently develop the plus4emu package since version 1.2.9.2, and the SourceForge project is now maintained by someone else, so I cannot promise if the problems you reported are going to be fixed. However, some of these have already been dealt with in ep128emu which is still in active development, and the changes could be ported back.
- what is exactly wrong about the noise generator ? I recall checking that it matches the real machine accurately (same pseudo-random pattern, etc.), but maybe it is broken in some way I do not know about ?
- the debugger issues (status flags, screen blanking, and ASCII dump) are fixed in ep128emu (see http://www.sharemation.com/IstvanV/epdebug.png), and could be ported, together with other related changes (no screen blanking on pause, debugger window not flickering when using the step buttons, etc.)
- if you compile from source, the setting of cursor position by mouse click can be removed by commenting out line 919 of gui/gui.cpp; also, there are a few ways to avoid it without changing the code: use the shift key while clicking on the window, click on border areas, enable the light pen (it disables cursor positioning/copying/pasting with the mouse), or switch to a display mode (with F9) that has no menu and mouse cursor
- you are right about the "compress" name - in fact, I think the utilities are already renamed in some RPM builds of the emulator; by the way, this utility also has some updates/improvements in the EP128 version "epcompress"
- I did not code the file dialogs, they are part of the FLTK library, so they can only be changed by modifying FLTK (on Windows, they are already replaced with native dialogs)

Posted By

NinjaDRM
on 2010-01-05
12:09:39
 Re: First Release Of 2010!

IstvanV: Porting back the fixes for the debugger issues would be highly appreciated! I remember also "suffering" from the black plus4-screen while debugging. Would it be much work?

Posted By

IstvanV
on 2010-01-05
13:13:15
 Re: First Release Of 2010!

Well, maybe I could try it when I have the time, but not sure yet. After a quick look at the difference between the source code of the emulators, I found the following changes that might be usable in plus4emu:

- in the debugger, individual CPU flags and ASCII format memory dump are also displayed
- new debugger button for inserting a simple Lua script template
- new "step" type buttons in the debugger: "step into", "return", and "step to"
- the debugger window does not immediately disappear when continuing emulation (fixes flickering on the use of step buttons)
- trace files created in the monitor may include the values of registers for each CPU opcode executed, but can also be made smaller by turning off the video position information
- screenshots are in BMP format instead of TGA (although RLE8 might not be suitable for the Plus/4, since there can be more than 256 colors with TED tricks)
- breakpoints/watchpoints can have a type of 'x', in addition to 'r' and 'w' (previously, the 'r' type was used for both data read and execute access); the "no break on data read" mode is removed
- display is not blanked while the emulation is paused or the debugger window is shown (at the expense of minor slowdown in "resample to monitor refresh rate" modes)
- higher quality PAL filter (10 taps/line FIR filter, 30 bit YUV texture), but also somewhat slower
- better error reporting for Lua scripts (the actual error and line number in the script are printed, rather than just popping up a "syntax error" or "runtime error" message); I am not sure if anyone actually used these, though
- file name extensions are automatically added by file dialogs, if not specified
- various changes/improvements to WD177x emulation (used also in 1581 drives)
- the efficiency of the "compress" utility is slightly improved and new features have been added

There are possibly more that I missed, and various minor ones that are not listed.

Posted By

SVS
on 2010-01-05
14:50:35
 Re: First Release Of 2010!

Litwr: faster than light! Congrats.

Istvan: pleeeeeease!

Posted By

register
on 2010-01-05
16:01:50
 Re: First Release Of 2010!

With some tutoring from IstvanV I could take care of some of these issues. I am the new maintaiiner of plus4emu and I have taken a look at the source that is very well written but a quite big project that needs some time to get hands on. As everyone else I have a job, a girlfriend and a life to live but i do C/C++ coding for a living. So I believe that with some help from IstvanV I can start to attack some issues.

Posted By

MMS
on 2010-01-06
14:37:39
 Re: First Release Of 2010!

Very, very, very fast... Congrats !

My old TFT monitor has some troubles to follow, this is how fast is that, haha happy

Posted By

NinjaDRM
on 2010-01-06
16:04:02
 Re: First Release Of 2010!

Istvan, register: Sounds promising. Personally, I'd be most interested in the debugger enhancements (well, except lua maybe). WD177x improvements can never hurt, as well as better packing... But you know, priorities are mileages happy

Posted By

IstvanV
on 2010-01-06
16:12:39
 Re: First Release Of 2010!

Lua scripts can actually be quite useful, it just takes some (not long) time to learn writing them, and it may not be obvious at first to most users how these are intended to be used happy

Posted By

Litwr
on 2010-01-11
01:25:54
 Re: First Release Of 2010!

[noise generator] Maybe I am wrong but SOUND3,1020,100 sounds unfamiliar for me. I found that YAPE sound is better fit my memory about +4 noise. However I don't have a real iron to test.

Posted By

MMS
on 2010-01-11
02:03:53
 Re: First Release Of 2010!

Noise is a noise, right? a little noiser does not hurt anyone... happy
Maybe it is pink or brown noise, not white, ha!

Posted By

IstvanV
on 2010-01-11
05:14:27
 Re: First Release Of 2010!

Well, I tried the above SOUND command, and did not notice any problems with it, with "high quality" enabled in the sound options, as it is by default. Maybe it is wrong in YAPE ? The last time I checked, it had worse sample rate conversion with more aliasing, and might have had problems with the very high frequency.
Or the difference could be related to the fact that I do not filter high frequencies as much, although you can change the equalizer in the sound options; I think YAPE emulates the RF (antenna) sound output by default, which is heavily lowpass filtered (-3dB cutoff at a few kHz). The frequency response of the audio output on the 8 pin A/V connector is close to linear in the audible range (drops only a few dB at 20 kHz), at least on my machine.

Posted By

Litwr
on 2010-01-13
00:31:37
 Re: First Release Of 2010!

[MMS] IMHO maybe that noise is not noisy enough for me. wink

Posted By

Litwr
on 2010-01-13
00:41:08
 Re: First Release Of 2010!

[IstvanV] I filtered plus4emu mentioned noise through filter which cuts all frequencies above 3KHz and I got almost pure sine! Yape is different here -- It produces more complex waves. I have serious doubts that behaviours of real +4 are close to this plus4emu picture...

Posted By

IstvanV
on 2010-01-13
08:31:44
 Re: First Release Of 2010!

The sound of the noise generator with a frequency value of 1020 should not be very complex, since it has a period of 221681 / 3 / 255 ~= 290 Hz, so it is not really "noise" at that setting. I have made a comparison of the emulators and a real Plus/4 using this program:
http://www.sharemation.com/IstvanV/plus4/p4noise.jpg
The recorded sound is in this archive:
http://www.sharemation.com/IstvanV/plus4/p4noise.7z
The contents are:
- plus4_48.ogg - the real machine, captured from the A/V output at 48000 Hz
- plus4_96.ogg - the real machine, captured from the A/V output at 96000 Hz
- p4emu_48.ogg - plus4emu-1.2.9.2 with the default settings
- p4emu_96.ogg - plus4emu-1.2.9.2 with 96000 Hz sample rate
- yape_48.ogg - YAPE 0.84, using the default settings (oversample = 1, sample rate = 48000)
- yape_48o.ogg - YAPE 0.84, with the oversample set to the maximum (8)
- yape_96.ogg - YAPE 0.84, 96000 Hz sample rate and 8x oversampling
Note that in the first YAPE file, the frequency seems to be clamped by the emulator, and not changing at all. The second has pretty bad aliasing, so that may be why you thought that it is "noisier"; however, it is not "noisy" on the real machine, so it is plus4emu which is correct. The 96 kHz YAPE file is somewhat better, but still not quite as good as plus4emu is already on 48000 Hz, and obviously different from the real machine.

Posted By

IstvanV
on 2010-01-13
08:41:35
 Re: First Release Of 2010!

By the way, the pitch of the noise generator also seems to be off by one (too high) in YAPE.

Posted By

IstvanV
on 2010-01-13
08:47:43
 Re: First Release Of 2010!

The resampling quality of YAPE is actually not as bad as I first thought, then, since I heard the most aliasing in the highest pitched note, which should not exist. Taking that into account, 96000 Hz is OK, and at 48000 Hz, only the 1020 one (that should really be at 1021) is bad with oversampling.

Posted By

IstvanV
on 2010-01-13
10:25:01
 Re: First Release Of 2010!

Update: I have replaced the archive with another one that includes .wav format audio, since the quality of the previous files was not very good due to the lossy compression. However, to keep the download size down, the 96 kHz versions are removed, with the exception of yape_96.wav (which is the only case where the 96 kHz actually made a significant improvement, the others were already good at 48 kHz). There is a new file, though: yape_48f.wav - this is 48 kHz with oversampling and corrected pitch.

Posted By

Litwr
on 2010-01-14
02:22:16
 Re: First Release Of 2010!

Wow!!! Thank you very much for this exhaustive and very interesting research! happy I hope that plus4emu 1.2.9.3 will be released soon. wink

Posted By

MMS
on 2010-01-14
17:15:12
 Re: First Release Of 2010!

Istvan, THAT was detailed...
I did not put so much efforts even into my GreenBelt project, haha happy

Posted By

NinjaDRM
on 2010-01-18
11:11:09
 Re: First Release Of 2010!

Istvan: I actually do imagine that LUA-scripts can be very useful. It would just not be too high on my personal priority list, as I don't do that much +4-development at the moment. Your mileage may vary, of course (and your word is surely stronger than mine in this case wink)



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon