Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #3206 > unrolled thread

Portal in Applesoft

Started byvince@pianoman.cluster.toy
First post2017-01-11 00:17 +0000
Last post2017-01-20 17:44 -0800
Articles 20 on this page of 25 — 13 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  Portal in Applesoft vince@pianoman.cluster.toy - 2017-01-11 00:17 +0000
    Re: Portal in Applesoft David Schmidt <schmidtd@my-deja.com> - 2017-01-10 22:39 -0500
    Re: Portal in Applesoft inexorabletash@gmail.com - 2017-01-10 20:54 -0800
      Re: Portal in Applesoft vince@pianoman.cluster.toy - 2017-01-11 18:09 +0000
        Re: Portal in Applesoft Michael J. Mahon <mjmahon@aol.com> - 2017-01-11 15:02 -0600
          Re: Portal in Applesoft Steve Nickolas <usotsuki@buric.co> - 2017-01-11 23:38 -0500
        Re: Portal in Applesoft inexorabletash@gmail.com - 2017-01-11 21:27 -0800
          Re: Portal in Applesoft inexorabletash@gmail.com - 2017-01-11 21:35 -0800
          Re: Portal in Applesoft D Finnigan <dog_cow@macgui.com> - 2017-01-12 18:44 +0000
            Re: Portal in Applesoft inexorabletash@gmail.com - 2017-01-12 19:00 -0800
              Re: Portal in Applesoft inexorabletash@gmail.com - 2017-01-12 19:07 -0800
          Re: Portal in Applesoft vince@pianoman.cluster.toy - 2017-01-13 02:14 +0000
    Re: Portal in Applesoft ultramagnus_tcv <mikew@thecomputervalet.com> - 2017-01-12 11:30 -0600
    Re: Portal in Applesoft Michael Lutynski <michael.lutynski@gmail.com> - 2017-01-13 23:19 -0800
    Re: Portal in Applesoft Oliver Schmidt <ol.sc@web.de> - 2017-01-17 10:06 +0000
      Re: Portal in Applesoft vince@pianoman.cluster.toy - 2017-01-17 15:21 +0000
    Portal in Applesoft cybernesto <cybernesto@gmail.com> - 2017-01-17 03:46 -0800
      Re: Portal in Applesoft vince@pianoman.cluster.toy - 2017-01-17 15:48 +0000
    Re: Portal in Applesoft laseractiveguy@gmail.com - 2017-01-17 05:37 -0800
      Re: Portal in Applesoft Michael J. Mahon <mjmahon@aol.com> - 2017-01-17 12:10 -0600
        Re: Portal in Applesoft Oliver Schmidt <ol.sc@web.de> - 2017-01-19 10:42 +0000
          Re: Portal in Applesoft Oliver Schmidt <ol.sc@web.de> - 2017-01-19 10:45 +0000
          Re: Portal in Applesoft gids.rs@sasktel.net - 2017-01-19 09:47 -0800
            Re: Portal in Applesoft Zellyn <zellyn@gmail.com> - 2017-01-19 10:12 -0800
    Re: Portal in Applesoft laseractiveguy@gmail.com - 2017-01-20 17:44 -0800

Page 1 of 2  [1] 2  Next page →


#3206 — Portal in Applesoft

Fromvince@pianoman.cluster.toy
Date2017-01-11 00:17 +0000
SubjectPortal in Applesoft
Message-ID<slrno7aufh.1ef.vince@pianoman.cluster.toy>
So I made a version of Portal for the Apple II (Portal as in the 2007
game, not the existing Apple II title).

It's in BASIC.  I originally started out just doing the "Still Alive"
end credits sequence, but then I noticed how the blue/orange technologies
in the game match the hires palette so I ended up implementing
a very short (but playable) version of the game.

As part of the work I wrote a program that takes music in GWBASIC-like
PLAY format and spits out Applesoft compatible music code.

The hardest part was getting sane results with HIRES colors.
Part of that was the fun of getting XDRAW with shape tables to generate
consistent colors.

Anyway a webpage here with the source code, disk image, and a few videos:

	http://www.deater.net/weave/vmwprod/portal/

Vince

[toc] | [next] | [standalone]


#3207

FromDavid Schmidt <schmidtd@my-deja.com>
Date2017-01-10 22:39 -0500
Message-ID<o549ar$5em$1@dont-email.me>
In reply to#3206
On 1/10/2017 7:17 PM, vince@pianoman.cluster.toy wrote:
> So I made a version of Portal for the Apple II (Portal as in the 2007
> game, not the existing Apple II title).
>
> [...]
>
> Anyway a webpage here with the source code, disk image, and a few videos:
>
> 	http://www.deater.net/weave/vmwprod/portal/

Bravo!  Nicely done!

[toc] | [prev] | [next] | [standalone]


#3208

Frominexorabletash@gmail.com
Date2017-01-10 20:54 -0800
Message-ID<bad25311-b4f2-4185-b345-3ba12469bae0@googlegroups.com>
In reply to#3206
On Tuesday, January 10, 2017 at 4:18:39 PM UTC-8, vi...@pianoman.cluster.toy wrote:
> So I made a version of Portal for the Apple II (Portal as in the 2007
> game, not the existing Apple II title).

Very nice! (Wishing for mouse support, though!)

Your series (!) really highlights that many of the groundbreaking games (like Portal) have core elements that are not dependent on the cutting edge technology of their release era. 

[toc] | [prev] | [next] | [standalone]


#3209

Fromvince@pianoman.cluster.toy
Date2017-01-11 18:09 +0000
Message-ID<slrno7ct9e.nvr.vince@pianoman.cluster.toy>
In reply to#3208
On 2017-01-11, inexorabletash@gmail.com <inexorabletash@gmail.com> wrote:
> On Tuesday, January 10, 2017 at 4:18:39 PM UTC-8, vi...@pianoman.cluster.toy wrote:
>> So I made a version of Portal for the Apple II (Portal as in the 2007
>> game, not the existing Apple II title).
>
> Very nice! (Wishing for mouse support, though!)

yes, the cursor is a bit of a pain.  You can fast scroll left/right with
U and O.

Is it possible to use the mouse from Applesoft?  I was actually thinking
of maybe using the joystick interface.

> Your series (!) really highlights that many of the groundbreaking 
> games (like Portal) have core elements that are not dependent on the 
> cutting edge technology of their release era.

Yes, I was surprised by how much of the original game concepts I could
get going without much effort.  It's a shame that all modern games have
to be 3D as it really makes things all that more complicated often without
much benefit to gameplay.

I'm actually enjoying coding in BASIC again, it's nice how quickly you
can prototype things as it only takes a few commands to get pixels
on the screen.  I am spoiled though by a full-screen editor, git,
an emulator, and a CFFA3000 card.  I wouldn't have wanted to code this
up with nothing more than a BASIC prompt and a book of graph paper like
I would have done 30 years ago.

Vince

[toc] | [prev] | [next] | [standalone]


#3210

FromMichael J. Mahon <mjmahon@aol.com>
Date2017-01-11 15:02 -0600
Message-ID<idydnfP42oH_AOvFnZ2dnUU7-cfNnZ2d@giganews.com>
In reply to#3209
<vince@pianoman.cluster.toy> wrote:
> On 2017-01-11, inexorabletash@gmail.com <inexorabletash@gmail.com> wrote:
>> On Tuesday, January 10, 2017 at 4:18:39 PM UTC-8, vi...@pianoman.cluster.toy wrote:
>>> So I made a version of Portal for the Apple II (Portal as in the 2007
>>> game, not the existing Apple II title).
>> 
>> Very nice! (Wishing for mouse support, though!)
> 
> yes, the cursor is a bit of a pain.  You can fast scroll left/right with
> U and O.
> 
> Is it possible to use the mouse from Applesoft?  I was actually thinking
> of maybe using the joystick interface.
> 
>> Your series (!) really highlights that many of the groundbreaking 
>> games (like Portal) have core elements that are not dependent on the 
>> cutting edge technology of their release era.
> 
> Yes, I was surprised by how much of the original game concepts I could
> get going without much effort.  It's a shame that all modern games have
> to be 3D as it really makes things all that more complicated often without
> much benefit to gameplay.

Right--like "photorealistic" Mario. ;-)

-- 
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

[toc] | [prev] | [next] | [standalone]


#3211

FromSteve Nickolas <usotsuki@buric.co>
Date2017-01-11 23:38 -0500
Message-ID<alpine.BSF.2.02.1701112338200.31991@frieza.hoshinet.org>
In reply to#3210
On Wed, 11 Jan 2017, Michael J. Mahon wrote:

> <vince@pianoman.cluster.toy> wrote:
>> On 2017-01-11, inexorabletash@gmail.com <inexorabletash@gmail.com> wrote:
>>> On Tuesday, January 10, 2017 at 4:18:39 PM UTC-8, vi...@pianoman.cluster.toy wrote:
>>>> So I made a version of Portal for the Apple II (Portal as in the 2007
>>>> game, not the existing Apple II title).
>>>
>>> Very nice! (Wishing for mouse support, though!)
>>
>> yes, the cursor is a bit of a pain.  You can fast scroll left/right with
>> U and O.
>>
>> Is it possible to use the mouse from Applesoft?  I was actually thinking
>> of maybe using the joystick interface.
>>
>>> Your series (!) really highlights that many of the groundbreaking
>>> games (like Portal) have core elements that are not dependent on the
>>> cutting edge technology of their release era.
>>
>> Yes, I was surprised by how much of the original game concepts I could
>> get going without much effort.  It's a shame that all modern games have
>> to be 3D as it really makes things all that more complicated often without
>> much benefit to gameplay.
>
> Right--like "photorealistic" Mario. ;-)
>
>

inb4 Mari0 (the fusion-ha of Super Mario Bros. and Portal).

-uso.

[toc] | [prev] | [next] | [standalone]


#3212

Frominexorabletash@gmail.com
Date2017-01-11 21:27 -0800
Message-ID<eba767ac-2b39-4183-b465-fb230fd450c9@googlegroups.com>
In reply to#3209
On Wednesday, January 11, 2017 at 10:10:36 AM UTC-8, vi...@pianoman.cluster.toy wrote:
> Is it possible to use the mouse from Applesoft?  I was actually thinking
> of maybe using the joystick interface.

As I just relearned:

5 S = 4 : REM Slot - should scan for it
10 PRINT CHR$(4)"PR#"S :  PRINT CHR$(1) : PRINT CHR$(4)"PR#0" : REM Initialize mouse
20 PRINT CHR$(4)"IN#"S : INPUT "";X,Y,B : PRINT CHR$(4)"IN#0" : REM Read mouse
30 PRINT X,Y,B : REM x,y coords, button state (4=up, 2=pressed, 1=down, 3=released)
40 GOTO 20

This INPUT ends up being non-blocking so you could use it in a loop.

Someone will probably beat me to writing up the scanning code....

[toc] | [prev] | [next] | [standalone]


#3213

Frominexorabletash@gmail.com
Date2017-01-11 21:35 -0800
Message-ID<6b18576a-3946-4760-aeca-2d90e819454e@googlegroups.com>
In reply to#3212
On Wednesday, January 11, 2017 at 9:27:02 PM UTC-8, inexora...@gmail.com wrote:
> Someone will probably beat me to writing up the scanning code....

10 FOR S = 1 TO 7 : SO = S * 256
20 IF PEEK(49157 + SO) = 56 AND PEEK(49159 + SO) = 24 AND PEEK(49163 + SO) = 1 AND PEEK(49164 + SO) = 32 THEN PRINT "Mouse is in slot ";S : END
30 NEXT

This is based on http://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Computers/Apple%20II/Apple%20II/Documentation/Misc%20%23008%20Pascal%20Protocol%20ID.pdf - I assume that's the way to go; I always just hardcoded the mouse slot back when this wasn't retrocomputing.

[toc] | [prev] | [next] | [standalone]


