It is currently Fri Sep 21, 2018 1:47 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed May 02, 2018 3:32 pm 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 280
Location: Rio de Janeiro - Brazil
From here:
https://github.com/mojontwins/MK2_NES

I can't get this to work. First of all, the batch file seems to be wrong? It tries to execute several things from "..\..\utils" but the correct path from the downloaded file is "..\utils".
I fixed this, but I can't understand what this batch line would do:
rem etc ...
How is it executing that line if rem is for comments? And what would "etc" do?
Even after fixing everything I can find and removing the rems it doesn't work. Maybe because my antivirus accused several of the executables to be infected. Yeah that could be a problem. So I guess I'd have to re-compile the BAS files myself? Does anyone have a working version of this?

edit: I have recompiled the BAS into EXE files, but it doesn't generate the palette.h right at the beginning of the batch file. So one of these lines isn't working correctly:
..\utils\mkts.exe mode=pals pals=..\gfx\palts.png out=work\palbg0.h label=palts0 silent
copy /b work\palfg0.h + work\palbg0.h + work\palbgend.h + work\pallightning.h assets\palettes.h > nul

edit2: yeah, palts.png doesn't exist.

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Last edited by nesrocks on Mon May 07, 2018 6:37 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed May 02, 2018 3:47 pm 
Online
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3600
Location: Mountain View, CA
I'm not gonna sift through that project, considering the authors should really update README.md to contain proper instructions for building. Failure to do so (yet release it onto the Internet publicly) is a disservice, IMO. Yes I know people have lives/priorities but proper documentation is always needed, case in point.

I suggest strongly you open up a GitHub Issues with them and point all of this out; make it their problem: https://github.com/mojontwins/MK2_NES/issues

Anyway... REM is completely ignored in bat/cmd files, I can assure you. :: is another form of commenting that you might see, but is actually terrible and should never be used. The problem is not with the REM lines.


Top
 Profile  
 
PostPosted: Wed May 02, 2018 3:55 pm 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 280
Location: Rio de Janeiro - Brazil
Yeah, I managed to find some palts.png files from other of their projects, but the .h files are full of bugs. Double defined labels, undefined labels, etc.
Code:
assets/levelset.h(18): Error: Undefined symbol: `MAX_HOTSPOTS_0_TYPE_1'
assets/levelset.h(18): Error: Constant expression expected
assets/levelset.h(18): Error: Constant expression expected
engine/screens.h(56): Error: Undefined symbol: `zcp_title_rle'
engine/screens.h(56): Warning: Converting integer to pointer without a cast
engine/screens.h(74): Error: Undefined symbol: `zcp_ending_rle'
engine/screens.h(74): Warning: Converting integer to pointer without a cast
engine/hotspots.h(23): Error: Undefined symbol: `game_zcp'
engine/hud.h(48): Error: Undefined symbol: `zcp_hud_rle'
engine/hud.h(48): Warning: Converting integer to pointer without a cast
engine/player.h(136): Error: Undefined symbol: `flickering'
engine/player.h(497): Error: Undefined symbol: `game_zcp'
engine/enemmods/enem_linear.h(74): Error: Undefined symbol: `game_zcp'
engine/game.h(119): Error: Undefined symbol: `game_zcp'
engine/game.h(119): Fatal: Too many errors


edit: I have done as you said, opening an issue at the project. I have tried some other projects of theirs, but none compile.

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Top
 Profile  
 
PostPosted: Thu May 03, 2018 2:29 pm 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 494
Sorry for the inconvenience. MK2 is a bit of a mess. That's why it hasn't been released properly as a standalone product. In fact, the engine is customized for each new game, with tons of new stuff added in each iteration. What's in the repo is just a copy of the latest customization. That's why it doesn't compile: it's incomplete.

MK2 is not ready yet for release, that's why there's no proper readme.md or any docs whatsoever. What's in the repo is outdated and definitely not ready to use. To get proper, working MK2 examples check this and this (this year's compo entry, latest MK2 version). Our you can wait until I finish what I am preparing to have a proper working, documented, and ready to use engine - I'm almost finished, just writing some docs at the moment. Please bear with us :)

_________________
http://www.mojontwins.com


Top
 Profile  
 
PostPosted: Thu May 03, 2018 3:11 pm 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 280
Location: Rio de Janeiro - Brazil
That's good to know! It would help though to have some disclaimer telling people that it isn't complete, because the ones likely to try it out are exactly the ones that need some working example to help them learn nes development, and it not working actually may throw them off in the complete opposite direction of figuring this thing isn't for them.

I tried the miedow project, and it almost compiles everything, but it throws an error that I've found with most of the other projects: it doesn't find the zeropage.inc. Then a lot of errors happen after that, which may be related to this.

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Last edited by nesrocks on Fri May 04, 2018 6:58 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri May 04, 2018 1:36 am 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 494
That surely has to do with the compiler version. I believe that versions prior to 2.15 needed such file in the same folder where the compile script is called. In my 2.13 projects I used to have a zeropage.inc file with this contents:

Code:
;
; zeropage.inc
;
; (C) Copyright 2002 Ullrich von Bassewitz (uz@cc65.org)
;

; Assembler include file that imports the runtime zero page locations used
; by the compiler, ready for usage in asm code.


   .importzp      sp, sreg, regsave
   .importzp      ptr1, ptr2, ptr3, ptr4
   .importzp      tmp1, tmp2, tmp3, tmp4
   .importzp      regbank

; The total amount of zero page space used

zpspace = 26


But I believe your issue will be better solved by installing the latest 2.15 https://sourceforge.net/projects/cc65/f ... p/download

Anyways, I'd wait until we make a proper release of the engine we are preparing (called AGNES) - The code base and example games are already finished, I'm just writing some docs and designing a tutorial. Thanks for your interest :)

_________________
http://www.mojontwins.com


Top
 Profile  
 
PostPosted: Fri May 04, 2018 12:44 pm 
Offline
User avatar

Joined: Mon Oct 06, 2014 12:37 am
Posts: 201
na_th_an wrote:
Anyways, I'd wait until we make a proper release of the engine we are preparing (called AGNES) - The code base and example games are already finished, I'm just writing some docs and designing a tutorial. Thanks for your interest :)

Nice! I've been working on an Assembly-based tutorial for the last week, at the request of a colleague.

It goes from "Hello World!", to a Space Shooter, all the way up to a tongue-in-cheek Mario clone! :P

I'm currently designing the webpage for it, to make the tutorial as professional as possible.
It will contain Assembly in spoiler boxes, in NESASM, ASM6, and CC65 syntax. I figured, why not cover them all?


Top
 Profile  
 
PostPosted: Sat May 05, 2018 11:47 am 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 494
That rocks! I'm sure we all have lots to learn from this :)

_________________
http://www.mojontwins.com


Top
 Profile  
 
PostPosted: Sat May 05, 2018 1:34 pm 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 280
Location: Rio de Janeiro - Brazil
I'm using version 2.16.

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Top
 Profile  
 
PostPosted: Mon May 07, 2018 2:29 am 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 494
Strange. As far as I remember I am using 2.15 as out-of-the-box. Anyways, there's a zeropage.inc file in the the asminc subfolder. Maybe your package is not complete? This is the contents of such file:

Code:
;
; zeropage.inc
;
; (C) Copyright 2002-2012, Ullrich von Bassewitz (uz@cc65.org)
;

; Assembler include file that imports the runtime zero page locations used
; by the compiler, ready for usage in asm code.


        .globalzp       sp, sreg, regsave
        .globalzp       ptr1, ptr2, ptr3, ptr4
        .globalzp       tmp1, tmp2, tmp3, tmp4
        .globalzp       regbank
 
; The size of the register bank
regbanksize     = 6

; The total amount of zero page space used
zpspace         = 26

; The amount of space that needs to be saved by an interrupt handler that
; calls C code (does not include the register bank, which is saved by the
; generated C code if required).
zpsavespace     = zpspace - regbanksize



Also, the CC65_HOME environment variable should be set, AFAIK, pointing to the base directory where your copy of cc65 resides.

Or just put the zeropage.inc alongside the compile.bat file in the /dev folder.

_________________
http://www.mojontwins.com


Top
 Profile  
 
PostPosted: Mon May 07, 2018 6:35 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 280
Location: Rio de Janeiro - Brazil
Yeah, I figured what the problem is, and it's a problem I've mentioned in another thread in these forums:
There's currently no installer for cc65.

I think this is a huge problem for nes development in general. People who installed it when there was an installer are now in a select group where no new people can join :lol: </drama>
The way I've been using cc65 is I copy the executables to my projects and use them. But this whole path setting thing simply doesn't exist. This is a horrible solution, but I couldn't use it in any other way.

If you go to this nesdev wiki page https://wiki.nesdev.com/w/index.php/Installing_CC65
You will notice it is outdated. Those instructions don't work anymore because the cc65.org doesn't offer the installer option anymore, just a raw windows snapshot download.

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Top
 Profile  
 
PostPosted: Mon May 07, 2018 11:21 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3127
Location: Tampere, Finland
nesrocks wrote:
I think this is a huge problem for nes development in general. People who installed it when there was an installer are now in a select group where no new people can join :lol: </drama>
The way I've been using cc65 is I copy the executables to my projects and use them. But this whole path setting thing simply doesn't exist. This is a horrible solution, but I couldn't use it in any other way.

I've never used the installer. Extract cc65 wherever you like (e.g., C:\cc65), then add the binary directory (e.g., C:\cc65\bin) to the PATH environment variable. On recent versions of Windows you can press the Windows button and type in "environment variable", it should suggest you "Edit the system environment variables" to get you the GUI for changing it. You can verify that your change took effect by executing echo %PATH% in the command line. (Remember to reopen cmd.exe if you had it open before editing the variable.)

EDIT: Forgot that the cc65 binaries are in the "bin" directory.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi


Last edited by thefox on Mon May 07, 2018 8:21 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon May 07, 2018 11:41 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 280
Location: Rio de Janeiro - Brazil
Ok, now I tried that. These were exactly my steps (using windows 8.1):
- System Properties
- Advanced
- Environment Variables...
- System Variables -> New...
- Variable name: PATH
- Variable value: C:\cc65

open cmd prompt, type echo %PATH%, nothing appeared.

So I tried instead of System Variables, adding it to the User Variables, at the end of the already present variables. Now the path appears on the cmd. But the command is not recognized when compiling the project.
Then I added C:\cc65\bin to the path, along with C:\cc65. Alas, the game compiled (miedow). I have to say, I don't think this is an ideal scenario for cc65 usage, it's too complicated to discover without proper guidance. I consider myself to be an advanced dos and windows user, and I had never set PATH on environment variables under windows (on DOS I did). I don't know what the solution is, but this is definitely scary to new developers. Can I update the wiki with these new instructions for windows users?

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Top
 Profile  
 
PostPosted: Mon May 07, 2018 11:56 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
Do you have an activated wiki account? If so, go ahead.

And are my instructions at all easy to understand?


Top
 Profile  
 
PostPosted: Mon May 07, 2018 12:14 pm 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 280
Location: Rio de Janeiro - Brazil
Thanks, tepples, those instructions seem very thorough! The reason I figure the wiki is so important is that if you google "install cc65" the wiki page on nesdev is the first hit. I'll get to it later.

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group