Beeb graphics ripper

discussion of beeb/electron applications, languages, utils and educational s/w
RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Beeb graphics ripper

Postby RobC » Mon Sep 25, 2017 1:22 pm

Following sbadger's modifications to Galaforce to use 16 colours with VideoNuLA, I thought it might be useful to be able to identify sprites and graphics in games where we don't have the source code.

I've used gfxripper (http://retrospec.sgn.net/game/gfxrip) with games from other platforms but it doesn't understand the Beeb's pixel interleaving so is only useful for mode 4 (or mode 0) games.

Here's a modified version that does understand the Beeb's graphics modes. It's very much a quick and dirty hack and I've stripped out most of the functionality for other platforms. The most important things to get right are the number of bits per pixel (keys 'E' and 'D') and the sprite data ordering ('M').

It essentially works as though it's looking at a memory dump but I've been using it with SSDs. I've only done a minimal amount of testing but it does seem to work in 1bpp, 2 bpp and 4bpp modes.

I haven't implemented flashing colours yet so they are currently mapped to their non-flashing equivalents.

Happy to take suggestions for improvements or bug reports.

Rob.

EDIT: Latest version now below.
Last edited by RobC on Fri Sep 29, 2017 5:38 pm, edited 1 time in total.

Commie_User
Posts: 869
Joined: Wed Jan 27, 2016 12:50 am

Re: Beeb graphics ripper

Postby Commie_User » Mon Sep 25, 2017 1:47 pm

Judging by the link, it's like having an Action Replay for the Beeb!

All it needs now is the game cheat trainer, poke screen, save state as self-running executable mode, printer dump, machine code monitor, music and sample stripper or sprite killer and they're away!

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Mon Sep 25, 2017 1:53 pm

Commie_User wrote:Judging by the link, it's like having an Action Replay for the Beeb!

Not really!
Commie_User wrote:All it needs now is the game cheat trainer, poke screen, save state as self-running executable mode, printer dump, machine code monitor, music and sample stripper or sprite killer and they're away!

There are a couple of hardware add-ons for the Beeb that do this sort of thing: the Care smart cartridge and Replay.

User avatar
grobda
Posts: 101
Joined: Tue Apr 23, 2013 1:46 pm
Location: Glasgow

Re: Beeb graphics ripper

Postby grobda » Mon Sep 25, 2017 7:50 pm

needed to install visual studio and allegro to run this otherwise its missing the following dll's;

allegro-5.2.dll
vcruntime140d.dll
ucrtbased.dll

had a play and found some gfx :D just no idea what to do with them. a palette for colours 8-15 would be nice as snapper maze tiles are currently black-on-black.

BTW I think magenta may be reserved for sprite masks, fuzzy memories of sprite masks on some systems being magenta. But this could equally be nonsense. :mrgreen:

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Mon Sep 25, 2017 8:01 pm

grobda wrote:needed to install visual studio and allegro to run this otherwise its missing the following dll's;

Sorry - Windows development isn't really my thing. Anyone know how to statically link them in Visual Studio?

I'll have a look at the flashing colours. The biggest issue is deciding which keys to use to modify their palette entries!

grobda wrote:BTW I think magenta may be reserved for sprite masks, fuzzy memories of sprite masks on some systems being magenta. But this could equally be nonsense.

No - I think you are right. There's a bit in the original code that sets colour 0 to magenta. I had to change the magenta palette entry slightly to get it to display.

Commie_User
Posts: 869
Joined: Wed Jan 27, 2016 12:50 am

Re: Beeb graphics ripper

Postby Commie_User » Mon Sep 25, 2017 8:03 pm

RobC wrote:There are a couple of hardware add-ons for the Beeb that do this sort of thing: the Care smart cartridge and Replay.


Oo, oo, oo oo!

viewtopic.php?t=8062#p84701

Ah, it's 'only' for the Master. But I can imagine a good bit of cracking was done with that beastie.

sbadger
Posts: 203
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey

Re: Beeb graphics ripper

Postby sbadger » Tue Sep 26, 2017 8:30 am

RobC wrote:
grobda wrote:needed to install visual studio and allegro to run this otherwise its missing the following dll's;

Sorry - Windows development isn't really my thing. Anyone know how to statically link them in Visual Studio?

I'll have a look at the flashing colours. The biggest issue is deciding which keys to use to modify their palette entries!

grobda wrote:BTW I think magenta may be reserved for sprite masks, fuzzy memories of sprite masks on some systems being magenta. But this could equally be nonsense.

No - I think you are right. There's a bit in the original code that sets colour 0 to magenta. I had to change the magenta palette entry slightly to get it to display.


Its been a while, but I think in the project with your dlls in 'References' there is a property on each one for something like "Specific Version"?
A3020 | BBC B x2 | Electrn | Master | RPi x3
A600 | C64 "breadbox"| C64 C | XB360 | GB | GBC | GBA | GBASP | DS | 3DS XL & new | MD | MS
Atari 7600 | PS1-2-3-4 | PSP | Vita | SNES | GC | N64 | Wii & U | Switch | Jamma Cab | Sony PVMx2

