Login
Back to forumReply to this topicGo to last reply

Posted By

seff
on 2021-03-25
07:32:21
 Full Throttle in YAPE/plus4emu Programmatically?

Would it be possible to implement a full throttle from within emulators (programmatically)?
In YAPE, I can enable/disable the throttle through GUI (Alt + W).
But then using the keyboard/joystick becomes impossible.

I have a few basic programs from the past, mostly performing 2D/3D computational tasks, drawing lines and they are tremendously sluggish.
In order to run them faster, I used to switch to the NTSC and blank screen mode:


REM ### FAST ###
POKE65287,PEEK(65287)OR64
POKE65286,PEEK(65286)AND239
RETURN

REM ### SLOW ###
POKE65287,PEEK(65287)AND191
POKE65286,PEEK(65286)OR16
RETURN


I propose to implement something like this in YAPE/plus4emu:


### ENABLE FULL THROTTLE
sta $FF20
### DISABLE FULL THROTTLE
sta $FF21


It would be a similar concept to $FF3E/$FF3F RAM/ROM enable.
Of course, it would present an artificial functionality not existing in real hardware and one should have the option to enable/disable it.

What do you reckon?

Posted By

gerliczer
on 2021-03-25
08:19:14
 Re: Full Throttle in YAPE/plus4emu Programmatically?

I think I met programs that use the RAM in the unused part of TED's register space. Those could trigger this feature inadvertently. That solution is not endorsed by me.

