combining multiple files in 1 game (Development Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 35 invitados y 2 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - combining multiple files in 1 game

Ir a la página ( Página anterior 1 | 2 )
Autor

combining multiple files in 1 game

ro
msx guru
Mensajes: 2347
Publicado: Mayo 24 2005, 13:59   
NO NOT 0xC000 ! (that's where your code starts!) just preserve 7 bytes like I mentioned earlier (DMA: DS 7 at the end of your sourcE)
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 24 2005, 14:15   
Quote:

gheh, like that yeah (I was just typing!)

and you type well !

Great great, its a bit silly, but almost everytime that I discover something new in assembly I get all excited !!!!

Quote:

everytime that I discover

hmmm, I mean:
everytime somebody tells me how something is done.....

jejeje, I need some years of practice before I can make amazing discoveries
ro
msx guru
Mensajes: 2347
Publicado: Mayo 24 2005, 14:42   
that's what all the beauty is about norakomi! the thrill of coding just beats hot sex... well almost
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 24 2005, 15:11   
What about:
hot sex while coding......... drewl

Sonic_aka_T

msx guru
Mensajes: 2269
Publicado: Mayo 24 2005, 15:28   
o_O
Sonic_aka_T

msx guru
Mensajes: 2269
Publicado: Mayo 24 2005, 15:29   
O_o
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 25 2005, 05:04   
great
I succeeded bloading all the bin files in assembly.
Why is it anyway that you cannot bload in page 1???
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 25 2005, 05:08   

PAGE: EQU 0 ; vul hier 1 in bij screen 7 en hoger, page 1

BDOS: EQU $F37D
BUFFER: EQU $8000 ; Buffer in RAM voor "doorgeven" van file naar VRA
BUFLEN: EQU $4000 ; lengte buffer (groter=sneller)
ORG $C000

ld a,5
call $5f

LD DE,BUFFER ; OPEN FILE
LD C,$1A
CALL BDOS
LD DE,FCB2
LD C,$F
CALL BDOS
OR A
JP NZ,ERROR
LD HL,1
LD (FCB2+0EH),HL
DEC L
LD (FCB2+21H),HL
LD (FCB2+23H),HL
LD L,7
LD DE,FCB2 ; header laden
LD C,$27
CALL BDOS
OR A
JP NZ,ERROR

DI ; Zet VRAM adres
LD HL,(BUFFER+1)

; SET 7,H ; BIJ SCREEN 5/6, PAGE 1 OF 3
LD B,PAGE
CALL SETWRT

LD HL,(FCB2+$10) ; Laad plaatje in VRAM
LD DE,-7
ADD HL,DE ; lengte zonder header van 7 bytes
JR LAAD2
LAAD1: PUSH HL
LD HL,BUFLEN
CALL LAADVR
POP HL
LAAD2: LD DE,-BUFLEN
ADD HL,DE
JR C,LAAD1
SBC HL,DE
CALL NZ,LAADVR
EI
RET

LAADVR: PUSH HL
LD DE,FCB2
LD C,$27
CALL BDOS
POP HL
OR A
JR NZ,ERRORP
LD A,L
OR A
LD B,L
LD A,H
JR Z,J21
INC A
J21: LD HL,BUFFER
LD C,$98
J20: OTIR
DEC A
JR NZ,J20
RET

SETWRT: LD C,$99
LD A,H
AND $C0
OR B
RLCA
RLCA
OUT (C),A
LD A,14 OR 128
OUT (C),A
LD A,H
OUT (C),L
AND $3F
OR $40
OUT (C),A
DEC C
RET


ERRORP: POP HL
ERROR: EI
JP $C0
FCB2: DEFB 0,"level001Sc5"
DB 0
DB 0
DW 0
DW 0,0
DW 0,0
DB 0,0
DW 0,0,0
DB 0
DW 0,0

I ripped the above programm to bload a picture into page 0, screen 5
(I love to rip stuff)
But, sigh, something is wrong here, there is no picture after I run this
programm,
I tried messing around with stuff, and sometimes I can fill the
screen with jiberish..... a lot of mess pops up,
but I have not been able to bload my picture .......
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 25 2005, 05:18   
oh, yeah and even Grauw wrote an article about loading data into the videoRAM
I tried to change the disk load routines, aswell as the error abort routine, to make it work in dos 1, but again I seem to fail !
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 25 2005, 05:18   
Maybe I should get some sleep zzzz
ro
msx guru
Mensajes: 2347
Publicado: Mayo 25 2005, 10:25   
you can't directly load data into page 1 b'coz the BDOS routines are also run from page 1. good practise is to ALWAYS use page 2 to load data.

if the above load routine doesn't work, check the filename (got the right one?) everything else SEEMS okay (in a fast overview atleast).

do u understand all of the code? it's really quite simple. really.
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 25 2005, 14:17   
I dont understand all the coding,
but I downloaded some acticles, so its study time for me .....

Another thing....
I used to code starting from $4000,
now I type page 2,3,0,3 when I want to load all the .bin files in page 2.

after loading the files I cannot start my main file at $4000 anymore.....
(even if I type page 1,3,0,3 again)
Should I now start my main file in page 2 also???

It seems that now I only have page 2 and page 3 free to use....
I know I´m going to need all 4 pages if possible for my game
because its gonna be a huge game (lots of sc5 files, lots of game files,
character movement, lots of levels etc etc.)

what is wise, memory wise?
norakomi
msx professional
Mensajes: 861
Publicado: Mayo 25 2005, 14:25   
Quote:

if the above load routine doesn't work, check the filename (got the right one?) everything else SEEMS okay.

hmmm, maybe my computer needed some sleep aswell, because now (the next day) it DOES work !!

 
Ir a la página ( Página anterior 1 | 2 )
 







(c) 1994 - 2008 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation