EmuTOS

Talk about the operating system (EhBASIC, FAT library, ...)
simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

EmuTOS

Postby simon » Sun Jan 20, 2013 10:20 pm

Hey,

I think about porting EmuTOS. It would give access to many TOS (Atari) programs.
This thread might be interesting as starting point. :)

Simon

netwar
Posts: 40
Joined: Mon Sep 17, 2012 5:31 am
Location: North Carolina,United States of America

Re: EmuTOS

Postby netwar » Tue Jan 22, 2013 1:45 pm

EmuTOS (atleast by me reading the description) is a 32bit OS. I thought the kiwi was 16-bit? hmmm... there is a word for what im thinking of....can't remember it... were you send two 16 bit chunks instead of one 32bit....o well :lol:

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: EmuTOS

Postby simon » Tue Jan 22, 2013 3:19 pm

Hi netwar,

emuTOS is a replacement TOS aimed for ST emulators - thus for the plain MC68000. It is build upon the then-GNU-released GEMDOS. BTW, the MC68000 is called 16/32-bit CPU as the internal registers are 32 bit wide. So the MC68008 is a 8/32-bit CPU. Well, from these points emuTOS should be portable for us... :)

Yesterday I started to play with emuTOS. I tried to compile the actual CVS version with my cross GCC. Unfortunately it dies when trying to link everything. Maybe Newlib is causing this error...?

Code: Select all

simon@ray ~/emuTOS/emutos-src-CVS-20130118 $ make 512
m68k-elf-gcc -m68000 -mshort -nostartfiles -nostdlib -o emutos2.img obj/tosvars.o obj/startup.o obj/aciavecs.o obj/vectors.o obj/lineavars.o obj/processor.o obj/memory.o obj/linea.o obj/panicasm.o obj/kprintasm.o obj/natfeat.o obj/amiga2.o obj/delayasm.o obj/rwa.o obj/memset.o obj/memmove.o obj/nlsasm.o obj/setjmp.o obj/miscasm.o obj/stringasm.o obj/vdi_asm.o obj/vdi_blit.o obj/vdi_tblit.o obj/gemstart.o obj/gemdosif.o obj/gemasm.o obj/gsx2.o obj/large.o obj/optimopt.o obj/deskstart.o obj/coma.o obj/kprint.o obj/xbios.o obj/chardev.o obj/blkdev.o obj/bios.o obj/clock.o obj/mfp.o obj/parport.o obj/serport.o obj/biosmem.o obj/acsi.o obj/midi.o obj/ikbd.o obj/sound.o obj/dma.o obj/floppy.o obj/disk.o obj/screen.o obj/videl.o obj/lineainit.o obj/mouse.o obj/initinfo.o obj/cookie.o obj/machine.o obj/nvram.o obj/country.o obj/xhdi.o obj/natfeats.o obj/font.o obj/conout.o obj/vt52.o obj/dmasound.o obj/ide.o obj/amiga.o obj/delay.o obj/console.o obj/fsdrive.o obj/fshand.o obj/fsopnclo.o obj/osmem.o obj/umem.o obj/bdosmain.o obj/fsbuf.o obj/fsfat.o obj/fsio.o obj/iumem.o obj/proc.o obj/fsdir.o obj/fsglob.o obj/fsmain.o obj/kpgmld.o obj/time.o obj/doprintf.o obj/nls.o obj/langs.o obj/string.o obj/intmath.o obj/vdi_main.o obj/vdi_col.o obj/vdi_control.o obj/vdi_esc.o obj/vdi_fill.o obj/vdi_gdp.o obj/vdi_line.o obj/vdi_marker.o obj/vdi_misc.o obj/vdi_mouse.o obj/vdi_raster.o obj/vdi_input.o obj/vdi_text.o obj/vdi_bezier.o obj/gemaplib.o obj/gemasync.o obj/gemctrl.o obj/gemdisp.o obj/gemevlib.o obj/gemflag.o obj/gemfmalt.o obj/gemfmlib.o obj/gemfslib.o obj/gemgraf.o obj/gemgrlib.o obj/gemgsxif.o obj/geminit.o obj/geminput.o obj/gemmnlib.o obj/gemobed.o obj/gemobjop.o obj/gemoblib.o obj/gempd.o obj/gemqueue.o obj/gemrslib.o obj/gemsclib.o obj/gemshlib.o obj/gemsuper.o obj/gemwmlib.o obj/gemwrect.o obj/optimize.o obj/rectfunc.o obj/gemdos.o obj/gem_rsc.o obj/deskact.o obj/deskapp.o obj/deskdir.o obj/deskfpd.o obj/deskfun.o obj/deskglob.o obj/deskinf.o obj/deskins.o obj/deskmain.o obj/deskobj.o obj/deskpro.o obj/deskrsrc.o obj/desksupp.o obj/deskwin.o obj/gembind.o obj/desk_rsc.o obj/icons.o obj/desk1.o obj/deskrez.o obj/command.o obj/fnt_st_6x6.o obj/fnt_st_8x8.o obj/fnt_st_8x16.o obj/fnt_l2_6x6.o obj/fnt_l2_8x8.o obj/fnt_l2_8x16.o obj/fnt_l9_6x6.o obj/fnt_l9_8x8.o obj/fnt_l9_8x16.o obj/fnt_gr_6x6.o obj/fnt_gr_8x8.o obj/fnt_gr_8x16.o obj/fnt_ru_6x6.o obj/fnt_ru_8x8.o obj/fnt_ru_8x16.o obj/version.o -lgcc -lm -lc -lnosys -Wl,--oformat,binary,-Ttext=0x00100000,-Tbss=0x00000000 -Wl,-Map,emutos2.map
/usr/local/m68k/lib/gcc/m68k-elf/4.7.0/../../../../m68k-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000100000
obj/xbios.o: In function `_random':
xbios.c:(.text+0x66): undefined reference to `___mulsi3'
obj/blkdev.o: In function `_blkdev_rwabs':
blkdev.c:(.text+0xdc): undefined reference to `___udivsi3'
blkdev.c:(.text+0xee): undefined reference to `___mulsi3'
blkdev.c:(.text+0x212): undefined reference to `___mulsi3'
obj/blkdev.o: In function `_blkdev_getbpb':
blkdev.c:(.text+0x322): undefined reference to `___udivsi3'
blkdev.c:(.text+0x3f6): undefined reference to `___udivsi3'
obj/serport.o: In function `_init_serport':
serport.c:(.text+0x6a8): undefined reference to `___udivsi3'
obj/dma.o: In function `_timeout_gpip':
dma.c:(.text+0x2c): undefined reference to `___divsi3'
obj/floppy.o: In function `_flop_hdv_init':
floppy.c:(.text+0x488): undefined reference to `___udivsi3'
obj/floppy.o: In function `_floppy_rw':
floppy.c:(.text+0x632): undefined reference to `___modsi3'
floppy.c:(.text+0x642): undefined reference to `___divsi3'
obj/videl.o: In function `_vgetsize':
videl.c:(.text+0x48e): undefined reference to `___mulsi3'
obj/videl.o: In function `_videl_vram_size':
videl.c:(.text+0x696): undefined reference to `___mulsi3'
obj/conout.o: In function `_cell_addr':
conout.c:(.text+0x3a): undefined reference to `___mulsi3'
conout.c:(.text+0x5a): undefined reference to `___mulsi3'
obj/conout.o: In function `_scroll_up':
conout.c:(.text+0x2be): undefined reference to `___mulsi3'
obj/conout.o:conout.c:(.text+0x4b8): more undefined references to `___mulsi3' follow
obj/delay.o: In function `_calibrate_delay':
delay.c:(.text+0xae): undefined reference to `___udivsi3'
obj/fsfat.o: In function `_cl2rec':
fsfat.c:(.text+0x16): undefined reference to `___mulsi3'
obj/fsfat.o: In function `_nextcl':
fsfat.c:(.text+0x27e): undefined reference to `___mulsi3'
obj/fsio.o: In function `_xrw':
fsio.c:(.text+0x15a): undefined reference to `___modsi3'
fsio.c:(.text+0x2fa): undefined reference to `___modsi3'
obj/fsio.o: In function `_ixlseek':
fsio.c:(.text+0x410): undefined reference to `___modsi3'
obj/doprintf.o: In function `_ltoa':
doprintf.c:(.text+0x86): undefined reference to `___umodsi3'
doprintf.c:(.text+0x96): undefined reference to `___udivsi3'
obj/intmath.o: In function `_Isqrt':
intmath.c:(.text+0x32): undefined reference to `___udivsi3'
obj/vdi_control.o: In function `__v_clrwk':
vdi_control.c:(.text+0x4c2): undefined reference to `___mulsi3'
obj/vdi_fill.o: In function `_polygon':
vdi_fill.c:(.text+0x4ea): undefined reference to `___divsi3'
vdi_fill.c:(.text+0x504): undefined reference to `___divsi3'
obj/vdi_line.o: In function `_draw_rect':
vdi_line.c:(.text+0x3e4): undefined reference to `___mulsi3'
vdi_line.c:(.text+0x4d0): undefined reference to `___mulsi3'
vdi_line.c:(.text+0x58c): undefined reference to `___mulsi3'
vdi_line.c:(.text+0x682): undefined reference to `___mulsi3'
obj/vdi_misc.o: In function `_get_start_addr':
vdi_misc.c:(.text+0x15e): undefined reference to `___mulsi3'
obj/vdi_raster.o:vdi_raster.c:(.text+0x2ac): more undefined references to `___mulsi3' follow
obj/vdi_text.o: In function `_dst_height':
vdi_text.c:(.text+0x3ce): undefined reference to `___udivsi3'
obj/gemaplib.o: In function `_ap_tplay':
gemaplib.c:(.text+0x10c): undefined reference to `___divsi3'
obj/gemaplib.o: In function `_ap_trecd':
gemaplib.c:(.text+0x244): undefined reference to `___mulsi3'
obj/gemevlib.o: In function `_ev_timer':
gemevlib.c:(.text+0xd6): undefined reference to `___divsi3'
obj/gemevlib.o: In function `_ev_multi':
gemevlib.c:(.text+0x29e): undefined reference to `___divsi3'
obj/gemgsxif.o: In function `_gsx_mcalc':
gemgsxif.c:(.text+0x314): undefined reference to `___mulsi3'
gemgsxif.c:(.text+0x35c): undefined reference to `___mulsi3'
obj/gemgsxif.o: In function `_bb_set':
gemgsxif.c:(.text+0x5b6): undefined reference to `___mulsi3'
gemgsxif.c:(.text+0x5e8): undefined reference to `___divsi3'
obj/optimize.o: In function `_sound':
optimize.c:(.text+0x2c): undefined reference to `___divsi3'
obj/gemdos.o: In function `_dos_space':
gemdos.c:(.text+0x2ba): undefined reference to `___mulsi3'
obj/gembind.o: In function `_gem_if':
gembind.c:(.text+0x6): undefined reference to `_control'
gembind.c:(.text+0x24): undefined reference to `_control'
gembind.c:(.text+0x36): undefined reference to `_control'
gembind.c:(.text+0x48): undefined reference to `_control'
obj/gembind.o: In function `_appl_init':
gembind.c:(.text+0x6a): undefined reference to `_control'
obj/command.o: In function `_xCmdLn':
command.c:(.text+0x1b06): undefined reference to `___mulsi3'
obj/command.o: In function `_pdl':
command.c:(.text+0x8a): undefined reference to `___divsi3'
command.c:(.text+0xa4): undefined reference to `___modsi3'
obj/command.o: In function `_prtDclFmt':
command.c:(.text+0x30c): undefined reference to `___divsi3'
collect2: error: ld returned 1 exit status
make: *** [emutos2.img] Fehler 1


Simon

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: EmuTOS

Postby simon » Wed Jan 23, 2013 8:23 am

I have successfuly built emuTOS with my gcc toolchain last evening. I have a problem with the linking order of object files though. But without building the CLI I get a ROM which runs on the hatari Atari ST emulator. :)
Next step is to get a basic set of drivers for Kiwi into the BIOS. But not within two days until I get the painted case... ;)

Simon

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: EmuTOS

Postby simon » Thu Jan 24, 2013 10:51 am

The last issue was due to a new optimization option of GCC. By default it uses -freorder-functions. This option collects all less frequently used functions and locates them at the start of the binary (.text). As a result command.o was linked in first instead of startup.o. Usually thats ok but not for a ROM image. Adding -fno-reorder-functions to the Makefile solved this issue. This has been merged to the EmuTOS project. The EmuTOS team added m68k-elf support to the official CVS branch yesterday. Wooo. :)

Simon

netwar
Posts: 40
Joined: Mon Sep 17, 2012 5:31 am
Location: North Carolina,United States of America

Re: EmuTOS

Postby netwar » Fri Feb 01, 2013 9:37 am

awesome!

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: EmuTOS

Postby simon » Sun Feb 03, 2013 12:37 pm

Yes, indeed. But I am still not sure about EmuTOS. There is a thread now about uClinux. Well it seems the guy just registered to advertise his project :roll: but it gave a new thought about this OS. :)

Simon

netwar
Posts: 40
Joined: Mon Sep 17, 2012 5:31 am
Location: North Carolina,United States of America

Re: EmuTOS

Postby netwar » Tue Feb 12, 2013 10:38 pm

Yea, a bit of a troll. But eh. :roll:

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: EmuTOS

Postby simon » Tue Mar 19, 2013 10:36 am

The emuTOS team added a nice feature in the CVS branch. It is now possible to compile emuTOS with serial console support. In the near future it should be possible to run it headless which helps in porting EmuTOS to Kiwi. Yeah!! :) :) :) Kiwi ST? :lol: :lol:

Simon

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: EmuTOS

Postby simon » Thu Aug 15, 2013 1:50 pm

Hello,

while installing a dedicated PC for the freerouter I did some research in the emuTOS code. Well it seems quite easy to port a very simple running emuTOS in console only. The patches for the Emucon2: are merged and all it takes to port is to write some new routines for:
  • Chararcter input (keyboard)
  • Character output (in EmuTOS via RS232, here via V9990)
  • Interrupt system including the 200Hz system timer

Are there people with knowledge in (emu)TOS? If the EmuCon2: is up and running the next natural step would be to port the VDI (or fVDI). Well, I did not find the actual routines which need to be ported yet. Neither I did find code which has to be altered because of different resolution and color depth.
Definately I could need help here.

Simon


cron