User avatar
grobda
Posts: 101
Joined: Tue Apr 23, 2013 1:46 pm
Location: Glasgow

Re: Beeb graphics ripper

Postby grobda » Tue Sep 26, 2017 2:12 pm

As an aside theres a bit of chat over at the atari forums on a 'universal' 16 colour palette, which came from this thread;

http://pixeljoint.com/forum/forum_posts.asp?TID=12795

which is being used quite effectively in a WIP Atari STE (also a 16 of 4096 colour palette in lo rez) conversion of ghouls and ghosts;

https://www.youtube.com/watch?v=hReqR8fxym8

I wasn't convinced at first as I'd always picked a palette depending on what I was drawing, but I'm quite impressed with the range and flexibility it, might do as a default Nula 16 colour palette with native beeb colours mapped to their closest equivalents - although magenta doesn't really get a look-in.

sbadger
Posts: 203
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey

Re: Beeb graphics ripper

Postby sbadger » Tue Sep 26, 2017 2:36 pm

grobda wrote:As an aside theres a bit of chat over at the atari forums on a 'universal' 16 colour palette, which came from this thread;

http://pixeljoint.com/forum/forum_posts.asp?TID=12795

which is being used quite effectively in a WIP Atari STE (also a 16 of 4096 colour palette in lo rez) conversion of ghouls and ghosts;

https://www.youtube.com/watch?v=hReqR8fxym8

I wasn't convinced at first as I'd always picked a palette depending on what I was drawing, but I'm quite impressed with the range and flexibility it, might do as a default Nula 16 colour palette with native beeb colours mapped to their closest equivalents - although magenta doesn't really get a look-in.


It's nice, i'm going to have a play, here is the basic to set it:--


Code: Select all

10 ?&FE23=&01:?&FE23=&01
20 ?&FE23=&14:?&FE23=&23
30 ?&FE23=&23:?&FE23=&36
40 ?&FE23=&34:?&FE23=&44
50 ?&FE23=&48:?&FE23=&43
60 ?&FE23=&53:?&FE23=&62
70 ?&FE23=&6D:?&FE23=&44
80 ?&FE23=&77:?&FE23=&76
90 ?&FE23=&85:?&FE23=&7C
100 ?&FE23=&9D:?&FE23=&72
110 ?&FE23=&A8:?&FE23=&9A
120 ?&FE23=&B6:?&FE23=&A2
130 ?&FE23=&CD:?&FE23=&A9
140 ?&FE23=&D6:?&FE23=&CC
150 ?&FE23=&ED:?&FE23=&D5
160 ?&FE23=&FD:?&FE23=&ED
A3020 | BBC B x2 | Electrn | Master | RPi x3
A600 | C64 "breadbox"| C64 C | XB360 | GB | GBC | GBA | GBASP | DS | 3DS XL & new | MD | MS
Atari 7600 | PS1-2-3-4 | PSP | Vita | SNES | GC | N64 | Wii & U | Switch | Jamma Cab | Sony PVMx2

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Tue Sep 26, 2017 3:00 pm

Looking at it from a games writing perspective, it does look good. When I was modifying the palettes for various Beeb games, I was struck by how much you could do with a few greys, blues, a brown and a pink. Having the 8 extra colours to play with does make a big difference.

Here's a disk image containing sbadger's code and the equivalent palette file for the VideoNuLA palette utility.
Attachments
newpal.zip
(454 Bytes) Downloaded 8 times

sbadger
Posts: 203
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey

Re: Beeb graphics ripper

Postby sbadger » Tue Sep 26, 2017 3:58 pm

I can't get that beeb version of the tool to load.
I downloaded the al52.dll but now gives me

Code: Select all

---------------------------
beebgfxrip.exe - Application Error
---------------------------
The application was unable to start correctly (0xc000007b). Click OK to close the application.
---------------------------
OK   
---------------------------
A3020 | BBC B x2 | Electrn | Master | RPi x3
A600 | C64 "breadbox"| C64 C | XB360 | GB | GBC | GBA | GBASP | DS | 3DS XL & new | MD | MS
Atari 7600 | PS1-2-3-4 | PSP | Vita | SNES | GC | N64 | Wii & U | Switch | Jamma Cab | Sony PVMx2

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Tue Sep 26, 2017 4:17 pm

Sorry - this is my fault. As I said, I've not got much experience of developing for Windows and I suspect that I've not got the correct linking options.

I'll see if I can get hold of another Windows box to install it on so that I can see the issues for myself.

Any advice gratefully accepted! :oops:

User avatar
grobda
Posts: 101
Joined: Tue Apr 23, 2013 1:46 pm
Location: Glasgow

Re: Beeb graphics ripper

Postby grobda » Tue Sep 26, 2017 6:25 pm

sbadger wrote:I can't get that beeb version of the tool to load.
I downloaded the al52.dll but now gives me

Code: Select all