#3215

FromD Finnigan <dog_cow@macgui.com>
Date2017-01-12 18:44 +0000
Message-ID<dog_cow-1484246768@macgui.com>
In reply to#3212
inexorabletash wrote:
> On Wednesday, January 11, 2017 at 10:10:36 AM UTC-8,
> vi...@pianoman.cluster.toy wrote:
>> Is it possible to use the mouse from Applesoft?  I was actually thinking
>> of maybe using the joystick interface.
> 
> 
> Someone will probably beat me to writing up the scanning code....
>

Have you read the AppleMouse manual? It has Applesoft sample code.

[toc] | [prev] | [next] | [standalone]


#3217

Frominexorabletash@gmail.com
Date2017-01-12 19:00 -0800
Message-ID<e87c67a0-6188-40af-97c7-9885e9c3107a@googlegroups.com>
In reply to#3215
On Thursday, January 12, 2017 at 10:46:10 AM UTC-8, D Finnigan wrote:
> Have you read the AppleMouse manual? It has Applesoft sample code.

Good point (as usual!):

ftp://ftp.apple.asimov.net/pub/apple_II/documentation/hardware/io/AppleMouse%20II%20User's%20Manual.pdf

Perhaps most important: if a key is pressed the button status will flip to negative until the keyboard strobe is cleared (POKE 49168,0) - that would almost certainly lead to a "WTF?!?!?" bug if missed.

[toc] | [prev] | [next] | [standalone]


#3218

Frominexorabletash@gmail.com
Date2017-01-12 19:07 -0800
Message-ID<26c8060f-eea4-455f-af94-53432e37048d@googlegroups.com>
In reply to#3217
On Thursday, January 12, 2017 at 7:00:04 PM UTC-8, inexora...@gmail.com wrote:
> On Thursday, January 12, 2017 at 10:46:10 AM UTC-8, D Finnigan wrote:
> > Have you read the AppleMouse manual? It has Applesoft sample code.
> 
> Good point (as usual!):
> 
> ftp://ftp.apple.asimov.net/pub/apple_II/documentation/hardware/io/AppleMouse%20II%20User's%20Manual.pdf

...and simplified slot scanning would be:

10 FOR S = 1 TO 7 : SO = S * 256 
20 IF PEEK(49164+ SO) = 32 AND PEEK(49403 + SO) = 214 THEN PRINT "Mouse is in slot ";S : END 
30 NEXT : PRINT "No mouse :("

I'm not sure if there's a good reason to prefer one to the other.

[toc] | [prev] | [next] | [standalone]


#3216

Fromvince@pianoman.cluster.toy
Date2017-01-13 02:14 +0000
Message-ID<slrno7ge3e.fbd.vince@pianoman.cluster.toy>
In reply to#3212
On 2017-01-12, inexorabletash@gmail.com <inexorabletash@gmail.com> wrote:
> On Wednesday, January 11, 2017 at 10:10:36 AM UTC-8, vi...@pianoman.cluster.toy wrote:
>> Is it possible to use the mouse from Applesoft?  I was actually thinking
>> of maybe using the joystick interface.
>
> As I just relearned:
>
> 5 S = 4 : REM Slot - should scan for it
> 10 PRINT CHR$(4)"PR#"S :  PRINT CHR$(1) : PRINT CHR$(4)"PR#0" : REM Initialize mouse
> 20 PRINT CHR$(4)"IN#"S : INPUT "";X,Y,B : PRINT CHR$(4)"IN#0" : REM Read mouse
> 30 PRINT X,Y,B : REM x,y coords, button state (4=up, 2=pressed, 1=down, 3=released)
> 40 GOTO 20
> This INPUT ends up being non-blocking so you could use it in a loop.

Thanks, that works under Linapple so I can actually test it (I don't own
any mouse hardware).

Though I need to figure out how to trigger control-reset under Linapple
(challenege, I am running Linux on a Macbook-Air, so no "break" button) 
as when the mouse code goes wrong Control-C doesn't work.


