Skip to content

Commit

Permalink
Update to v0.17
Browse files Browse the repository at this point in the history
Add DK Rivets artwork
Add recording emulator column to romlist.  A preferred emulator can be set for recording or recording can be disabled.
Update romlist to include DK Rivets and remove the recording version of Donkey Kong since the launch menu can be used to "launch with  .inp recording"
  • Loading branch information
10yard committed Jul 8, 2021
1 parent cda8602 commit 7f4f774
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 68 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.16b
v0.17b
Binary file modified artwork/about/frontend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified artwork/about/gameinfo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified artwork/about/patches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified artwork/about/slots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added artwork/icon/dkongrivets/dkong.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions dk_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,34 @@ def read_romlist():
romlist = []
with open("romlist.csv", "r") as rl:
for row in rl.readlines():
if not row.startswith("#") and row.count(",") == 9:
name, sub, des, alt, slot, emu, unlock, score3, score2, score1, *_ = [x.strip() for x in row.split(",")]
if not row.startswith("#") and row.count(",") == 10:
name, sub, des, alt, slot, emu, rec, unlock, st3, st2, st1, *_ = [x.strip() for x in row.split(",")]
if not emu.strip():
emu = "1"
emu = "1"
if not rec.strip():
rec = "0"

# DK Junior is optional in the default frontend so replace with DK Pies if not available
if not os.path.exists(os.path.join(ROM_DIR, "dkongjr.zip")):
if name == "dkongjr" and slot == "5":
if name == "dkongjr" and slot == "3":
name, sub, des, alt = "dkong", "dkongpies", "DK Pies", "DK Pies Only"
elif sub == "dkongpies" and slot == "99":
continue

# In record mode checks.
if "-record" in get_emulator(int(emu)).lower():
# LUA hacks don't support recording so shouldn't have -record as default.
if sub in LUA_HACKS:
# Recording is not supported for LUA hacks at the moment
emu = "1"
else:
# Score targets are not considered for recordings
score3, score2, score1 = ("",) * 3
continue
# Score targets are not considered for recordings
st3, st2, st1 = ("",) * 3

if name and des:
if not alt:
alt = des
icx, icy = -1, -1
if 0 < int(slot) <= len(SLOTS):
icx, icy = SLOTS[int(slot) - 1]
romlist.append((name, sub, des, alt, icx, icy, int(emu), int(unlock), score3, score2, score1))
romlist.append((name, sub, des, alt, icx, icy, int(emu), int(rec), int(unlock), st3, st2, st1))
return romlist


Expand All @@ -102,7 +102,7 @@ def build_launch_command(info, basic_mode):
# Receives subfolder (optional), name, emulator, unlock and target scores from info
# If mame emulator supports a rompath (recommended) then the rom can be launched direct from the subfolder
# otherwise the file will be copied over the main rom to avoid a CRC check fail. See ALLOW_ROM_OVERWRITE option.
subfolder, name, emu, unlock, score3, score2, score1 = info
subfolder, name, emu, rec, unlock, score3, score2, score1 = info
emu_args = get_emulator(emu)
emu_args = emu_args.replace("<RECORD_ID>", f"{name}_{subfolder}_{get_datetime()}.inp")
launch_directory = os.path.dirname(emu_args.split(" ")[0])
Expand Down
37 changes: 20 additions & 17 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def display_icons(detect_only=False, with_background=False, below_y=None, above_
nearby = None
info_list = []
# Display icons and return icon that is near to Jumpman
for _x, _y, name, sub, des, alt, emu, unlock, score3, score2, score1 in _g.icons:
for _x, _y, name, sub, des, alt, emu, rec, unlock, st3, st2, st1 in _g.icons:
p_des = alt if alt.strip() else des
unlocked = True
if _g.score < unlock and UNLOCK_MODE and not BASIC_MODE and not intro:
Expand All @@ -341,22 +341,23 @@ def display_icons(detect_only=False, with_background=False, below_y=None, above_
# Pauline to announce the game found near Jumpman. Return the game icon information.
if not unlocked and since_last_move() % 4 > 2:
p_des = f"UNLOCK AT {unlock}"
elif unlocked and score3 and score2 and score1 and not BASIC_MODE:
elif unlocked and st3 and st2 and st1 and not BASIC_MODE:
if since_last_move() % 5 > 4:
p_des = f'1ST PRIZE AT {format_K(score1)}'
p_des = f'1ST PRIZE AT {format_K(st1)}'
elif since_last_move() % 5 > 3:
p_des = f'2ND PRIZE AT {format_K(score2)}'
p_des = f'2ND PRIZE AT {format_K(st2)}'
elif since_last_move() % 5 > 2:
p_des = f'3RD PRIZE AT {format_K(score3)}'
p_des = f'3RD PRIZE AT {format_K(st3)}'
elif '-record' in _s.get_emulator(emu) and since_last_move() % 4 > 2:
# In case the default emu is for recordings
p_des = 'FOR RECORDING!'
elif not score3.strip() and since_last_move() % 4 > 2:
elif not st3.strip() and since_last_move() % 4 > 2:
p_des = 'FOR PRACTICE!'
elif not int(FREE_PLAY or BASIC_MODE) and since_last_move() % 4 > 2:
p_des = f'${str(PLAY_COST)} TO PLAY'
write_text(p_des.upper(), x=108, y=37, fg=WHITE, bg=MAGENTA, bubble=True)
if unlocked:
nearby = (sub, name, emu, unlock, score3, score2, score1)
nearby = (sub, name, emu, rec, unlock, st3, st2, st1)
_g.selected = p_des
if not detect_only:
_g.screen.blit(img, (_x, _y))
Expand Down Expand Up @@ -471,11 +472,11 @@ def build_menus(initial=False):
_g.menu = pymenu.Menu(GRAPHICS[1], GRAPHICS[0], QUESTION, mouse_visible=False, mouse_enabled=False,
theme=dkafe_theme, onclose=close_menu)
_g.menu.add_vertical_margin(5)
for name, sub, desc, alt, icx, icy, emu, unlock, score3, score2, score1 in _s.read_romlist():
for name, sub, desc, alt, icx, icy, emu, rec, unlock, st3, st2, st1 in _s.read_romlist():
if _g.score >= unlock or not UNLOCK_MODE or BASIC_MODE:
_g.menu.add_button(alt, launch_rom, (sub, name, emu, unlock, score3, score2, score1))
_g.menu.add_button(alt, launch_rom, (sub, name, emu, rec, unlock, st3, st2, st1))
if initial and int(icx) >= 0 and int(icy) >= 0:
_g.icons.append((int(icx), int(icy), name, sub, desc, alt, emu, unlock, score3, score2, score1))
_g.icons.append((int(icx), int(icy), name, sub, desc, alt, emu, rec, unlock, st3, st2, st1))
_g.menu.add_vertical_margin(10)
_g.menu.add_button('Settings', open_settings_menu)
_g.menu.add_button('Close Menu', close_menu)
Expand Down Expand Up @@ -506,20 +507,20 @@ def build_launch_menu():
# Special launch menu
nearby = display_icons(detect_only=True)
if nearby:
sub, name, emu, unlock, score3, score2, score1 = nearby
sub, name, emu, rec, unlock, st3, st2, st1 = nearby
title = _g.selected.center(24)
inps = _s.get_recording_files(emu, name, sub)

_g.launchmenu = pymenu.Menu(200, 224, title, mouse_visible=False, mouse_enabled=False, theme=dkafe_theme,
onclose=close_menu)
if emu != 2:
if '-record' not in _s.get_emulator(emu):
_g.launchmenu.add_button('Launch game', launch_rom, nearby)
_g.launchmenu.add_vertical_margin(15)
if sub in LUA_HACKS:
if rec == 0 or sub in LUA_HACKS:
_g.launchmenu.add_label('Sorry, recording is not', selectable=False, font_color=GREY)
_g.launchmenu.add_label('possible for this game', selectable=False, font_color=GREY)
else:
_g.launchmenu.add_button('Launch with .inp recording', launch_rom, nearby, 2)
_g.launchmenu.add_button('Launch with .inp recording', launch_rom, nearby, rec)
_g.launchmenu.add_vertical_margin(15)
_g.launchmenu.add_label('Playback latest recordings:', underline=True, selectable=False)
_g.launchmenu.add_vertical_margin(1)
Expand Down Expand Up @@ -621,10 +622,12 @@ def shutdown_system():


def launch_rom(info, override_emu=None):
# Launch the rom using provided info. Override is used to change emu number in case of recordings (to rec number).
if info:
sub, name, emu, unlock, score3, score2, score1 = info
sub, name, emu, rec, unlock, st3, st2, st1 = info
if override_emu:
info = sub, name, override_emu, unlock, score3, score2, score1
emu = override_emu
info = sub, name, emu, rec, unlock, st3, st2, st1
_g.timer.stop() # Stop timer while playing arcade
_g.menu.disable()
if _g.launchmenu:
Expand Down Expand Up @@ -658,7 +661,7 @@ def launch_rom(info, override_emu=None):
clear_screen(and_reset_display=True)
if competing:
# Check to see if Jumpman achieved 1st, 2nd or 3rd score target to earn coins
scored = get_award(name, score3, score2, score1)
scored = get_award(name, st3, st2, st1)
if scored > 0:
_g.awarded = scored
_g.timer.reset()
Expand Down
8 changes: 5 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ An arcade game launcher based on Donkey Kong made for arcade cabinets with incen

![DKAFE frontend](https://github.com/10yard/dkafe/blob/master/artwork/about/frontend.png)

The frontend system mimics Donkey Kong gameplay. You control Jumpman on the familiar girders stage and have him select which arcade game to launch.
The frontend system mimics Donkey Kong gameplay. You control Jumpman on the familiar girders stage and have him select which arcade game to launch. Simply walk up to a machine, push "Up" to face towards it, then push "Jump" to play.

The default setup showcases all the excellent Donkey Kong hacks that have been developed by the community along with some new hacks that were made specifically for this frontend.

Expand Down Expand Up @@ -41,7 +41,7 @@ Jumpman has regenerated as the next Dr Who. Help him rescue his assistant from
**DK Last Man Standing**
You will lose penalty points instead of lives so don't make mistakes unless you have earned enough points to survive. You decide when to stop playing!
**DK Pies** and **DK Rivets**
These hacks contains only one stage. The pies hack begin on level 1 - which is not available in regular DK. Can you reach the killscreen?
These hacks contains only one stage. The pies hack starts on level 1 - which is not available in regular DK. Can you reach a killscreen?

### This project does not include:
- Roms or information on how to obtain them.
Expand Down Expand Up @@ -369,7 +369,9 @@ The file can be configured to launch roms from the default rom directory (by lea
The subfolder is useful when you have multiple roms with the same name e.g. there are lots of hacked versions of dkong.zip. If the emulator supports a rompath argument then DKAFE will launch the rom directly from its subfolder.
If the emulator does not support a rompath (e.g. Advmame) then the rom will be copied over to the main rompath. See ALLOW_ROM_OVERWRITE option. With this approach I recommend the original rom be placed into its own subfolder (e.g. **/roms/original**) to prevent it from being overwritten.

All roms in the list should be given an emulator number (as defined in settings.txt), a slot position (between 1 and 46) and a basic descriptive name. Set the slot position to 0 or 99 if you want the rom to only appear in the menu.
All roms in the list should be given an emulator number (e.g. 1 for DKWolf, as defined in settings.txt), a slot position (between 1 and 46) and a basic descriptive name. Set the slot position to 0 or 99 if you want the rom to only appear in the menu.

As well as an emulator number, the roms can be given a recording emulator number (e.g. 2 for DK Wolf recordings). This provides emulator details for when the rom is launched in recording mode. Set to zero to disable recording.

The special subfolder name **shell** can be used when you want to launch a batch file or shell script. Create a .bat or .sh file inside the **/shell** subfolder. The emulator number can be left blank.

Expand Down
69 changes: 34 additions & 35 deletions romlist.csv
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
#Rom Name,Sub Folder,Frontend Description,Alt Menu Description,Slot,Emu,Unlock,3rd Prize,2nd Prize,1st Prize
dkong,,DK Record.,DK Recording (.inp),1,2,0,,,
dkong,,Donkey Kong,,3,1,0,10000,25000,40000
dkongjr,,DK Junior,,5,1,0,10000,15000,30000
dkong,dkonglava,DK Lava!,DK Lava Panic!,8,1,1000,10000,20000,40000
dkongx11,dkongspooky,DK Spooky,DK Spooky Remix,10,1,2000,10000,15000,30000
dkong,dkongrev,DK Reverse,,11,1,4000,10000,20000,40000
dkongf,dkongst2,DK Springs,,14,1,6000,10000,15000,30000
dkong,dkongwho,DK Who,DK Who and the Daleks,15,1,8000,10000,20000,40000
dkong,dkongwbh,DK Wild,DK Wild Barrels,17,1,10000,1000,2000,5000
dkongf,dkongf,DK Foundry,,18,1,12000,10000,20000,40000
dkong,dkongitd,DK IntoTheDark,DK Into The Dark,19,1,14000,8000,15000,35000
dkong,dkongotr,DK OnTheRun,DK On The Run,21,1,16000,10000,15000,30000
dkongx11,dkongxmas,DK Xmas,DK Christmas Remix,22,1,18000,10000,15000,30000
dkong,dkonglastman,DK LastMan,DK Last Man Standing,24,1,20000,10000,20000,45000
dkongx,dkongdk2,DK 2,DK2 Jumpman Returns,25,1,22000,5000,10000,25000
dkong,dkong2600,DK 2600,DK Atari 2600 Graphics,26,1,24000,10000,20000,40000
dkong,dkongrnd,DK Random,DK Randomized,27,1,26000,10000,25000,50000
dkong,dkongtj,DK Jungle,DK Twisted Jungle,29,1,28000,10000,25000,45000
dkong,dkongcb,DK Crazy,DK Crazy Barrels,31,1,30000,10000,20000,40000
dkongf,dkongrdemo,DK Remix,DK Remix Demo,33,1,32000,10000,20000,45000
dkong,dkongrainbow,DK Rainbow,,34,1,34000,10000,25000,50000
dkonghrd,dkonghrd,DK Hard,,35,1,36000,10000,15000,25000
dkong,dkongl05,DK SkipStart,DK Skip Start,37,1,38000,8000,15000,25000
dkong,dkongfr,DK FreeRun,DK Freerun Edition,40,1,40000,20000,40000,75000
dkongpe,dkongpe,DK Pauline Ed,DK Pauline Edition,42,1,42000,8000,15000,25000
dkong,dkongbarpal,DK Barrelpalooza,DK Barrelpalooza,45,1,44000,10000,25000,50000
dkong,dkongce,DK Champ Ed.,DK Championship Edition,46,1,46000,10000,25000,50000
dkong,dkongpies,DK Pies Only,DK Pies Only,99,1,0,,,
dkong,dkongrivets,DK Rivets Only,DK Rivets Only,99,1,0,,,
dkong,dkongpac,DK Pac-Man,,99,1,0,,,
dkong,dkongksfix,KS Fix,DK Killscreen Fix,99,1,0,,,
dkong,dkongtrn,DK Trainer,,99,1,0,,,
dkong,dkongpace,DK Pace,,99,1,0,,,
dkong,dkongbcc,DK Barrel Control,DK Barrel Control,99,1,0,,,
#Rom Name,Sub Folder,Frontend Description,Alt Menu Description,Slot,Emu,Rec,Unlock,3rd Prize,2nd Prize,1st Prize
dkong,,Donkey Kong,,1,1,2,0,10000,25000,40000
dkongjr,,DK Junior,,3,1,2,0,10000,15000,30000
dkong,dkonglava,DK Lava!,DK Lava Panic!,5,1,0,1000,10000,20000,40000
dkong,dkongrivets,DK Rivets,DK Rivets Only,8,1,2,2000,10000,20000,40000
dkongx11,dkongspooky,DK Spooky,DK Spooky Remix,10,1,2,4000,10000,15000,30000
dkong,dkongrev,DK Reverse,,11,1,2,6000,10000,20000,40000
dkongf,dkongst2,DK Springs,,14,1,2,8000,10000,15000,30000
dkong,dkongwho,DK Who,DK Who and the Daleks,15,1,0,10000,10000,20000,40000
dkong,dkongwbh,DK Wild,DK Wild Barrels,17,1,2,12000,1000,2000,5000
dkongf,dkongf,DK Foundry,,18,1,2,14000,10000,20000,40000
dkong,dkongitd,DK IntoTheDark,DK Into The Dark,19,1,2,16000,8000,15000,35000
dkong,dkongotr,DK OnTheRun,DK On The Run,21,1,2,18000,10000,15000,30000
dkongx11,dkongxmas,DK Xmas,DK Christmas Remix,22,1,2,20000,10000,15000,30000
dkong,dkonglastman,DK LastMan,DK Last Man Standing,24,1,0,22000,10000,20000,45000
dkongx,dkongdk2,DK 2,DK2 Jumpman Returns,25,1,2,24000,5000,10000,25000
dkong,dkong2600,DK 2600,DK Atari 2600 Graphics,26,1,2,26000,10000,20000,40000
dkong,dkongrnd,DK Random,DK Randomized,27,1,2,28000,10000,25000,50000
dkong,dkongtj,DK Jungle,DK Twisted Jungle,29,1,2,30000,10000,25000,45000
dkong,dkongcb,DK Crazy,DK Crazy Barrels,31,1,2,32000,10000,20000,40000
dkongf,dkongrdemo,DK Remix,DK Remix Demo,33,1,2,34000,10000,20000,45000
dkong,dkongrainbow,DK Rainbow,,34,1,2,36000,10000,25000,50000
dkonghrd,dkonghrd,DK Hard,,35,1,2,38000,10000,15000,25000
dkong,dkongl05,DK SkipStart,DK Skip Start,37,1,2,40000,8000,15000,25000
dkong,dkongfr,DK FreeRun,DK Freerun Edition,40,1,2,42000,20000,40000,75000
dkongpe,dkongpe,DK Pauline Ed,DK Pauline Edition,42,1,2,44000,8000,15000,25000
dkong,dkongbarpal,DK Barrelpalooza,DK Barrelpalooza,45,1,2,46000,10000,25000,50000
dkong,dkongce,DK Champ Ed.,DK Championship Edition,46,1,2,48000,10000,25000,50000
dkong,dkongpies,DK Pies Only,DK Pies Only,99,1,2,0,,,
dkong,dkongpac,DK Pac-Man,,99,1,2,0,,,
dkong,dkongksfix,KS Fix,DK Killscreen Fix,99,1,2,0,,,
dkong,dkongtrn,DK Trainer,,99,1,2,0,,,
dkong,dkongpace,DK Pace,,99,1,2,0,,,
dkong,dkongbcc,DK Barrel Control,DK Barrel Control,99,1,2,0,,,

0 comments on commit 7f4f774

Please sign in to comment.