---------------------------
beebgfxrip.exe - Application Error
---------------------------
The application was unable to start correctly (0xc000007b). Click OK to close the application.
---------------------------
OK   
---------------------------


Did you install allegro from visual studio or the github distribution? I installed from visual studio as an app library as per these instuctions;

https://wiki.allegro.cc/index.php?title=Windows,_Visual_Studio_2015_and_Nuget_Allegro_5

I couldn't configure the package from those instructions but it installed correctly, I then searched for the dll and copied it across to the beebgfxrip folder.

User avatar
tricky
Posts: 1823
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Beeb graphics ripper

Postby tricky » Thu Sep 28, 2017 12:26 pm

The ucrtbased.dll may also be related.
BTW, did you mean to ship the "debug" build, I guess it probably doesn't matter for small tasks like beeb discs ;)
Attachments
runtime.png

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Thu Sep 28, 2017 1:14 pm

tricky wrote:BTW, did you mean to ship the "debug" build, I guess it probably doesn't matter for small tasks like beeb discs

I tried to change the settings to 'Release' but it wouldn't build so opted for the Debug version!

Happy to send/post the VS project if someone has the skills/time to sort it out [-o<

sbadger
Posts: 203
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey

Re: Beeb graphics ripper

Postby sbadger » Thu Sep 28, 2017 5:02 pm

RobC wrote:
tricky wrote:BTW, did you mean to ship the "debug" build, I guess it probably doesn't matter for small tasks like beeb discs

I tried to change the settings to 'Release' but it wouldn't build so opted for the Debug version!

Happy to send/post the VS project if someone has the skills/time to sort it out [-o<


i'll certainly have a look, though no promises [-X
A3020 | BBC B x2 | Electrn | Master | RPi x3
A600 | C64 "breadbox"| C64 C | XB360 | GB | GBC | GBA | GBASP | DS | 3DS XL & new | MD | MS
Atari 7600 | PS1-2-3-4 | PSP | Vita | SNES | GC | N64 | Wii & U | Switch | Jamma Cab | Sony PVMx2

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Thu Sep 28, 2017 7:23 pm

sbadger wrote:i'll certainly have a look, though no promises

Thanks. If you've got time, could you try the attached file please? It should be a release version and I've tried to statically link the DLLs.

EDIT: Latest version below.
Last edited by RobC on Fri Sep 29, 2017 5:37 pm, edited 2 times in total.

sbadger
Posts: 203
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey

Re: Beeb graphics ripper

Postby sbadger » Thu Sep 28, 2017 7:37 pm

RobC wrote:
sbadger wrote:i'll certainly have a look, though no promises

Thanks. If you've got time, could you try the attached file please? It should be a release version and I've tried to statically link the DLLs.


just loaded before the mrs misses me, yes seems to work. good work.
A3020 | BBC B x2 | Electrn | Master | RPi x3
A600 | C64 "breadbox"| C64 C | XB360 | GB | GBC | GBA | GBASP | DS | 3DS XL & new | MD | MS
Atari 7600 | PS1-2-3-4 | PSP | Vita | SNES | GC | N64 | Wii & U | Switch | Jamma Cab | Sony PVMx2

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Thu Sep 28, 2017 8:26 pm

Great thanks! I'll get on with sorting out colours 8-15 next...

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Fri Sep 29, 2017 5:40 pm

I've now added support for the flashing colours.

Pressing keys '0'-'7' now toggles palette colours 0-7 and pressing 'SHIFT' with '0'-'7' now toggles palette colours 8-15 (when in 4bpp mode).

EDIT: Latest version now below.
Last edited by RobC on Sun Oct 01, 2017 7:42 pm, edited 1 time in total.

User avatar
sydney
Posts: 1967
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne

Re: Beeb graphics ripper

Postby sydney » Fri Sep 29, 2017 6:51 pm

Not had a chance to look at this yet but just wanted to say "Nice work!". It'll definitely be something I use in the future.

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Sat Sep 30, 2017 8:37 am

sydney wrote:Not had a chance to look at this yet but just wanted to say "Nice work!". It'll definitely be something I use in the future.

Thanks - happy to try to incorporate any feedback.

RobC
Posts: 1734
Joined: Sat Sep 01, 2007 9:41 pm

Re: Beeb graphics ripper

Postby RobC » Sun Oct 01, 2017 7:47 pm

Latest version: now allows modified sprites to be loaded into memory and for the revised memory contents to be saved.

Sprites can be saved to a BMP file using the 'P' key, modified in a tool like GIMP or Paint and the reloaded using the 'L' key. The original file/disk image can then be saved using the 'O' key.

Note: when modifying sprites that you wish to reload, the sprites should be saved in a 16-colour BMP file. The README file has more details and explains the how the BMP palette maps to the Beeb's physical colours.

I've not done a huge amount of testing but did use it successfully on Dare Devil Denis :)
Attachments
beebgfxrip_release3.zip
(323.54 KiB) Downloaded 12 times


Return to “software: other”

Who is online

Users browsing this forum: No registered users and 5 guests