For now I've instead uploaded a new version of the game where you can
aim using the joystick.  This hurts the framerate though, especially on
Level 19.  (Press '1' to enable joystick mode).

I really should optimize the BASIC code better.

Vince

[toc] | [prev] | [next] | [standalone]


#3214

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2017-01-12 11:30 -0600
Message-ID<o58edb$53b$1@dont-email.me>
In reply to#3206
On 2017-01-11 00:17:04 +0000, vince@pianoman.cluster.toy said:

> So I made a version of Portal for the Apple II (Portal as in the 2007
> game, not the existing Apple II title).


Ha ha! That's great! I even love how well you've adapted the game play 
to work well with an Apple II. I am reminded of the work done with Halo 
on the Atari VCS.

[toc] | [prev] | [next] | [standalone]


#3219

FromMichael Lutynski <michael.lutynski@gmail.com>
Date2017-01-13 23:19 -0800
Message-ID<762b091f-9679-48c2-9f42-6dab80a16b8d@googlegroups.com>
In reply to#3206
Very cool! I'm amazed that this was done in Applesoft, not the most elegant language in the world.

A few things came to mind. I know you said you don't want to use Beagle Compiler because it adds a runtime, and I'm with you on that one, but have you considered the Einstein Basic Compiler? It compiles code right down to machine code with no extra runtime, and the code is really fast. Check it out!

ftp://ftp.apple.asimov.net/pub/apple_II/images/programming/basic/EinsteinCompiler.zip

Another suggestion in order for you to make more complex Applesoft code is to use Virtualbasic, which is a modern tool to convert a structured Applesoft to pure Applesoft. You can even have modules for code reuse, it's kinda cool. 

http://virtualbasic.org/

The last thing you mentioned was that if you had an interruptible timer, you'd write Unix for the II. Well, someone is doing just that, and it's very, very good. Check it out:

https://github.com/burniouf/A2osX

Michael

[toc] | [prev] | [next] | [standalone]


#3224

FromOliver Schmidt <ol.sc@web.de>
Date2017-01-17 10:06 +0000
Message-ID<o5kqbh$hct$1@news.albasani.net>
In reply to#3206
Hi Vince,

> I originally started out just doing the "Still Alive"
> end credits sequence

Using Mousetext characters instead of '-' and '|' for the box around the
text on the left would be a pretty easy touch up.

Regards,
Oliver

[toc] | [prev] | [next] | [standalone]


#3227

Fromvince@pianoman.cluster.toy
Date2017-01-17 15:21 +0000
Message-ID<slrno7sdof.cpt.vince@pianoman.cluster.toy>
In reply to#3224
On 2017-01-17, Oliver Schmidt <ol.sc@web.de> wrote:
>
> Using Mousetext characters instead of '-' and '|' for the box around the
> text on the left would be a pretty easy touch up.

true.  I've been thinking of updating the code to auto-detect what
hardware you are on to make things look a bit nicer.  As it is
if you try to run on a II-plus (or the online javascript emulator)
it falls apart due to lack of 80-column mode and lowercase.

It would be easy to add a fallback 40-column/uppercase mode in that 
case.

I started porting the still alive code into assembly but got tripped
up because I'm trying to do cycle counting to make sure I understand
how the sound assembly routine I've been using works, but from what
I can tell the frequencies are off from what they should be.

Vince

[toc] | [prev] | [next] | [standalone]


#3225

Fromcybernesto <cybernesto@gmail.com>
Date2017-01-17 03:46 -0800
Message-ID<5933f632-a9a6-43f4-9ecb-2d935884653c@googlegroups.com>
In reply to#3206
I'm a big fan of your dos33fs utilities. I used your slideshow system already twice to give my presentations in the Apple II festival France. I also appreciate your games but wonder why didn't you make a separate GitHub repository for them? I have some improvements on my branch but I haven't done any merge requests because of this. 
By the way, if you want to support the Mockingboard, you should use the Ampermock routines from the developer's toolkit http://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/Audio/Sweet%20Microsystems%20Mockingboard/Disk%20Images/

