Author Topic: Dragon Warrior for PCE  (Read 2573 times)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Dragon Warrior for PCE
« Reply #30 on: May 17, 2016, 01:08:58 PM »
Wooo!  really can't wait to play this again on an OBEY machine!

Thank you for all the hard work!!
Thank Bernie for bugging me to get this out ;)

Opethian

  • Hero Member
  • *****
  • Posts: 3299
Re: Dragon Warrior for PCE
« Reply #31 on: May 17, 2016, 03:16:56 PM »
amazing work! would love to hear PCE arranges of the music.

[Mon 16:27] <BlueBMW> i wouldnt sell an unmolested duo hehe.  I molest the crap outta of em before they leave me

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Dragon Warrior for PCE
« Reply #32 on: May 17, 2016, 03:39:46 PM »
That's quite neat ... you've basically implemented C++ "exception handling" in 6502!

It's the kind of thing that I recommend that you document, excessively, because you will forget what it's doing, and anyone looking at the code (if you release it) won't be expecting that kind of trick.

 Yeah, cleaning it up and documenting everything. It actually doesn't look so confusing once you realize what/where the exception handling is pointer to.

On a side note, I wish PCEAS had better public/private support. I know proc allows for naming scope, but I don't use it. I use equates to make local labels public when needed, but I think I'm going to add a public/private directive for PCEAS source update. IIRC, I *think* CA65 already has this.

Quote
I usually see that kind of stack-manipulation used for inline-data on the 6502. That's where you jsr to a function, and the function pops the stack pointer, puts it in zero-page, and uses it a pointer to a table of data.

When it's finished reading the data, it just does an indirect jump through zero-page to return to the instruction after the data.
Sort of like an extended BRK function?

 The one thing I thought was weird, being missing from the 65x series, is 16bit jmp/jsr relative. While not really necessary on the PCE, or games systems that typically have a fixed memory layout (code construct), but for systems with a OS where code could more flexible and loaded anywhere without worry about where it's mapped (logical address). I did macros+jsr code to add this functionality, but then I realized no one would ever use it. It did require a special table in ram, for entries to be updated in ordered to be 'called' to the correct location. Mapping in the function, the handling code, took care of this. It was kinda cool to be able to call the code in any 8k page without worry, but in practicality it was rarely needed.
 
 I guess OS and 65x don't really come to mind, but then I'm reminded of OS-9 for the 6809 on the Coco systems.

 

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Dragon Warrior for PCE
« Reply #33 on: May 18, 2016, 08:04:21 AM »
Tom, were you ever able to hack DW so that when you want to search or whatever, you didn't need to go to the menu?  I'm pretty sure we talked about that possibility, though, maybe I dreamed it?
We did talk about it, but it would be a more serious level hack. I doubt I'll put the time into it though. I rather put that time into CD audio support, ADPCM, and new graphics if possible (I'm still looking into that). Talking with towns people is easy, because it's just a simple double tap of the button. Searching and opening doors aren't used a whole lot. I might hack it so that it quick executes the stairs function on the same talk button - so a double tap would execute the stairs command.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Dragon Warrior for PCE
« Reply #34 on: May 19, 2016, 09:30:32 AM »
Sort of like an extended BRK function?

Yes, you can think of it in the same terms as an opertating-system call.

It's just a way to avoid passing a data-pointer to a function ... the location of the data is implicit ... it just follows the instruction.

It makes generic disassembly a real PITA!


Quote
The one thing I thought was weird, being missing from the 65x series, is 16bit jmp/jsr relative. While not really necessary on the PCE, or games systems that typically have a fixed memory layout (code construct), but for systems with a OS where code could more flexible and loaded anywhere without worry about where it's mapped (logical address). I did macros+jsr code to add this functionality, but then I realized no one would ever use it. It did require a special table in ram, for entries to be updated in ordered to be 'called' to the correct location. Mapping in the function, the handling code, took care of this. It was kinda cool to be able to call the code in any 8k page without worry, but in practicality it was rarely needed.
 
I guess OS and 65x don't really come to mind, but then I'm reminded of OS-9 for the 6809 on the Coco systems.

The older 8-bit processors really weren't designed to handle fully-relocatable code, because that wasn't needed in the small single-user systems that they were designed for.

It was really only with the introduction of the 6809 in 1978 that I remember that kind of code even being possible.

Even when people wanted multi-user systems or more-sophisticated operating systems on things like the Z80 ... they just accomplished it with bank-switching, or with relocation-patching (just like MS-DOS).

The poor old 6809 never got much of a life to shine as an 8-bit CPU (or as a 16-bit CPU if you think like a SNES fanboy), because the introduction of the 68000 one year later in 1979 totally eclipsed it.

