Оберон-клуб «ВЄДАsoft»

Твердыня модульных языков
Текущее время: 28 мар 2024, 13:28

Часовой пояс: UTC + 2 часа




Начать новую тему Ответить на тему  [ Сообщений: 28 ]  На страницу Пред.  1, 2, 3  След.
Автор Сообщение
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 05 авг 2017, 06:13 
Не в сети

Сообщения: 104
Thanks

Do you recommend I use Ofront or Ofront+


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 05 авг 2017, 11:03 
Не в сети
Аватара пользователя

Сообщения: 1019
Откуда: Днепропетровская обл.
slenkar писал(а):
Do you recommend I use Ofront or Ofront+
Depends on your goals.
Ofront+ is our own fork. So you can request a new feature. Besides, I'm not as conservative as Josef Templ. If Ofront+ is enough stable for you and works under your OS, I recommend it, as I'm interested in the development of this fork.


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 05 авг 2017, 18:28 
Не в сети

Сообщения: 104
Thanks,
How easy is it to run my own bat files from the BlackBox?


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 05 авг 2017, 21:57 
Не в сети
Аватара пользователя

Сообщения: 1019
Откуда: Днепропетровская обл.
In XDev project, I run bat files from BlackBox using i21sysCalls module modified by me (see here). Example (see XDevCmd):
Код: "OBERON"
  1. (* Main compiling thread: *)
  2. loc := Files.dir.This(dir + BinDir);
  3. IF Exists(loc, "compile.bat") THEN (* Start "Bin/compile.bat Module". *)
  4. loc := Files.dir.This(dir + ObjDir); (* Start in /Obj directory. *)
  5. i21sysCalls.StartAt(loc, "..\Bin\compile.bat " + name$);
  6. ELSE
  7. StdLog.String('"' + dir + BinDir + '/' + 'compile.bat" not found.');
  8. StdLog.Ln;
  9. END;


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 06 авг 2017, 15:55 
Не в сети

Сообщения: 104
Thanks :)

im looking through the folders and can't find the script to edit to compile spectrum stuff :(
oh found it.

I used to use 'Make' on linux

I just discovered that there is a 'make' in MinGW

could you tell me where the ofront+.exe file is?


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 06 авг 2017, 18:05 
Не в сети
Аватара пользователя

Сообщения: 1019
Откуда: Днепропетровская обл.
Probably, I'll complement your vision of the building process for ZX Spectrum, mentioning that in ZXDev the builds scripts are Bin/Build.bat & Compile.bat, which are called from automatically generated (by the menu XDev -> ZXDev Project Setup) Project/Bin/Build.bat & Compile.bat files, where the project properties are simply set. Looks like this:
Код: "WINBATCH"
@SET MainMod=StarWar
@SET CodeAdr=45056
@SET DataAdr=63488
@SET Options=--reserve-regs-iy
@SET Target=TAP
 
%XDev%\ZXDev\Bin\Build.bat %1
For saving the properties, Bin/Config.pzx file is used:
Цитата:
MainMod=StarWar
CodeAdr=45056
DataAdr=63488
Options=--reserve-regs-iy
Modules=
Include=
Libraries=
Target=TAP
Clean=TRUE
Start=TRUE

slenkar писал(а):
could you tell me where the ofront+.exe file is?


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 06 авг 2017, 18:16 
Не в сети

Сообщения: 104
thanks

You managed to compile the program with the custom strings in blackbox
So there has to be a way of doing it.

If someone wanted to create a new spectrum program would it matter if their Mod file was not in the XDev folder?

lets say it was in c:\resourceexample.mod instead of c:\xdev\zxdev\mod


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 06 авг 2017, 21:13 
Не в сети

Сообщения: 104
Also, when the game is compiled in SDCC are you adding all of the .LIB files to the compilation path?

Then does SDCC know which ones not to include because they not called?


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 06 авг 2017, 21:33 
Не в сети
Аватара пользователя

Сообщения: 1019
Откуда: Днепропетровская обл.
slenkar писал(а):
You managed to compile the program with the custom strings in blackbox
What do you mean under the "custom strings"? Aren't strings which are read from the resources?

slenkar писал(а):
would it matter if their Mod file was not in the XDev folder?
Yes, it is permissible, and even desirable. Look: the batch files Bin/Compile.bat & Build.bat are looking for path to XDev in the environment variable %XDev%. There it is even checked that this variable must be specified.
Код: "WINBATCH"
@ECHO OFF
IF NOT "%XDev%"=="" GOTO XDev
ECHO Please set system variable XDev=X:\Path\To\XDev
PAUSE
EXIT
 
:XDev

slenkar писал(а):
Also, when the game is compiled in SDCC are you adding all of the .LIB files to the compilation path?
Yes.
Цитата:
SET Libraries=%Libraries% -L %ZXDev%\Lib XDev.lib Graph.lib Basic.lib Laser.lib MegaBasic.lib Best40.lib trdos.lib libspr.lib Supercode.lib NewSupercode.lib MiraMod2.lib PT3x0A.lib Wham.lib ZX7.lib CalcZX.lib Laser2.lib
::
SET SDCC=%ZXDev%\Bin\sdcc.exe %Options% %Include% %Modules% %Libraries%

slenkar писал(а):
Then does SDCC know which ones not to include because they not called?
Yes. Don't worry that the unused code from a library will be included into your program. In the case of working with .lib libraries (unlike .rel files), the SDCC implements smart linking, but only if the library gets the compiled C-code by the small portions. Note that the developers of C-compilers usually write a library in the form of a some functions, each of it is placed into a separate source. This way allows smart linking.

On the contrary, I like when all a module's functions are placed in a single source. And to save the possibility of smart linking, I wrote the special utility SmartLib that I use in ZXDev to build libraries.


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: strings
СообщениеДобавлено: 07 авг 2017, 01:16 
Не в сети

Сообщения: 104
Thanks, I found my old Oberon projects on Dropbox

when trying to compile I get this:
Цитата:
make targetname=Hello (in directory: C:\Users\Chuck\Downloads\oberonhello\oberonhello)
sdcc Hello.c -mz80 --code-loc 25000 --data-loc 53000 --no-std-crt0 --opt-code-size --funsigned-char --disable-warning 126 -I Lib -I Obj Lib/z80/Basic.lib Lib/z80/XDev.lib
?ASlink-Warning-Undefined Global '_Basic__init__init' referenced by module 'Hello'
at 1: warning 117: unknown compiler option '--funsigned-char' ignored
Hello.c:16: warning 112: function 'Basic__init__init' implicit declaration
Hello.c:16: warning 84: 'auto' variable 'Basic__init__init' may be used before initialization
Hello.c:16: warning 84: 'auto' variable 'Basic__init__init' may be used before initialization
Hello.c:20: warning 85: in function main unreferenced function argument : 'argc'
Hello.c:20: warning 85: in function main unreferenced function argument : 'argv'
"make": *** [Hello.ihx] Error 1
Compilation failed.


Basic.lib is being referenced in the sdcc line, and basic.h is being included in hello.c

dont know why it is saying it cant recoginze basic__init__init

so it might be easier to learn blackbox and .bat files


Вернуться к началу
 Профиль  
Ответить с цитатой  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 28 ]  На страницу Пред.  1, 2, 3  След.

Часовой пояс: UTC + 2 часа


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
cron
Создано на основе phpBB® Forum Software © phpBB Group
© VEDAsoft Oberon Club