[toc] | [prev] | [next] | [standalone]


#3228

Fromvince@pianoman.cluster.toy
Date2017-01-17 15:48 +0000
Message-ID<slrno7sf9e.cpt.vince@pianoman.cluster.toy>
In reply to#3225
On 2017-01-17, cybernesto <cybernesto@gmail.com> wrote:
> I'm a big fan of your dos33fs utilities. I used your slideshow system 
> already twice to give my presentations in the Apple II festival 
> France. 

I'm glad that was useful!  I never really know that other people are using
the code.  It means I should code a bit more carefully than I do.

> I also appreciate your games but wonder why didn't you make a 
> separate GitHub repository for them? I have some improvements on my 
> branch but I haven't done any merge requests because of this. 

I've been keeping the games in with the dos33 stuff just because
the games and tools are relatively dependent on each other and
I sometimes find it difficult to keep multiple trees all in sync.

Working on the games often leads me to improve the tools, I hope
none of my changes broke anything.  Again I sometimes forget that
others might be using them.

If you have changes feel free to send them to me.  I don't have
the strongest git skills, and I am way behind in responding to 
issues on github.  Often an e-mail with a patch included gets
a quicker response from me than a git-pull request.

> By the 
> way, if you want to support the Mockingboard, you should use the 
> Ampermock routines from the developer's toolkit 
> http://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/Audio/Sweet%20Microsystems%20Mockingboard/Disk%20Images/

I'll have to check that out.

I really need to get some actual Mockingboard hardware (though I'm 
running out of slots in my IIe).

I have built a custom AY-3-8910 soundcard for the raspberry Pi, and
have written code that decodes and plays YM5 files on there.  I'm
hoping it's not horribly different to do that with a Mockingboard.

Vince

[toc] | [prev] | [next] | [standalone]


#3226

Fromlaseractiveguy@gmail.com
Date2017-01-17 05:37 -0800
Message-ID<7bd3852e-2af3-465b-8a5e-92a641b08898@googlegroups.com>
In reply to#3206
I have always used TASC and never had a problem with runtimes being part of the equation, its actually quite easy to switch between different 'compiled' programs.  However, since you mentioned Einstein not having a runtime, I looked into it.  I created a short 2 line program with just text to see how small the program would be.  After figuring out how to use Einstein... the short program
10 PRINT "HELLO"
11 PRINT "MY NAME IS BOB"

Comes out to be 13 blocks in size.  Certainly this is smaller than a 17 runtime block and the program, probably another 2 blocks... but 13 blocks seems quite large for something that could be coded in assembly under 256 bytes...  I'll do a few more programs to see what the results are, but they don't look as good as claimed right now...

[toc] | [prev] | [next] | [standalone]


#3229

FromMichael J. Mahon <mjmahon@aol.com>
Date2017-01-17 12:10 -0600
Message-ID<M8adnex3jby3w-PFnZ2dnUU7-cXNnZ2d@giganews.com>
In reply to#3226
<laseractiveguy@gmail.com> wrote:
> I have always used TASC and never had a problem with runtimes being part
> of the equation, its actually quite easy to switch between different
> 'compiled' programs.  However, since you mentioned Einstein not having a
> runtime, I looked into it.  I created a short 2 line program with just
> text to see how small the program would be.  After figuring out how to
> use Einstein... the short program
> 10 PRINT "HELLO"
> 11 PRINT "MY NAME IS BOB"
> 
> Comes out to be 13 blocks in size.  Certainly this is smaller than a 17
> runtime block and the program, probably another 2 blocks... but 13 blocks
> seems quite large for something that could be coded in assembly under 256
> bytes...  I'll do a few more programs to see what the results are, but
> they don't look as good as claimed right now...
> 

As you've discovered, the Einstein compiler does have a runtime library--as
any Applesoft compiler would be expected to--but it is appended to each
compiled program rather than being a separate file on disk. 

This is an advantage if you need a single file program, but a considerable
disadvantage if the disk contains multiple compiled programs. 

-- 
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.sys.apple2.programmer


csiph-web