Re: [Freedos-devel] New retro CPU simulator game

2022-11-11 Thread Jim Hall
On Thu, Nov 3, 2022 at 4:35 PM Jim Hall  wrote:
>
> I wrote a new game over the weekend, as part of Open Jam 2022. My game
> is a retro CPU simulator where you enter programs in machine language
> (binary opcodes) using a "switches and lights" model. It is meant to
> be a minimal instruction set computer, used for learning about how
> computers work. I call it the Toy CPU.
>
> The Toy is a DOS program that runs in graphics mode (640x480 @ 16
> colors). Keyboard only. No sound.
>
> The Toy is released under the MIT license, on GitHub:
> https://github.com/freedosproject/toycpu
>
> My GitHub page also includes several sample programs you can enter
> into the Toy. Release 3.0 contains a precompiled DOS program you can
> run.
>
> If you'd like to see it in action, check out this video:
> https://www.youtube.com/watch?v=IptoyRCRYFU
>
> Here's the entry on Open Jam:
> https://itch.io/jam/open-jam-2022
>[..]


Follow-up on this:

The Toy CPU Simulator ranked #2 on the Open Jam! Of course, voting was
very low. But it's still exciting to see a DOS game do this well.

https://itch.io/jam/open-jam-2022/results


What it is:

I teach some university classes part-time, and this year I wrote a
simulation of a simple CPU, to help my "100-level" ("intro-level"
non-computer science) students understand how computers work, and how
programming works. The prototype compiled on Linux with ncurses. The
new version is a DOS program that runs in graphics mode.


___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Toggling directories

2022-11-11 Thread Bret Johnson
In general, I find that toggling options are a bad idea.  Things just get too 
confusing, especially if you have multiple "sources" for the options (like 
combinations of internal/compile-time default settings, environment variables, 
options entered through a batch file, options entered via a command-line, 
etc.).  It just gets too confusing to keep track of whether in total you've 
entered an even or odd number of "toggles".

I usually set up my programs so that there is a +/- or yes/no "sub-option".  
Rather than toggling, there is an "override" or "priority" process of which 
option to use.  For example, an option provided through an environment variable 
takes priority over a default/internal option -- it does not "toggle" the 
internal option but rather completely overrides it.  Similarly, an option 
entered on the command-line takes priority over an option provided through an 
environment variable.  I find this approach much less confusing than toggling.


___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Toggling directories

2022-11-11 Thread Steve Nickolas

On Fri, 11 Nov 2022, tom ehlert wrote:


virtually all options toggle, but someone probably noted that /P
should not toggle, because even after

 set DIRCMD=/P

 DIR /P

should still pause.

MSDOS probably has not toggling at all (I'm not sure; someone who is not
named Tom should test this), and optScanBool() should be replaced by
optScanBool2() all over FreeCOM.


Checked with PC DOS 2000:

DIR /P/P = page mode is active.

SET DIRCMD=/P
DIR = page mode is active.

SET DIRCMD=/P
DIR /P = page mode is active.

SET DIRCMD=/P
DIR /-P = page mode is not active.

DIR /P/-P = page mode is not active.

-uso.


___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Toggling directories

2022-11-11 Thread tom ehlert
Hallo Herr Jerome Shidel,

am Mittwoch, 9. November 2022 um 16:26 schrieben Sie:


> Not all options perform toggling. For example:


> dir /p  - pauses per page
> dir /p /p   - pauses per page


> I don’t think the toggling is very important. But, it does deviant from 
> MS-DOS.
> I do think that consistency across the options is important.

as Aitor said:"To me this is a bug. Not a major one, but a bug."

if you look at the source (cmd\dir.c)

...

optScanFct(opt_dir)
{
  (void)arg;
  switch(ch) {
  case 'S': return optScanBool(optS);
  case 'P': return optScanBool2(optP);  /* multiple uses, /P /P, do not cancel, 
only /-P */
  case 'W': return optScanBool(optW);
  case 'B': return optScanBool(optB);



virtually all options toggle, but someone probably noted that /P
should not toggle, because even after

  set DIRCMD=/P

  DIR /P

should still pause.

MSDOS probably has not toggling at all (I'm not sure; someone who is not
named Tom should test this), and optScanBool() should be replaced by
optScanBool2() all over FreeCOM.

Tom





___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel