Presentación y duda sobre MK2

Todo sobre la creación, diseño y programación de nuevo software para
nuestro Spectrum

Moderador: Sir Cilve Sinclair

Responder
Avatar de Usuario
xdios
rst 0
Mensajes: 19
Registrado: Mar Feb 09, 2016 8:48 am
Contactar:

Presentación y duda sobre MK2

Mensaje por xdios » Mar Jun 20, 2017 1:19 pm

Lo primero es lo primero, aunque llevaba tiempo registrado (ya ni me acordaba, pues no soy asiduo de foros en los últimos años), no había participado en este foro así que me presento, soy Antonio (greenwebsevilla en las redes y xdios aquí...), uno más que mamó el Spectrum de "chiquinino" y guarda amor por este gran cacharro.

Ando liado con un juego mojono que quiero hacer con el MK2. He probado un par de niveles que tengo diseñados en la Churrera, más que nada para ver como quedan los gráficos y sprites, pero de forma individual cada nivel, pues con la churrera ya hice un juego y me manejo bien.
Pero me gustaría pasar estos niveles al motor MK2 con el modo 128K. Sigo los pasos que encontré en el tutorial del foro de los Mojons Twin pero al intentar crear el TAP me da una serie de errores y no compila. Tienen que ver con la música y los SCRIPTS pero no termino de entenderlos porque aún no los he incorporado ( y supongo que ahí está el problema, algo que no debería tener activado o así). Esto son los errores que me da:

Código: Seleccionar todo

### BUILDING ARKOS ###
Calculating player size
    Assembling arkos_player_zx.asm
    Calculating size...
    Player is 759 bytes
Song pool to be loaded @ C759
Processing song list @ song_list.txt
Adding song list to output.
Pasting sfx.asm
Assembling...
ERROR on line 12 of file temp.asm
ERROR: Value expected but '(eol)'found
    lst file is list.txt.
Generating arkos-addresses.h
#define SFXS_SONG 0xcc32
#define ATINIT 0xc68c
#define ATPLAY 0xc000
#define ATSFXINIT 0xc6f0
#define ATSFXPLAY 0xc704
#define ATSFXSTOP 0xc745
#define ATSFXSTOPALL 0xc6f7
#define ATSTOP 0xc6e1
#define SONG_LIST 0xd0dd
DONE COJONE!
El sistema no puede encontrar el archivo especificado.
        1 archivo(s) copiado(s).
### COMPILING ###
        1 archivo(s) copiado(s).
        1 archivo(s) copiado(s).
sccz80:"levels128.h" L:239 Error:#42:Unknown symbol: SCRIPT_0
sccz80:"levels128.h" L:239 Error:#51:Expecting constant expression
sccz80:"levels128.h" L:240 Error:#42:Unknown symbol: SCRIPT_1
sccz80:"levels128.h" L:240 Error:#51:Expecting constant expression
sccz80:"levels128.h" L:241 Error:#42:Unknown symbol: SCRIPT_2
sccz80:"levels128.h" L:241 Error:#51:Expecting constant expression
sccz80:"engine/floating.h" L:81 Error:#42:Unknown symbol: ITEM_EMPTY
sccz80:"engine/floating.h" L:81 Warning:#9:Converting pointer to integer without cast
sccz80:"engine/floating.h" L:286 Error:#42:Unknown symbol: items
sccz80:"engine/floating.h" L:286 Error:#35:Can't subscript
sccz80:"engine/floating.h" L:286 Error:#42:Unknown symbol: FLAG_SLOT_SELECTED

Maximum (10) number of errors reached, aborting!
Compilation aborted
A ver si algún alma caritativa me orienta que llevo 2 semanas loco perdío con esto y no doy con la tecla.

Gracias de antemano! :wink:
Te espero como @patmorita en Twitter

Avatar de Usuario
radastan
Phantomas
Mensajes: 2232
Registrado: Lun May 07, 2007 5:34 pm
Contactar:

Re: Presentación y duda sobre MK2

Mensaje por radastan » Mar Jun 20, 2017 5:40 pm

EOL = end of line, suele darse cuando no se ha cerrado algún paréntesis, un punto y coma en c, o no has metido un par de saltos de línea al final del fichero de texto a compilar (los compiladores no van bien si terminas la última instrucción y jo dejas espacio después.

Los otros errores pintan que algo has activado pero no completado. Habría que vet el código fuente al completo.

Yo te recomendaría usar mk2 en 48k y cuando lo domines saltar a 128k, son muchos los cambios.
_________________________________________
Hay otras páginas.... pero no son Bytemaniacos
http://www.bytemaniacos.com
Orgullo de 8 bits
_________________________________________

Avatar de Usuario
xdios
rst 0
Mensajes: 19
Registrado: Mar Feb 09, 2016 8:48 am
Contactar:

Re: Presentación y duda sobre MK2

Mensaje por xdios » Mar Jun 20, 2017 6:49 pm

radastan escribió:EOL = end of line, suele darse cuando no se ha cerrado algún paréntesis, un punto y coma en c, o no has metido un par de saltos de línea al final del fichero de texto a compilar (los compiladores no van bien si terminas la última instrucción y jo dejas espacio después.
Ese error en concreto creo que se cual es, al leer la lista de canciones la encuentra vacía, logicamente porque aún no he puesto nada.
radastan escribió:Los otros errores pintan que algo has activado pero no completado. Habría que vet el código fuente al completo.

Yo te recomendaría usar mk2 en 48k y cuando lo domines saltar a 128k, son muchos los cambios.
Seguramente es eso, o que venía activado y desconozco lo que puede ser, porque pocas cosas he tocado del 128k. Pues creo que te haré caso y montaré los niveles por separado, ya cuando lo vea más claro activaré el modo 128K

Una pregunta más, ¿en que archivo se meten los scripts para los distintos niveles? me refiero a los que se separan por END_OF_LEVEL

Gracias por la respuesta.
Te espero como @patmorita en Twitter

hikoki
Freddy Hardest
Mensajes: 657
Registrado: Sab Nov 23, 2013 8:27 am

Re: Presentación y duda sobre MK2

Mensaje por hikoki » Mié Jun 21, 2017 4:13 pm

¿Has pensado en meter tus niveles en un juego mk2 para 128K ya hecho? que yo sepa hay dos juegos con los fuentes liberados, Ninjajar y Harbinger - Convergence
Tambien puedes comparar los cambios que hay entre fuentes de diferentes juegos con el programa Winmerge.
Por ejemplo podrías comparar Aquanoids (Mk2 48k) con Harbinger - Convergence (Mk2 128k) para detectar qué tienes que desactivar.

Saludos

Avatar de Usuario
xdios
rst 0
Mensajes: 19
Registrado: Mar Feb 09, 2016 8:48 am
Contactar:

Re: Presentación y duda sobre MK2

Mensaje por xdios » Dom Jun 25, 2017 6:34 pm

hikoki escribió:¿Has pensado en meter tus niveles en un juego mk2 para 128K ya hecho? que yo sepa hay dos juegos con los fuentes liberados, Ninjajar y Harbinger - Convergence
Tambien puedes comparar los cambios que hay entre fuentes de diferentes juegos con el programa Winmerge.
Por ejemplo podrías comparar Aquanoids (Mk2 48k) con Harbinger - Convergence (Mk2 128k) para detectar qué tienes que desactivar.

Saludos
lo he pensado, y no lo descarto si veo que se me resiste esto. Pensaba que iba a ser parecido a la Churrera pero veo que han cambiado muchas cosas, y claro, no hay un curso tan facilito como el de la churrera. Habrá que estudiar! ;)

Andaba buscando un "esqueleto" del MK2 en 48k para arrancar desde ahí, quizás haciendo eso que comentas de comparar esos juegos me aclare mucho las ideas.
Gracias por la ayuda!
Te espero como @patmorita en Twitter

Avatar de Usuario
xdios
rst 0
Mensajes: 19
Registrado: Mar Feb 09, 2016 8:48 am
Contactar:

Re: Presentación y duda sobre MK2

Mensaje por xdios » Dom Jun 25, 2017 10:03 pm

hikoki escribió:¿Has pensado en meter tus niveles en un juego mk2 para 128K ya hecho? que yo sepa hay dos juegos con los fuentes liberados, Ninjajar y Harbinger - Convergence
Tambien puedes comparar los cambios que hay entre fuentes de diferentes juegos con el programa Winmerge.
Por ejemplo podrías comparar Aquanoids (Mk2 48k) con Harbinger - Convergence (Mk2 128k) para detectar qué tienes que desactivar.

Saludos
Por cierto, no encuentro por ninguna parte los archivos fuente del Harbinger - Convergence, en la web del autor no están disponibles al menos, ¿alguien sabe de donde bajarlos?
Te espero como @patmorita en Twitter

hikoki
Freddy Hardest
Mensajes: 657
Registrado: Sab Nov 23, 2013 8:27 am

Re: Presentación y duda sobre MK2

Mensaje por hikoki » Lun Jun 26, 2017 1:13 am

Hola xDios. Aquanoids podría valerte como plantilla MK2 para 48K

Edito:

Parece que el autor de Harbinger olvidó liberar el código..
Andy Dansby está escribiendo unas notas sobre MK2: Andy Dansby's MK2 notes

Avatar de Usuario
xdios
rst 0
Mensajes: 19
Registrado: Mar Feb 09, 2016 8:48 am
Contactar:

Re: Presentación y duda sobre MK2

Mensaje por xdios » Mar Jun 27, 2017 10:12 am

hikoki escribió:Hola xDios. Aquanoids podría valerte como plantilla MK2 para 48K

Edito:

Parece que el autor de Harbinger olvidó liberar el código..
Andy Dansby está escribiendo unas notas sobre MK2: Andy Dansby's MK2 notes
Gracias le echaré un ojo a esas notas.
Te espero como @patmorita en Twitter

andydansby
rst 0
Mensajes: 16
Registrado: Mié Jun 28, 2017 1:11 pm

Re: Presentación y duda sobre MK2

Mensaje por andydansby » Jue Jun 29, 2017 12:10 am

Hello xdios:

I am also currently working with the MK2 engine for my game as well. I saw that you had some issues with compiling and I had run into those exact same issues.

I would like for you to know that I am not the expert, but since I have seen some of these errors and it took me quite a while to figure out.

The first thing I would like to suggest is starting in your config.h. You are going to want to make sure you go through that line by line. I would suggest turning off most of the options and just enable those that are needed for just a basic build.

I would suggest disabling Arkos for now, in the congfig.h find the lines

Código: Seleccionar todo

// Music engine
//#define USE_ARKOS						// Just comment this to use the default WYZ player.
//#define ARKOS_SFX_CHANNEL		1		// SFX Channel (0-2)

Note I have commented mine out

Next I noticed that you have an error

Código: Seleccionar todo

sccz80:"levels128.h" L:239 Error:#42:Unknown symbol: SCRIPT_0
and another for Script 1 and 2. It looks like the script is disabled

Find the line

Código: Seleccionar todo

// Scripting
// ---------
#define ACTIVATE_SCRIPTING			// Activates msc scripting and flag related stuff.
and make sure it is enabled.


You have another error

Código: Seleccionar todo

sccz80:"engine/floating.h" L:81 Error:#42:Unknown symbol: ITEM_EMPTY
and

Código: Seleccionar todo

sccz80:"engine/floating.h" L:286 Error:#42:Unknown symbol: FLAG_SLOT_SELECTED
Find the SIM (Simple Item Manager) and comment out all items in the SIM. I'm fairly sure that the SIM is incompatible with a script.

I hope this helps out a bit with your MK2 issues.

Andy Dansby

Avatar de Usuario
xdios
rst 0
Mensajes: 19
Registrado: Mar Feb 09, 2016 8:48 am
Contactar:

Re: Presentación y duda sobre MK2

Mensaje por xdios » Lun Jul 03, 2017 1:39 pm

andydansby escribió:Hello xdios:

I am also currently working with the MK2 engine for my game as well. I saw that you had some issues with compiling and I had run into those exact same issues.

I would like for you to know that I am not the expert, but since I have seen some of these errors and it took me quite a while to figure out.

The first thing I would like to suggest is starting in your config.h. You are going to want to make sure you go through that line by line. I would suggest turning off most of the options and just enable those that are needed for just a basic build.
Hi Andy! First thanks for helping.

I had Arkos and SIM disabled and the Scripting was active. So all was right.
But I followed your advice and disabled some other features in config.h and all errors were solved while compiling. Good for you!
Unfortunately, when I test the game, I only get the menu screen and then it fades off and the program crashes. :(
I should review some other parts of the engine, something is not well done.

ESPAÑOL: desactivando cosas del config.h he logrado que compile todo sin errores, pero al probar el juego en el emulador se queda en la pantalla del menú, y al momento hace un fundido a negro y que queda colgado. Algo más debe haber mal en el resto de archivos del engine que no logro ver. En cuanto tenga tiempo lo compararé con otros juegos.
Te espero como @patmorita en Twitter

andydansby
rst 0
Mensajes: 16
Registrado: Mié Jun 28, 2017 1:11 pm

Re: Presentación y duda sobre MK2

Mensaje por andydansby » Mar Jul 04, 2017 7:35 am

It can sometimes be hard to tell on the MK2 engine, it does require quite a bit of work. I have been working on my game for quite some time and most of it is getting the engine to behave properly. I spent over a month doing so and there are still some problems. I have to work on a bit at a time. It dosen't help that sometimes the code is confusing.

Please realize I am troubleshooting in the dark, I can only guess without seeing what your build looks like and the actual code.

To solve the problem with the game crashing after the main menu is to look at your mainloop.h. You will have to follow the logic.

If you are using notepad++, use the search files function and search for "simple_menu ();" to find the logic to the menu system.

Or you could remove the menu system.

On my main loop, I have 2 definitions, min and max
I flow to a function

Código: Seleccionar todo

void saca_a_todo_el_mundo_de_aqui
then there are some If def's

It then flows into the

Código: Seleccionar todo

void main(void)
Flow to the // TITLE SCREEN and I have a feeling the problem is here.

Mine goes like

Código: Seleccionar todo

    while (1)
        {

            // ************
            // TITLE SCREEN
            // ************
            sp_UpdateNow();

            //blackout ();
#ifdef MODE_128K
            // Resource 0 = title.bin

            get_resource (0, 16384);

#else
            unpack ((unsigned int) (s_title), 16384);
#endif

#ifdef MODE_128K
            _AY_PL_MUS (0);
#endif
            select_joyfunc ();
#ifdef MODE_128K
            _AY_ST_ALL ();
#endif

            // *******************
            // GAME INITIALIZATION
            // *******************

#ifdef ACTIVATE_SCRIPTING
	#ifdef CLEAR_FLAGS
				msc_init_all ();
	#endif
#endif

#ifdef COMPRESSED_LEVELS
            mlplaying = 1;
            silent_level = 0;
            level = 0;

#ifndef REFILL_ME
            p_life = PLAYER_LIFE;

#endif
#endif

#ifndef DIRECT_TO_PLAY
            // Clear screen and show game frame
			// only for Direct to play
            cortina ();
            sp_UpdateNow();
#ifdef MODE_128K
            // Resource 1 = marco.bin
            get_resource (1, 16384);
#else
            unpack ((unsigned int) (s_marco), 16384);
#endif
#endif

#ifdef ACTIVATE_SCRIPTING
            script_result = 0;
#endif

#ifdef DIE_AND_RESPAWN
            p_killme = 0;
#endif

#ifdef COMPRESSED_LEVELS

However, I may be way off.

That all being said, I would comment out suspicious areas such as resources, especially if the resource is not yet built.

It may take a while to get the engine setup, but once that happens, you will be rewarded!

Responder

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 9 invitados