Almost anything can be programmed but there are things that are better not be done. Emulators are for replicating behaviour of existing hardware. If you start extending them into directions incompatible with real life computers then why the compatibility at all? You could build some fantasy computer instead. Or program existing ones like TIC-80 (https://tic80.com/) or PICO-8 (https://www.lexaloffle.com/pico-8.php).

Posted By

zbyti
on 2021-03-25
09:08:11
 Re: Full Throttle in YAPE/plus4emu Programmatically?

Yes, gerliczer is right.

Posted By

SVS
on 2021-04-01
07:40:53
 Re: Full Throttle in YAPE/plus4emu Programmatically?

This is not a new problem, but I am happy to take it back.
Neither YAPE itself nor all emulators are not even a true original Plus4, if we just want to ask the question on a philosophical basis.
On the contrary, I consider positive if the code could (if desired) interact with the emulator. For the price of a flag (compatibility or more functionality), the programmer might have a new universe open to write programs. This solution could really preserve the life of our beloved machine!
Now, if one of us wants to write computationally heavy code or a lot of graphics (look: we talk about a new program) we are in doubt between writing it for Plus4 or for another platform (due to its speed). The ability to use an emulator feature could lead to the Plus4 option.
The question is, do we want to write programs to use them or just to honor the old days? Do we want a creative community or a museum?

I dream of being able to write code capable of asking the emulator for its current speed emulation. This simple functionality would allow the software to adapt to the running speed (clocks, timings, etc.).

Sorry for this long post, but IMO this matter is very important for the future of our community.
Thank you.

Posted By

gerliczer
on 2021-04-01
10:56:24
 Re: Full Throttle in YAPE/plus4emu Programmatically?

@SVS: There is a significant difference between "not achieved perfection, yet" and "doing something it never was and never will be capable of." Why would you call a program to be for Plus/4 if it cannot be (or only unbearably slowly) run on the real hardware?

Want higher performance in a Plus/4? Build and sell in reasonable quantities a compatible turbo card then ask the emulator authors to update their software. It is not a difference between "creative community" and "museum." People still write new software for these machines. Sometimes even you do. It is a difference between an emulation of something that exists and a fantasy computer. If we step onto that slippery slope there will be no stopping. First we want to have speed, next some nice features, then new capabilities and so on. Those emulators will not be emulators any more because there is nothing in existence they resemble to. Want a fantasy computer that somewhat looks like a Plus/4? Use Charlemagne's Turbo Vision 4 BASIC. Or you could fork either YapeSDL or plus4emu and turn it into your dream machine.

It is not a preservation of something when you use the original name and do something radically different from it. Want to preserve it? Write more programs for C16 and Plus/4 that those machines can run without any wished for but never existed capabilities. You have the knowledge and creativity. Use it and it will be a flourishing community instead of a museum.

Posted By

SVS
on 2021-04-01
13:03:49
 Re: Full Throttle in YAPE/plus4emu Programmatically?

@gerliczer:
I'm sorry you took my words in the negative. I have nothing against museums, nor against collections (me too I have other hobbies that involve to collect items). Definetely they are respectable activities.
Let me explain better my thinking. For example, my current project with the Plus4 is program with heavy calcoluses that could imply more years (yes years) to complete the running. Of course I write it with CBM-Prg-Studio and I test it with Yape. Well CBM-prg-studio is not the original Plus4 editor, and Yape is not the real iron.
Since I love the Plus4 I don't want to write it in another platform like a PC. But how could I to write and overall to test it just using a real Plus4? (All this even if the produced code will be compatible with Plus4).
I hope you understand my position and thank you to have shared your opinion.

Posted By

seff
on 2021-04-03
02:56:23
 Re: Full Throttle in YAPE/plus4emu Programmatically?

Frankly I didn't expect such resistance to my proposition (RFC for full throttle in YAPE/plus4emu).
Everybody has got the right to express his/her opinion.
My stance is that this is an emulator and we already interact with the emulator in many ways that were not possible in the past:

- 1551 IEC level/performance emulation (speed)
- copy/paste (keyboard input, screen copy)
- full throttle (speed)
- monitor (read/write access to the memory and CPU attributes on the fly)

It's 2021 and we develop software using IDEs, CBM Program Studio, cross-platform Pascal compilers like Mad Pascal and what have you in the comfort of your home with a flat screen 27" digital monitor.

In my view the ability to develop new software is of utmost importance and will help the Commodore Plus/4 World community thrive in the next decade.

Posted By

RoePipi
on 2021-04-03
05:42:51
 Re: Full Throttle in YAPE/plus4emu Programmatically?

@seff Yes, but these are all user-initiated options, I mean, we, the users ask the emulator to do it. We can't let a program change the settings, it's like opening Pandora's Box. Not to mention those programs which use certain TED area as storage (or, just change some bits together with others because of simplicity). I would, however, let the user decide, but I wouldn't turn on such thing as default.

Posted By

seff
on 2021-04-03
07:05:45
 Re: Full Throttle in YAPE/plus4emu Programmatically?

@RoePipi I thank you for your consideration.
This could be located in YAPE in "Settings/Advanced settings" under "Emulation settings" and named as "Debugging window".
I proposed $FF20/$FF21 because I didn't know any better. Of course, make it least intrusive, minimally aversive.
I understand it would be user-initiated in options and disabled by default.
At the same time, the source code would have to clearly state that this is for debugging purposes only.

Posted By

SVS
on 2021-04-03
09:24:33
 Re: Full Throttle in YAPE/plus4emu Programmatically?

I agree with last seff post.
I can only propose a single byte written by Yape initializing (say $FF22), with the values:
FF = standard speed (100%) - this is the current value of the cell inside a real Plus4.
02 = 200%
03 = 300%
00 = Warp (% is depending by the PC speed)

This would make easy for the user program to test whether the emulator is running in standard mode or in one of the acceleration modes. I don't believe that this single writing affects compatibility with all the existing programs. If the user code does not need its information, nothing happens.
But even if you use a special program that actually uses the $FF22 cell, you run it with Yape at 100%, and it will find the cell with the standard $FF value as it expects.

Posted By

somguy
on 2021-04-15
08:38:08
 Re: Full Throttle in YAPE/plus4emu Programmatically?

Wha's the point of retrocomputing if you hack the emulators so that your programs do things that no real hardware could eve do? At that point you're promoting the 'brand' or 'tribe' of retrodevice in name only.

Seems to me we're hitting a point when all the software produced for these old devices is spit out of cross-development platforms using pre-written libraries and graphics/sound tip-ins prepared on modern machines using tools/methods that were technically impossible when the "retro" devices were in their heyday. This change will inevitably result in those same cross-developing programmers ALL saying "this requires programmatic 'turbo mode YAPE extensions', at which point what does this hobby become?

Posted By

SVS
on 2021-04-15
09:41:52
 Re: Full Throttle in YAPE/plus4emu Programmatically?

I understand your point of view, and respect your opinion of preserving the purity of the software.
Let me clarify better. What some of us require, always optionally of course, is the ability to speed up dead times and low I/O speed. I don't think anyone wants new features, pre-written libraries or anything else.
If today someone wants a program to use it in everyday life, he would have the possibility to choose to write / use it on Plus4 (or Emulator). I'm sure all of us nerds happy use utilities, organizers, spreadsheets, etc. everyday. Why we don't use the Plus4 versions of them? Maybe if they were easier to load and faster we, Plus4 fans, would use them.

An example. Some genius' here at Plu4world has planned and built a SID expansion for the Plus4. Very nice ... but its code is not working inside the original hardware ... is this wrong?

In my opinion, we would find even more fun and will definitely keep our Plus4 alive.

Posted By

gerliczer
on 2021-04-15
13:24:34
 Re: Full Throttle in YAPE/plus4emu Programmatically?

Your analogy is wrong SVS. The code for SID expansions is perfectly running on the original hardware.

What you say is equivalent with someone not having a 1551 drive saying that any programme written specifically for those drives not working in the original machine. Nonsense.

Saying that a program requiring an imaginary feature to finish running in some bearable time instead of spending years (*) on a real machine is capable of running on an original computer fits your analogy much better.

* see your 2nd post on 1st of April

Posted By

Mad
on 2021-04-16
05:07:01
 Re: Full Throttle in YAPE/plus4emu Programmatically?

I got no opinion about this topic. But there are two things which may be considered.

1. Perhaps a software side fastmode enabling could be helpful for coding bigger projects. Not 100% sure about that, though..
2. You have to consider the opinion of Gaia about that. Without him this whole topic makes no sense at all.

And maybe 3. this option would be no problem for anyone if it would be implemented, if not it could just be disabled. (someone said that already I think..) But the implementation could be tricky, don't know about the implications for the emulator developer here..

Interressting topic/read already.. :)



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024