GithubHelp home page GithubHelp logo

huguesjohnson / retailclerk89 Goto Github PK

View Code? Open in Web Editor NEW
57.0 10.0 5.0 9.56 MB

A short casual adventure game for the Sega Genesis written in 68000 assembly

Home Page: https://www.huguesjohnson.com/rc89/

License: Other

Shell 0.03% Java 0.52% Assembly 99.45%
genesis megadrive 68000 assembly-language assembler motorola-68000

retailclerk89's Introduction

Retail Clerk '89

Retail Clerk '89 started as a personal exercise to learn Sega Genesis programming. It's now a complete, albeit short, demo. Although originally inspired by Phantasy Star II and III it morphed into more of an interactive fiction / casual adventure game. It's not especially fun but has a complete story.

Things implemented in this demo

  • Drawing background graphics and sprites
  • Capturing controller input and moving a sprite based on it
  • Playing and pausing background music
  • Collision detection
  • Game state management
  • Game script and event processing
  • Dialog between characters
  • Branching dialog based on player choices
  • Transition between main playable characters
  • Title screens, intro screens, and ending screens
  • Saving and loading
  • Main story that spans 8 in-game days over the 1989 Xmas season
  • Three possible endings

Building

I have only ever built this using vasm (http://sun.hasenbraten.de/vasm/) with the motorola syntax module. I have no reason to believe this won't work with any other 68000 assembler. vasm command line that works: vasmm68k_mot -o RetailClerk89.bin -Fbin -spaces RetailClerk89.X68

  • the 'spaces' option was added to avoid headaches when linking to code from projects using an assembler that ignores spaces in statements

In const_GameSettings.X68 there are flags that change the behavior of the demo. The most useful one is _DEBUG_ - setting it to $1 adds the debug menu and the speeds up the game. Setting _ATGAMES_HACKS to $1 fixes the audio on AtGames clone machines but breaks the demo on real hardware and some emulators. At some point I'll be smart enough to make those command-line arguments instead.

There are additional build tools that require Java 8+ in the /build-tools/ folder. These are not needed to compile the demo from source. However, they are needed if you want to customize sprites, collision maps, or change the memory map.

This has been fully tested on Gens and BlastEm for Linux. It has also been fully tested on real Genesis model 1 hardware using an Everdrive. It has been minimally tested on Genecyst for DOS, Gens for Windows, and Genesis Plus on Android. It runs on the AtGames Firecore (AKA 'Sega Ultimate Portable Game Player') and is likely to run on other AtGames clones but only the Firecore has been explicitly tested.

Links

Project page - https://www.huguesjohnson.com/rc89/

Builds that mostly work - https://www.huguesjohnson.com/rc89/releases.html

Disclaimers

This demo is (obviously) not licensed by Sega, there is no relationship between the author of this demo and Sega.

Although this demo is inspired by late 80s mall culture all locations, characters, and events are fictitious.

retailclerk89's People

Contributors

huguesjohnson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retailclerk89's Issues

Problems assembling with latest vasm

Thanks for the guide and the source! I'm using it to help along my own little Genesis project :-)
Seeing this issue on both macOS and Linux with the latest stable vasm (v1.8h)

vasm 1.8h (c) in 2002-2020 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.3k (c) 2002-2020 Frank Wille                                  
vasm motorola syntax module 3.14 (c) 2002-2020 Frank Wille                                           
vasm binary output module 1.9a (c) 2002-2009,2013-2020 Volker Barthelmann                            

error 2029 in line 820 of "actionscript/ActionScriptDay04.X68": branch destination out of range      
        included from line 76 of "actionscript/ActionScript.X68"                                     
        included from line 139 of "RetailClerk89.X68"                                                
>       beq.s   DialogTextCNowStaffDefaultTalk  ; not started, branch                                

error 2029 in line 822 of "actionscript/ActionScriptDay04.X68": branch destination out of range      
        included from line 76 of "actionscript/ActionScript.X68"                                     
        included from line 139 of "RetailClerk89.X68"                                                
>       bne.s   DialogTextCNowStaffDefaultTalk  ; npc found, branch                                  

error 2029 in line 1036 of "actionscript/ActionScriptDay04.X68": branch destination out of range     
        included from line 76 of "actionscript/ActionScript.X68"                                     
        included from line 139 of "RetailClerk89.X68"                                                
>       beq.s   DialogTextFCBFishingStaffDefaultTalk    ; not started, branch                        

error 2029 in line 1038 of "actionscript/ActionScriptDay04.X68": branch destination out of range     
        included from line 76 of "actionscript/ActionScript.X68"                                     
        included from line 139 of "RetailClerk89.X68"                                                
>       bne.s   DialogTextFCBFishingStaffDefaultTalk    ; npc found, branch  

Some of the game's menus do not respect (title?) safe area

If you're curious, the safe area is the region of the screen that most TV's, even really old and cheap ones, display. (in contrast to overscan, which most TVs don't display, at least to some extent) Some of the menus (like the in-game menu) and more obviously the brief "explainer" text for the controls, go outside this region. It looks something like this: (poor camera screenshot incoming)

IMG_20200425_091841106 1

While it doesn't really matter, (unless you are trying to play the game on a system with a display smaller than the Sega Genesis) most games tried to keep important details like dialogue or copyright notices inside this area back in the day. since they didn't know if they were being played on a "crappy" TV. Since most of the ingame interface (including dialogue) stays inside this zone, (due to being copied from Phantasy Star 3) reformatting the text in some of the menus shouldn't be a big deal. If you want more specific details, here's a nice explainer from a NES homebrew wiki.

branch destination out of range

Building ROM with VASM on both my Linux and Windows machines are producing error 2029: branch destination out of range

./build.sh

... # java output nominal

Building ROM...
vasm 1.8e (c) in 2002-2018 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.3c (c) 2002-2018 Frank Wille
vasm motorola syntax module 3.12 (c) 2002-2018 Frank Wille
vasm binary output module 1.8a (c) 2002-2009,2013,2015,2017 Volker Barthelmann

error 2029 in line 973 of "actionscript/ActionScriptDay04.X68": branch destination out of range
        included from line 43 of "actionscript/ActionScript.X68"
        included from line 140 of "RetailClerk89.X68"
>       beq.s   DialogTextCNowStaffDefaultTalk  ; not started, branch

error 2029 in line 975 of "actionscript/ActionScriptDay04.X68": branch destination out of range
        included from line 43 of "actionscript/ActionScript.X68"
        included from line 140 of "RetailClerk89.X68"
>       bne.s   DialogTextCNowStaffDefaultTalk  ; npc found, branch

error 2029 in line 1195 of "actionscript/ActionScriptDay04.X68": branch destination out of range
        included from line 43 of "actionscript/ActionScript.X68"
        included from line 140 of "RetailClerk89.X68"
>       beq.s   DialogTextFCBFishingStaffDefaultTalk    ; not started, branch

error 2029 in line 1197 of "actionscript/ActionScriptDay04.X68": branch destination out of range
        included from line 43 of "actionscript/ActionScript.X68"
        included from line 140 of "RetailClerk89.X68"
>       bne.s   DialogTextFCBFishingStaffDefaultTalk    ; npc found, branch

I'm guessing I missed a step somewhere along the way since I'm failing the same way on multiple systems.

I used these flags to compile VASM:

# building on linux
make CPU=m68k SYNTAX=mot 

# building on windows.
md obj_win32
nmake /F Makefile.Win32 CPU=m68k SYNTAX=mot

I was able to build the ROM once by commenting out everything beyond day 4. However, the ROM just rendered flashing green to Gens.

I will spend some time tonight looking further into it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.