I keep on meaning to play with OS-9 on the CoCo3, especially now that there's the CoCo3FPGA project that's doing such interesting things to it, but there just isn't enough time in the day!

I'm amazed that you've come across the old thing ... it was never a particularly popular machine IIRC.

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Dragon Warrior for PCE
« Reply #35 on: May 19, 2016, 10:18:45 AM »
The CoCo 3 was immensely popular in Cleveland area.   

Everyone had that or a C64.   Apple II was for rich cunts, or douchebags.

[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Dragon Warrior for PCE
« Reply #36 on: May 19, 2016, 10:25:11 AM »
Quote
The poor old 6809 never got much of a life to shine as an 8-bit CPU (or as a 16-bit CPU if you think like a SNES fanboy), because the introduction of the 68000 one year later in 1979 totally eclipsed it.
Considering how powerful the 6809 is (was), it doesn't surprise me that Motorola didn't offer it in higher clock speed versions compared to the 68k. 8, 10, and 12mhz 6809's could have been competitive to the 68k at the time.

Quote
I keep on meaning to play with OS-9 on the CoCo3, especially now that there's the CoCo3FPGA project that's doing such interesting things to it, but there just isn't enough time in the day!
Thankfully NitrOS-9 is free. It's supposed to be 100% compatible, and offers some advancement over level 1 and level 2.

Quote
I'm amazed that you've come across the old thing ... it was never a particularly popular machine IIRC.
It was the computer I had when I was a kid (CoCo 2 and CoCo 3). Though I couldn't afford OS-9.


TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Dragon Warrior for PCE
« Reply #37 on: May 19, 2016, 10:51:06 AM »
Quote
It was the computer I had when I was a kid (CoCo 2 and CoCo 3). Though I couldn't afford OS-9.

Still got it?
I still have mine... a Coco 1 w/replacement keyboard.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Dragon Warrior for PCE
« Reply #38 on: May 19, 2016, 11:10:27 AM »
Considering how powerful the 6809 is (was), it doesn't surprise me that Motorola didn't offer it in higher clock speed versions compared to the 68k. 8, 10, and 12mhz 6809's could have been competitive to the 68k at the time.

I doubt that they had the capability of doing so ... or, as you say, any commerical incentive.

AFAIK, the 6809 was designed in the "traditional" at-the-time way and it actually did quite a bit of work each clock-cycle.

The can lead to a whole bunch of "race" conditions in the internal architecture as you try to speed up the clock-cycle.

The 68000 was designed to do only a very small amount of work each clock-cycle, and so it was "easier" to ramp up the speed in a controlled manor. The downside is that the original 68000 takes a lot of clock-cycles to do anything.

IIRC, the 6809 was designed by a small (low-cost) team, that wasn't necessarily expected to succeed. The 68000 was a much larger team, and Motorola basically bet-the-farm on it. The 6809 never really had a chance.

You probably already know the story that it was the specific example of the 6809 design-team's success that lead to the creation of the ARM architecture that we all know (and love) today.


Quote
It was the computer I had when I was a kid (CoCo 2 and CoCo 3). Though I couldn't afford OS-9.

I could never understand why Tandy released the CoCo3 ... but then I wasn't in America at the time.

When it came out in 1986, was it marketed as an "affordable" alternative to the Commodore Amiga and Atari ST?

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: Dragon Warrior for PCE
« Reply #39 on: May 19, 2016, 11:28:39 AM »
The poor old 6809 never got much of a life to shine as an 8-bit CPU (or as a 16-bit CPU if you think like a SNES fanboy), because the introduction of the 68000 one year later in 1979 totally eclipsed it.
It still had a pretty good run. Many of the architecture's trademarks were built upon in the 6811 and 6812 which were extremely popular residents in consumer electronics.

Even the dumb height adjustable desks at my last job used 6812s to control their motors.

But yeah, great design. Good set of addressing modes (indirect + offset, finally) and math instructions. What the 65816 should have been.

Edit :
Apple II was for rich cunts, or douchebags.
Or people who just wanted functional disk drives.
« Last Edit: May 19, 2016, 11:32:35 AM by TailChao »

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Dragon Warrior for PCE
« Reply #40 on: May 19, 2016, 11:42:26 AM »
Or people who just wanted functional disk drives.

yeah, rich cunts.   Disk IIs were expensive.   Apple IIs were also expensive.  Hell, Apple shit is *still* expensive, except now, there's not much legitimate value involved.

but hey, Commodore got it right finally when they made the 1571.   It just took f*cking up the 1541s for awhile.   1571s are just as reliable as a Disk II, and come with the added perk of not being attached with big, stupid ribbon cables that are just jammed in the back all goofily.

Apple II's disk drives after the Disk IIs aren't that great.   The IIC/IIC+ era drives sucked. 

I could never understand why Tandy released the CoCo3 ... but then I wasn't in America at the time.
When it came out in 1986, was it marketed as an "affordable" alternative to the Commodore Amiga and Atari ST?

CoCo3 was basically just beating a dead horse / selling to people who refused to jump to a completely new machine.   They had all kinds of dumb bundle pack things and sales.   OldMan has another whole setup in his garage that I basically handed to him because someone else was going to toss it all.   Its throwaway stuff now.


Amiga saw wild popularity here for a hot minute before Commodore blew the whole thing, and VGA/DOS shit all over Amiga's corpse.

Such amazing mismanagement there, since the Amiga really did out perform.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Dragon Warrior for PCE
« Reply #41 on: May 19, 2016, 11:55:01 AM »
Considering how powerful the 6809 is (was), it doesn't surprise me that Motorola didn't offer it in higher clock speed versions compared to the 68k. 8, 10, and 12mhz 6809's could have been competitive to the 68k at the time.

I doubt that they had the capability of doing so ... or, as you say, any commerical incentive.

You should definitely check out the history of the Hitachi 6309, then.  ( https://en.wikipedia.org/wiki/Hitachi_6309 )  Konami used this CPU in a few of their 80s arcade games.  IIRC, Motorola intentionally limited the speed and abilities of the 6809 so as not to intrude on the 68k's market.  Hitachi "pulled a Hudson" and made a licensed 6809 that had a hidden, unlockable mode with more instructions, faster execution, and a 32-bit accumulator.  Motorola was not happy when they found this out but, oh well, the 6309 was already being sold.

Naturally, CoCo3 users found out about this CPU's secret and put them into their Cocos.
« Last Edit: May 19, 2016, 11:59:28 AM by ccovell »

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Dragon Warrior for PCE
« Reply #42 on: May 19, 2016, 12:39:05 PM »
Quote
I could never understand why Tandy released the CoCo3 ... but then I wasn't in America at the time.

I think a lot of that was trying to give the diehards what they wanted.
The original coco 1/2 was limited in memory (128K, max, iirc), and when OS-9 got released, a lot of people wanted/needed more RAM. So the 3 upped the ante to 512K, with a new OS to use it.
It was a really sweet machine to me, coming from using Vax's at work....

Quote
Naturally, CoCo3 users found out about this CPU's secret and put them into their Cocos.

Yeah. The 6309 mod is probably the only one I was afraid of trying <sigh>. At that age (20's), removing a CPU was frightening. Though I might have tried it if someone had made a dual CPU switchable board... :)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Dragon Warrior for PCE
« Reply #43 on: May 19, 2016, 03:03:06 PM »
I could never understand why Tandy released the CoCo3 ... but then I wasn't in America at the time.

When it came out in 1986, was it marketed as an "affordable" alternative to the Commodore Amiga and Atari ST?
I was just a kid at the time, so I didn't really understand all that was happening. But I suspect Tandy figured there was enough demand in the existing user base to sell one more machine. The CoCo 3 was supposed to have a 256 color mode, and part of the circuitry is there, but was gimp'd when Tandy realized it was getting too close to their Tandy 1000 line. I even remember third party systems claiming to be the next CoCo4. IIRC, they had CoCo emulator boards, but were 680x0 based systems. I don't think they did so well. And without that official Tandy backing, I think the community was reluctant.

 I dunno. I had fun coding on the little machine. Most of the stuff I did was graphic adventures anyways (I didn't know assembly at the time, so I couldn't do fast software blit routines). I actually had a looping tape (answering machine style) for the tape deck that would play music through TV for my games - lol. You had to swap tapes for saving/loading. I was ahead of the times :B

Quote
Still got it?
I still have mine... a Coco 1 w/replacement keyboard.
Unfortunately, no. It somehow got lost along the way of moving from place to place.

dshadoff

  • Full Member
  • ***
  • Posts: 175
Re: Dragon Warrior for PCE
« Reply #44 on: May 20, 2016, 12:34:20 AM »
Quote
It was the computer I had when I was a kid (CoCo 2 and CoCo 3). Though I couldn't afford OS-9.


Still got it?
I still have mine... a Coco 1 w/replacement keyboard.


I also had a CoCo, but by the time the CoCo 3 came out, there were other choices which were more attractive to games (Atari, Amiga), and other choices which were more attractive to business users (PC clones).  I still have it somewhere, as well as the Commodore 1701 monitor I used with it.

A game I wrote back then was actually published by Spectral Associates (big-name game publisher on CoCo back in the day).  My game was released *the very month* they decided to switch from full-page color ads to black-and-white 4-point text ads (still full-page, but uselsss due to TL;DR).

http://www.lcurtisboyle.com/nitros9/starspores.html
« Last Edit: May 20, 2016, 12:37:30 AM by dshadoff »